EngineHub / Piston

A generic command system, with tie-ins to many Minecraft platforms such as Bukkit, Forge, and Sponge.
GNU General Public License v3.0
17 stars 3 forks source link

New clone build fails #22

Closed Charlweed closed 4 years ago

Charlweed commented 4 years ago

New clone does not build from command-line or IntelliJ IDEA. What is required to build (on Linux)? Command line:

gradlew
FAILURE: Build failed with an exception.
* Where:
Build file '/usr/exports/projects/minecraft/Piston/core-ap/processor/build.gradle.kts' line: 35
* What went wrong:
kotlin.KotlinNullPointerException (no error message)

IDEA: Could not create parent directory for lock file ./Piston/?/.gradle/wrapper/dists/gradle-5.6.2-all/9st6wgf78h16so49nn74lgtbb/gradle-5.6.2-all.zip.lck

boy0001 commented 4 years ago

Dont use the intellij gradle wrapper, use the one in the repo.

Charlweed commented 4 years ago

Even without intellij, gradlew fails. I don't know any Kotlin, but tomorrow I will look at core-ap/processor/build.gradle.kts

octylFractal commented 4 years ago

If you can run it with --stacktrace, that would be appreciated.

octylFractal commented 4 years ago

I have found the issue -- it's the line requiring the current tools.jar to be present when building. Likely you are attempting to build on a JDK higher than 8, which is unsupported for now. Try setting your JAVA_HOME environment variable to a JDK 8 home environment. For example, on my system, /usr/lib/jvm/java-1.8.0-openjdk-amd64.

Edit: I have added a more informative message for the next time this issue occurs.

octylFractal commented 4 years ago

In addition, I have patched the project to build up to JDK 12. JDK 13 will require upgrading Gradle, but this project isn't targeted for higher JDKs anyways, so it's not urgent on my end. I will consider this fixed for now.

Charlweed commented 4 years ago

I concur, at least for the test of setting JAVA_HOME to a 1.8 JDK. I did not test with JDK 12.