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

angular - DownloadURL return null in below code -

python 2.7 - Given three nested dictionaries, sort the top two nested dictionaries from a value in the innermost dictionary? -