Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace buildscript with plugins #91

Open
syslogic opened this issue May 26, 2022 · 2 comments
Open

Replace buildscript with plugins #91

syslogic opened this issue May 26, 2022 · 2 comments

Comments

@syslogic
Copy link

syslogic commented May 26, 2022

licensee/README.md

Lines 81 to 91 in 7b8b139

buildscript {
repository {
mavenCental()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
dependencies {
classpath 'app.cash.licensee:licensee-gradle-plugin:1.5.0-SNAPSHOT'
}
}

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"
@JakeWharton
Copy link
Collaborator

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).

@syslogic
Copy link
Author

syslogic commented Jun 3, 2022

I've updated that with Sonatype & MavenCentral.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants