anatawa12 / ForgeGradle-1.2

This is only for FG_1.2(for minecraft 1.7.10). Minecraft mod development framework used by Forge and FML for the gradle build system
GNU Lesser General Public License v2.1
79 stars 29 forks source link

gradlew build fails with gradle-7.4.2-bin.zip #212

Open AstroTibs opened 7 months ago

AstroTibs commented 7 months ago

Setting up a project is fine, but when it comes to ./gradlew build

I get this error:

> ./gradlew build
> Task :processResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processResources'.
> Entry mcmod.info is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.4.2/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.

* 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

BUILD FAILED in 1s
3 actionable tasks: 1 executed, 2 up-to-date

This is fixed when I change the value to `gradle-4.4.1-bin.zip

anatawa12 commented 7 months ago

Your error is caused by your build configuration.

Since Gradle 7.0, you have to set duplicatesStrategy if you have specified duplicated entries for your resources.

AstroTibs commented 6 months ago

It's actually caused by yours. As I said, this issue occurs with your included repo While switching to Gradle version 4.4.1 worked for me, I see that you have in your 1.12 repo the following line duplicatesStrategy = DuplicatesStrategy.INCLUDE You may want to include this in your 1.7 repo just so people can have a working version and see how the duplicatesStrategy might be used.

anatawa12 commented 5 months ago

It's actually caused by yours. As I said, this issue occurs with your included repo

What is the "included repo"?

I see that you have in your 1.12 repo the following line duplicatesStrategy = DuplicatesStrategy.INCLUDE

If you're mentioning this line in FG 2.3 example, for FG 1.2 example we're using filesMatching and expand which doesn't cause duplicated entries.

Could you show me your build script?

anatawa12 commented 3 months ago

Could you show me your build script?