Skip to content

ShadowJar support (for auto gathering relocations) possibly being removed #16

@Vankka

Description

@Vankka

Support for taking relocations directly from shadowJar into the dependency files generated by the Gradle plugin (via the includeShadowJarRelocations option) might be removed in the future.

Doing it requires doing reflection to access the relocations, is unreliable and only seems to be becoming more unreliable in the most recent Gradle versions.

The recommended replacement is doing something like this:

[
    'org.apache.commons',
    'com.google.gson'
].each {
    var relocated = 'com.example.myapp.dependencies.' + it
    tasks.shadowJar.relocate it, relocated
    tasks.generateRuntimeDownloadResourceForRuntimeDownloadOnly.relocate it, relocated
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions