Today I wanted to do some documentation on a private Java coding project. For this, I decided to use AsciiDoc as this would give me the flexibility to later publish my project e.g. on Github and have the document rendered directly on the project overview page and additionality create some PDFs for the distribution of the program as user documentation. After the first minor changes to my Gradle build-script to generate the PDFs, IntelliJ got me really strange errors when updating the Gradle structure in IntelliJ.
Warning: root project 'webdav-embedded-server': Unable to resolve additional project configuration. Details: groovy.lang.MissingPropertyException: No such property: id for class: org.gradle.api.internal.artifacts.DefaultResolvedArtifact Possible solutions: file
Surprisingly, these errors were only visible in IntelliJ when refreshing the Gradle structure but a normal
./gradlew build on the command line worked like a charm. The error made IntelliJ try to compile my Java code with source compatibility set to Java 1.3 – which obviously gave me lots of compile errors.
As a first attempt to solve this, I reverted back all changes I made, which unfortunately didn’t help. After that, I opened another IntelliJ project which I didn’t touch since a few weeks – with the same results / errors. Deleting the
.IntelliJC folders in the project and my home directory also didn’t help.
In a last attempt, I created a new gradle project from scratch et voilá, this project worked like normal in IntelliJ. After that I started to copy my project sources one by one into the new project and guess what: Nothing happend. IntelliJ didn’t gave me any error in my test project, but still in my original projects – pretty confusing 🙁
The only difference between the original and the test project was the Gradle wrapper. Obviously there was some incompatibility between IntelliJ and the Gradle wrapper I used. Copying the newly generated wrapper to my original project made the error disappear…