Jump to content

Error when building project: Error while building FML annotations cache: duplicate entry (1.12.2 - 2768)


Wolfsurge

Recommended Posts

Like the title says, I'm getting an error while building. My build.gradle looks like this:

buildscript {
	repositories {
		jcenter()
		maven { url = 'http://files.minecraftforge.net/maven' }
		maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
		maven { url = 'https://libraries.minecraft.net' }
		maven { url = 'https://plugins.gradle.org/m2' }
	}
	dependencies {
		classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
		classpath 'org.spongepowered:mixingradle:0.4-SNAPSHOT'
		classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
	}
}

apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'org.spongepowered.mixin'
apply plugin: 'com.github.johnrengelman.shadow'

version project.modVersion
group project.modGroup // http://maven.apache.org/guides/mini/guide-naming-conventions.html

sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
compileJava {
	sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
	options.encoding = 'UTF-8'
}

minecraft {
	version = project.forgeVersion
	runDir = 'run'
	mappings = project.mcpVersion
	coreMod = 'me.wolfsurge.mixin.MixinLoader'
	makeObfSourceJar = false
}

repositories {
	jcenter()
    mavenCentral()

	maven {
		name = 'spongepowered-repo'
		url = 'https://repo.spongepowered.org/repository/maven-public/'
	}
	maven {
		name = 'swt-repo'
		url = "http://maven-eclipse.github.io/maven"
	}
	maven {
		name = "jitpack.io"
		url = "https://jitpack.io"
	}
}

dependencies {
	compile("org.spongepowered:mixin:0.7.4-SNAPSHOT") {
		exclude module: 'launchwrapper'
		exclude module: 'guava'
		exclude module: 'gson'
		exclude module: 'commons-io'
	}
	compile "com.mojang:brigadier:1.0.17"
	compile "com.moandjiezana.toml:toml4j:0.7.2"
	compile "com.github.ZeroMemes:Alpine:1.5"
	compile group: 'net.jodah', name: 'typetools', version: '0.5.0'
	compile group: "com.googlecode.json-simple", name: "json-simple", version: "1.1.1"
	compile group: 'club.minnced', name: 'java-discord-rpc', version: '2.0.1'
	compile fileTree(dir: 'libraries', include: '*.jar')
}

processResources {
	inputs.property 'version', project.version
	inputs.property 'mcversion', project.minecraft.version

	from(sourceSets.main.resources.srcDirs) {
		include 'mcmod.info'
		expand 'version': project.version, 'mcversion': project.minecraft.version
	}
	from(sourceSets.main.resources.srcDirs) {
		exclude 'mcmod.info'
	}
	rename '(.+_at.cfg)', 'META-INF/$1'
}

shadowJar {
	dependencies {
		include(dependency('org.spongepowered:mixin'))
		include(dependency('com.github.ZeroMemes:Alpine'))
		include(dependency('net.jodah:typetools'))
		include(dependency('com.googlecode.json-simple:json-simple:1.1.1'))
		include(dependency('club.minnced:java-discord-rpc:2.0.1'))
		include(dependency('com.mojang:brigadier:1.0.17'))
		include(dependency('com.moandjiezana.toml:toml4j:0.7.2'))
	}
	exclude 'dummyThing'
	exclude 'LICENSE.txt'
	classifier = 'release'
}

mixin {
	defaultObfuscationEnv searge
	add sourceSets.main, 'mixins.xeno.refmap.json'
}

reobf {
	shadowJar {
		mappingType = 'SEARGE'
		classpath = sourceSets.main.compileClasspath
	}
}

jar {
	manifest {
		attributes(
				'MixinConfigs': 'mixins.xeno.json',
				'tweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
				'TweakOrder': 0,
				'FMLCorePluginContainsFMLMod': 'true',
				'FMLCorePlugin': 'me.wolfsurge.mixin.MixinLoader',
				'ForceLoadAsMod': 'true',
				'FMLAT': 'xeno_at.cfg'
		)
	}
}

build.dependsOn(shadowJar)

The log looks like this:

> Configure project :
This mapping 'snapshot_20180814' was designed for MC 1.12! Use at your own peril.
WARNING: You are using an unsupported version of ForgeGradle.
Please consider upgrading to ForgeGradle 5 and helping in the efforts to get old versions working on the modern toolchain.
See https://gist.github.com/TheCurle/fe7ad3ede188cbdd15c235cc75d52d4a for more info on contributing.
Found AccessTransformer: xeno_at.cfg
Version string '2' does not match SemVer specification
You should try SemVer : http://semver.org/

> Task :reobfJar FAILED

> Task :extractAnnotationsJar
Error while building FML annotations cache: duplicate entry: assets/minecraft/sounds/click.ogg
java.util.zip.ZipException: duplicate entry: assets/minecraft/sounds/click.ogg
        at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:232)
        at net.minecraftforge.gradle.user.TaskExtractAnnotations.processJar(TaskExtractAnnotations.java:96)
        at net.minecraftforge.gradle.user.TaskExtractAnnotations.doTask(TaskExtractAnnotations.java:69)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:794)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:761)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:131)        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:120)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:99)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
        at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$ExecuteTaskAction.execute(DefaultTaskExecutionGraph.java:262)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$ExecuteTaskAction.execute(DefaultTaskExecutionGraph.java:246)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:136)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.execute(DefaultTaskPlanExecutor.java:201)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.executeWithTask(DefaultTaskPlanExecutor.java:192)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:130)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
        at java.lang.Thread.run(Thread.java:748)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':reobfJar'.
> java.util.zip.ZipException: duplicate entry: assets/minecraft/sounds/click.ogg

* 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 5.0.
See https://docs.gradle.org/4.8.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 4s
12 actionable tasks: 7 executed, 5 up-to-date

The assets/minecraft/sounds/click.ogg is something I implemented. I am using IntelliJ, having recently switched from Eclipse, where I didn't get the errors. Any help would be greatly appreciated.

Link to comment
Share on other sites

  • Guest locked this topic
Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.