How can I detect if my subproject is a war project?


(Sebastien Tardif) #1

I did try to detect if ‘war’ namespace is defined but I also have no clue how to do this.


(Gary Hale) #2
if (plugins.hasPlugin('war')) {
    println "war!"
}

(Benjamin Muschko) #3

If you are declaring this in the root project, you might want to wait until all of your subprojects have been evaluated with ‘gradle.projectsEvaluated’.