build says it fails on master branch, but produces jar
Redhawk18 opened this issue · 3 comments
What do you need help with?
I ran ./gradlew build
...
Note: duplicate definition of library class [org.spongepowered.asm.launch.platform.container.ContainerHandleModLauncherEx]
Note: duplicate definition of library class [module-info]
Reading library jmod [/usr/lib64/jvm/java-17-openjdk-17/jmods/java.base.jmod] (filtered)
Unexpected error
java.io.IOException: Can't read [/usr/lib64/jvm/java-17-openjdk-17/jmods/java.base.jmod(;;;;;;;!**.jar;!module-info.class)] (No such file or directory: /usr/lib64/jvm/java-17-openjdk-17/jmods/java.base.jmod)
at proguard.InputReader.readInput(InputReader.java:269) ~[proguard.jar:7.2.1]
at proguard.InputReader.readInput(InputReader.java:233) ~[proguard.jar:7.2.1]
at proguard.InputReader.readInput(InputReader.java:210) ~[proguard.jar:7.2.1]
at proguard.InputReader.execute(InputReader.java:162) ~[proguard.jar:7.2.1]
at proguard.pass.PassRunner.run(PassRunner.java:24) ~[proguard.jar:7.2.1]
at proguard.ProGuard.readInput(ProGuard.java:309) ~[proguard.jar:7.2.1]
at proguard.ProGuard.execute(ProGuard.java:111) ~[proguard.jar:7.2.1]
at proguard.ProGuard.main(ProGuard.java:614) [proguard.jar:7.2.1]
Caused by: java.io.IOException: No such file or directory: /usr/lib64/jvm/java-17-openjdk-17/jmods/java.base.jmod
at proguard.io.DirectorySource.pumpDataEntries(DirectorySource.java:51) ~[proguard.jar:7.2.1]
at proguard.InputReader.readInput(InputReader.java:265) ~[proguard.jar:7.2.1]
... 7 more
> Task :fabric:proguard
Running Determinizer
Input path: /home/redhawk/code/baritone/fabric/build/libs/baritone-fabric-1.9.3-32-g4144344a.jar
Output path: /home/redhawk/code/baritone/fabric/build/libs/baritone-unoptimized-fabric-1.9.3-32-g4144344a.jar
Shade: []
Done with determinizer
> Task :fabric:proguard FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':fabric:proguard'.
> Proguard exited with code 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 10s
15 actionable tasks: 13 executed, 2 up-to-date
─redhawk🎉Mythra─ ~/code/baritone
└$ echo $JAVA_HOME
/usr/lib64/jvm/java-17-openjdk-17
─redhawk🎉Mythra─ ~/code/baritone
└$ zypper se -i jdk
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
---+--------------------------+------------------------------------+--------
i | java-11-openjdk | OpenJDK 11 Runtime Environment | package
i+ | java-11-openjdk-devel | OpenJDK 11 Development Environment | package
i | java-11-openjdk-headless | OpenJDK 11 Runtime Environment | package
i | java-17-openjdk | OpenJDK 17 Runtime Environment | package
i+ | java-17-openjdk-devel | OpenJDK 17 Development Environment | package
i | java-17-openjdk-headless | OpenJDK 17 Runtime Environment | package
It looks like I have everything setup properly but it says it fails but it still produces a jar? This is another test I did to see if there was just a bad commit on master
─redhawk🎉Mythra─ ~/code/baritone
└$ git checkougit checkout tags/v1.10.2
Note: switching to 'tags/v1.10.2'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8a0f3018 v1.10.2
─redhawk🎉Mythra─ ~/code/baritone
└$ git checkou./gradlew assemble
...
BUILD SUCCESSFUL in 7s
18 actionable tasks: 16 executed, 2 up-to-date
Final checklist
- I know how to properly use check boxes
- I have not used any OwO's or UwU's in this issue.
The build fails at a pretty late stage of the fabric subproject build so there will already be various jars in build/libs
and fabric/build/libs
but that does not mean it finished. After a successful ./gradlew build
the final jars will be in dist
together with a file listing their checksums.
The build process is hardcoded to use JAVA_HOME/jmods/java.base.jmod
(and two other jmods) so if for some reason those are in a different location on your system you will have to adjust that in buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java
in generateConfigs()
on line 204 to 206.
Btw you built from the 1.19.4 branch (current development + default branch), not master (1.12.2 branch, initial and previous development + default branch).