licensee icon indicating copy to clipboard operation
licensee copied to clipboard

Replace buildscript with plugins

Open syslogic opened this issue 2 years ago • 2 comments

https://github.com/cashapp/licensee/blob/7b8b13978aba36faf157bc42404b139057bb7b99/README.md?plain=1#L81-L91

Using the plugins API, this is how it would look alike:

plugins {
    id 'app.cash.licensee' version '1.5.0-SNAPSHOT' apply false
}
plugins {
    id 'app.cash.licensee'
}

Repositories can be set up in settings.gradle:

import org.gradle.api.initialization.resolve.RepositoriesMode

pluginManagement {
    repositories {
        maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
        mavenCentral()
    }
}

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
        mavenCentral()
    }
}

rootProject.name = "Licensee"

syslogic avatar May 26 '22 16:05 syslogic

We can provide both forms, but note that for both the non-snapshot plugin and the snapshot plugin you will still need to specify a maven repository because we do not publish to Gradle's plugin portal (and have no plans to).

JakeWharton avatar May 26 '22 16:05 JakeWharton

I've updated that with Sonatype & MavenCentral.

syslogic avatar Jun 03 '22 10:06 syslogic