You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should we be able to use the same module name as jar file? let's say you have a module name called example-module-name and the jar file name would be example-module-name.jar
and run ./gradlew build you will get the following error:
FAILURE: Build failed with an exception.* What went wrong:Some problems were found with the configuration of task ':example-module-name:shadowJar' (type 'ShadowJar'). - Gradle detected a problem with the following location: '/Users/yourusername/Developer/projects/yourproject/example-module-name/build/libs/example-module-name.jar'. Reason: Task ':example-module-name:distZip' uses this output of task ':example-module-name:shadowJar' 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 ':example-module-name:shadowJar' as an input of ':example-module-name:distZip'. 2. Declare an explicit dependency on ':example-module-name:shadowJar' from ':example-module-name:distZip' using Task#dependsOn. 3. Declare an explicit dependency on ':example-module-name:shadowJar' from ':example-module-name:distZip' using Task#mustRunAfter. For more information, please refer to https://docs.gradle.org/8.7/userguide/validation_problems.html#implicit_dependency in the Gradle documentation. - Gradle detected a problem with the following location: '/Users/ellet/Developer/projects/minecraft-sync/example-module-name/build/libs/example-module-name.jar'. Reason: Task ':example-module-name:distTar' uses this output of task ':example-module-name:shadowJar' 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 ':example-module-name:shadowJar' as an input of ':example-module-name:distTar'. 2. Declare an explicit dependency on ':example-module-name:shadowJar' from ':example-module-name:distTar' using Task#dependsOn. 3. Declare an explicit dependency on ':example-module-name:shadowJar' from ':example-module-name:distTar' using Task#mustRunAfter. For more information, please refer to https://docs.gradle.org/8.7/userguide/validation_problems.html#implicit_dependency in the Gradle documentation. - Gradle detected a problem with the following location: '/Users/ellet/Developer/projects/minecraft-sync/example-module-name/build/libs/example-module-name.jar'. Reason: Task ':example-module-name:startScripts' uses this output of task ':example-module-name:shadowJar' 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 ':example-module-name:shadowJar' as an input of ':example-module-name:startScripts'. 2. Declare an explicit dependency on ':example-module-name:shadowJar' from ':example-module-name:startScripts' using Task#dependsOn. 3. Declare an explicit dependency on ':example-module-name:shadowJar' from ':example-module-name:startScripts' using Task#mustRunAfter. For more information, please refer to https://docs.gradle.org/8.7/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.
Content of Shadow JAR (jar tf <jar file> - post link to GIST if too long)
I can't get the jar builded
The text was updated successfully, but these errors were encountered:
Thank you, I will try that, but I'm not sure how it's related to distZib task (it could be that shadowJar depends on distSize but that's already by default). This error only shows when using the exact same module name + .jar
Shadow Version
8.1.1
Gradle Version
8.7
Expected Behavior
Should we be able to use the same module name as jar file? let's say you have a module name called
example-module-name
and the jar file name would beexample-module-name.jar
Actual Behavior
If you use the following:
and run
./gradlew build
you will get the following error:Content of Shadow JAR (
jar tf <jar file>
- post link to GIST if too long)I can't get the jar builded
The text was updated successfully, but these errors were encountered: