Closed soloturn closed 1 month ago
Unfortunately, this fails to run the tests succesfully at the moment:
* What went wrong:
A problem was found with the configuration of task ':engine-tests:compileJava' (type 'JavaCompile').
- Gradle detected a problem with the following location: '/home/jenkins/agent/workspace/Terasology_engine_PR-5196/engine/build/classes'.
Reason: Task ':engine-tests:compileJava' uses this output of task ':engine:compileJmhJava' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Possible solutions:
1. Declare task ':engine:compileJmhJava' as an input of ':engine-tests:compileJava'.
2. Declare an explicit dependency on ':engine:compileJmhJava' from ':engine-tests:compileJava' using Task#dependsOn.
3. Declare an explicit dependency on ':engine:compileJmhJava' from ':engine-tests:compileJava' using Task#mustRunAfter.
For more information, please refer to https://docs.gradle.org/8.5/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.
This still does not compile, unfortunately:
FAILURE: Build failed with an exception.
* Where:
Build file '/home/jenkins/agent/workspace/Terasology_engine_PR-5196/engine/build.gradle.kts' line: 240
* What went wrong:
Script compilation errors:
Line 240: source = sourceSets.jmh.get().java
^ Unresolved reference: jmh
Line 241: classpath = sourceSets.jmh.get().compileClasspath
^ Unresolved reference: jmh
Line 242: destinationDirectory.set(sourceSets.jmh.get().java.destinationDirectory)
^ Unresolved reference: jmh
Line 248: classpath = sourceSets.jmh.get().compileClasspath + sourceSets.jmh.get().runtimeClasspath
^ Unresolved reference: jmh
Line 248: classpath = sourceSets.jmh.get().compileClasspath + sourceSets.jmh.get().runtimeClasspath
^ Unresolved reference: jmh
Line 252: jmhAnnotationProcessor("org.openjdk.jmh:jmh-generator-annprocess:1.27")
^ Unresolved reference: jmhAnnotationProcessor
Line 253: jmhImplementation("org.openjdk.jmh:jmh-core:1.27")
^ Unresolved reference: jmhImplementation
Line 254: jmhImplementation("org.openjdk.jmh:jmh-generator-annprocess:1.27")
^ Unresolved reference: jmhImplementation
@soloturn are you planning to take this up again?
running out of ideas how to fix this i asked in the gradle forums: https://discuss.gradle.org/t/exclude-jmh-files-in-resulting-jar-jmh-plugin-bug-or-our-bug/48450
tried different notation now, removing the duplicate task. if you could test it again please with gradle jmh
.
migrate engine build to kotlin.