ci.gradle
ci.gradle copied to clipboard
NPE in libertyDev task when no Java plugin is applied
The libertyDev task tries to access the current projects SourceSets.
https://github.com/OpenLiberty/ci.gradle/blob/37a4c60f0e557e48262f4a7f8eb882ab4d38d37f/src/main/groovy/io/openliberty/tools/gradle/tasks/DevTask.groovy#L867-L874
However SourceSets are a concept that is only available with the JavaBasePlugin and the main and tests SourceSets are only configured if the java plugin is applied. This is especially not the case then using ear projects, where the java plugin is by default unnecessary.
Accessing the sourceSets should be null-pointer-proof and only be done when the project has the JavaBasePlugin applied.