diff --git a/build.gradle.kts b/build.gradle.kts index 46ddce6d7..bbf35c6f3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,7 +3,6 @@ plugins { id("io.github.gradle-nexus.publish-plugin") version "1.1.0" id("org.owasp.dependencycheck") version "10.+" apply false id("nebula.maven-resolved-dependencies") version "18.4.0" apply false - id("org.openrewrite.build.moderne-source-available-license") version "latest.release" } configure { diff --git a/gradle/licenseHeader.txt b/gradle/licenseHeader.txt index 43819ad42..893ec7e40 100644 --- a/gradle/licenseHeader.txt +++ b/gradle/licenseHeader.txt @@ -1,13 +1,2 @@ -Copyright ${year} the original author or authors. -

-Licensed under the Moderne Source Available License (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -

-https://docs.moderne.io/licensing/moderne-source-available-license -

-Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file +Licensed under the Moderne Source Available License. +See https://docs.moderne.io/licensing/moderne-source-available-license diff --git a/metrics/build.gradle.kts b/metrics/build.gradle.kts index 58afc3566..4b1deedbf 100755 --- a/metrics/build.gradle.kts +++ b/metrics/build.gradle.kts @@ -1,3 +1,5 @@ +import org.gradle.api.publish.maven.internal.publication.DefaultMavenPom + plugins { `groovy-gradle-plugin` } @@ -40,3 +42,18 @@ dependencies { exclude(group = "org.codehaus.groovy") } } + +publishing { + publications.withType(MavenPublication::class) { + pom { + licenses { + this as DefaultMavenPom + licenses.clear() + license { + name.set("Moderne Source Available License") + url.set("https://docs.moderne.io/licensing/moderne-source-available-license") + } + } + } + } +} diff --git a/plugin/build.gradle.kts b/plugin/build.gradle.kts index 74d852787..a0a766ffb 100644 --- a/plugin/build.gradle.kts +++ b/plugin/build.gradle.kts @@ -1,6 +1,6 @@ @file:Suppress("UnstableApiUsage") -import nl.javadude.gradle.plugins.license.LicenseExtension +import org.gradle.api.publish.maven.internal.publication.DefaultMavenPom import org.gradle.rewrite.build.GradleVersionData import org.gradle.rewrite.build.GradleVersionsCommandLineArgumentProvider import org.jetbrains.kotlin.gradle.tasks.KotlinCompile @@ -206,7 +206,7 @@ tasks.named("check").configure { dependsOn(testGradle4) } -configure { +license { ext.set("year", Calendar.getInstance().get(Calendar.YEAR)) skipExistingHeaders = true header = project.rootProject.file("gradle/licenseHeader.txt") @@ -215,3 +215,18 @@ configure { exclude("**/versions.properties") exclude("**/*.txt") } + +publishing { + publications.withType(MavenPublication::class) { + pom { + licenses { + this as DefaultMavenPom + licenses.clear() + license { + name.set("Moderne Source Available License") + url.set("https://docs.moderne.io/licensing/moderne-source-available-license") + } + } + } + } +} diff --git a/settings.gradle.kts b/settings.gradle.kts index 0b1b2bb06..776f714e1 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,3 +1,10 @@ +pluginManagement { + repositories { + mavenLocal() + gradlePluginPortal() + } +} + rootProject.name = "rewrite-gradle-plugin" include("plugin")