티스토리 뷰

728x90
withType<Jar> {
    enabled = true
    isZip64 = true
    duplicatesStrategy = DuplicatesStrategy.EXCLUDE

    archiveFileName.set("$project.jar")

    from(sourceSets.main.get().output)
    dependsOn(configurations.compileClasspath)
    from({
        configurations.compileClasspath.get().filter {
            it.name.endsWith("jar")
        }.map { zipTree(it) }
    }) {
        exclude("META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA")
    }
}

https://github.com/johnrengelman/shadow/issues/107

 

shadow jar with > 65535 files fails · Issue #107 · johnrengelman/shadow

FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':xxxxx:shadowJar'. > org.apache.tools.zip.Zip64RequiredException: archive contains more than 65535 ...

github.com

https://stackoverflow.com/questions/46157338/using-gradle-to-build-a-jar-with-dependencies-with-kotlin-dsl/73388694#73388694

 

Using Gradle to build a jar with dependencies with Kotlin-DSL

There is already an answer to the question: how to include all the dependencies in a jar file though it's for Groovy I'm using gradle with kotlin-dsl and the code is not compatible. I tried to mak...

stackoverflow.com

 

728x90

'공부' 카테고리의 다른 글

[broker] kafka vs rabbitMQ  (0) 2022.08.18
[kotlin] public static void main  (0) 2022.08.18
[pandas] web scraping  (0) 2022.08.13
[Scala] SparkSession.conf(String, Any)  (0) 2022.08.13
[kotlin] map -> flatMap  (0) 2022.08.11
댓글
댓글쓰기 폼