gretty icon indicating copy to clipboard operation
gretty copied to clipboard

Gradle 4.6-rc-2 Jacoco NullPointerException

Open chali opened this issue 7 years ago • 2 comments

Hello,

I'm trying Gradle 4.6-rc-2. I've encountered an error during the configuration phase. Gretty is initializing Jacoco which uses a new API which is returning null. The new method is coming from JavaForkOptions. When you are creating JacocoHelper in creates an empty implementation for each method from JavaForkOptions. The code is here: https://github.com/akhikhl/gretty/blob/3084987c38dd1e429c27bb9d6da3990cc6cb5305/libs/gretty/src/main/groovy/org/akhikhl/gretty/StartBaseTask.groovy#L145-L155 Here is the NullPointerExecption https://github.com/gradle/gradle/blob/v4.6.0-RC2/subprojects/jacoco/src/main/java/org/gradle/testing/jacoco/plugins/JacocoPluginExtension.java#L117. Would be a special implementation for this method returning empty list enough?

Here is an example project showing the problem. You can run ./gradlew classes --stacktrace. https://github.com/chali/jacocoAndGretty

Thanks

chali avatar Feb 23 '18 21:02 chali

Would be fixed by https://github.com/akhikhl/gretty/pull/415.

wolfs avatar Feb 26 '18 10:02 wolfs

I'm closing my duplicate PR.

chali avatar Feb 26 '18 15:02 chali