Skip to content

Commit

Permalink
Update licensing
Browse files Browse the repository at this point in the history
  • Loading branch information
sambsnyd committed Dec 19, 2024
1 parent d3705fb commit 9bb47bd
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 16 deletions.
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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<nebula.plugin.release.git.base.ReleasePluginExtension> {
Expand Down
15 changes: 2 additions & 13 deletions gradle/licenseHeader.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,2 @@
Copyright ${year} the original author or authors.
<p>
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
<p>
https://docs.moderne.io/licensing/moderne-source-available-license
<p>
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.
Licensed under the Moderne Source Available License.
See https://docs.moderne.io/licensing/moderne-source-available-license
17 changes: 17 additions & 0 deletions metrics/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.gradle.api.publish.maven.internal.publication.DefaultMavenPom

plugins {
`groovy-gradle-plugin`
}
Expand Down Expand Up @@ -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")
}
}
}
}
}
19 changes: 17 additions & 2 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -206,7 +206,7 @@ tasks.named("check").configure {
dependsOn(testGradle4)
}

configure<LicenseExtension> {
license {
ext.set("year", Calendar.getInstance().get(Calendar.YEAR))
skipExistingHeaders = true
header = project.rootProject.file("gradle/licenseHeader.txt")
Expand All @@ -215,3 +215,18 @@ configure<LicenseExtension> {
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")
}
}
}
}
}
7 changes: 7 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
}
}

rootProject.name = "rewrite-gradle-plugin"

include("plugin")
Expand Down

0 comments on commit 9bb47bd

Please sign in to comment.