decaf-lang / decaf-lang/decaf

gradle build fails with duplicate META-INF/LICENSE reference

Open
#18 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
67
Forks
29
PR merge metrics
No merged PRs in 30d

Description

I'm on Linux Manjaro and I was trying to build decaf from the src and when I would run: gradle build
it would fail for the jar task stating something about a duplicate META-INF/LICENSE file. The fix for me was this:

The original snippet of the build.gradle file:
`tasks.compileJava.dependsOn tasks.ll1pg

jar {
manifest {
attributes 'Main-Class': 'decaf.Main'
}

// Create a fat JAR with all the dependencies.
from {
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
}
}`

I changed it to:
`tasks.compileJava.dependsOn tasks.ll1pg

jar {
setDuplicatesStrategy(DuplicatesStrategy.INCLUDE);
manifest {
attributes 'Main-Class': 'decaf.Main'
}

// Create a fat JAR with all the dependencies.
from {
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
}
}`

and now, despite giving an error about JavaExecHandlerBuilder.setMain(String) method being deprecated, it compiles. I also changed the commons-cli version from 1.5 to 1.5.0 though I'm not sure if that matters.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.