Skip to content

Replace <version>-android with <version>-jre #97

@Fleshgrinder

Description

@Fleshgrinder

I am currently using the following snippet in my build.gradle.kts but would love to replace this with a rule for the plugin:

configurations.all {
    resolutionStrategy {
        eachDependency {
            if (requested.group == "com.google.guava" && requested.version?.contains("-android") == true) {
                useVersion(requested.version!!.replace("-android", "-jre"))
                because("Android Guava lacks certain optimizations: https://github.com/google/guava/issues/2914")
            }
        }
    }
}

I couldn't figure out how to do this based on the information available in the Wiki.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions