-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
convert engine build to kotlin #5196
Conversation
ac8c575
to
7f94796
Compare
f2dbe74
to
d6bd80a
Compare
@@ -145,7 +148,7 @@ tasks.named("processResources") { | |||
} | |||
|
|||
tasks.named("compileJava") { | |||
dependsOn("processResources") | |||
dependsOn("processResources", ":engine:compileJmhJava") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't benchmarks be compiled separately? Could you explain why modules need to depend on the engine's private benchmarks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the error message without was:
> Task :engine:jar
> Task :modules:CoreAssets:compileJava NO-SOURCE
> Task :modules:BiomesAPI:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':modules:BiomesAPI:compileJava' (type 'JavaCompile').
- Gradle detected a problem with the following location: '/srv/http/repos/terasology/engine/build/classes'.
Reason: Task ':modules:BiomesAPI: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 ':modules:BiomesAPI:compileJava'.
2. Declare an explicit dependency on ':engine:compileJmhJava' from ':modules:BiomesAPI:compileJava' using Task#dependsOn.
3. Declare an explicit dependency on ':engine:compileJmhJava' from ':modules:BiomesAPI: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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the feedback on discord. to make the engine jar not contain the jmh files i added
exclude("src/jmh")
which then allowed to compile it without all these undesired dependency spread out.
b63a9ec
to
3fce95a
Compare
8b3240c
to
9bc6bec
Compare
Unfortunately, this fails to run the tests succesfully at the moment:
|
This still does not compile, unfortunately:
|
@soloturn are you planning to take this up again? |
* timestamp cannot be ignored easily with ignoreproperties, so leave it as is, and remove the todo. * move down writing the jar file, to assure version is specified in typehandlerlibrary e.g. which has it like project(:engine).version * add jmh gradle plugin
running out of ideas how to fix this i asked in the gradle forums: tried different notation now, removing the duplicate task. if you could test it again please with |
migrate engine build to kotlin.