java - Intellij Gradle Plugin error when task throw exception -


i create gradle task requires additional property (./gradlew mytask -pmyproperty=something), want check if property exists , stop build task if not.

if (!project.hasproperty("myproperty")) {     throw new stopactionexception("please blebleble...") } 

and works if use gradlew, intellij suggests import changes (intellij gradle plugin) , error in line throw exception. seems plugin tries run tasks before launch them or something. there possibility fix it?

i did here: recommended way stop gradle build


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -