We use JUnit tests for the test of a custom Gradle plugin. The Eclipse project setup is a Gradle multi project setup. The JUnit tests are calling Gradle via GradleLauncher. As soon as the method launcher.run() is called a NullPointerException without any message is thrown. I found the cause in the missing /org/gradle/configuration/default-imports.txt file within gradle-core-1.6.jar. The NullPointerException is thrown when ImportsReader#getImports() tries to load the defaults file. In gradle-core-1.5.jar the file exists.
As of Gradle 1.6, ‘default-imports.txt’ lives in the root of ‘gradle-docs.jar’.
many thanks peter! why is this changed, and how would such a change be documented?
This change is related to the Way we generate this file. Before 1.6 this was a static file. Now it’s dynamically created during our Build process. This file is considered to be internal and it’s Not Part of the Public API. That’s why these changes are Not mentioned in the Release notes.