Skip to content

Commit

Permalink
Merge pull request #188 from usefulness/mateuszkwiecinski-patch-1
Browse files Browse the repository at this point in the history
Bundle LICENSE file
  • Loading branch information
mateuszkwiecinski authored Mar 3, 2024
2 parents 54fc37d + d2ca0e6 commit c784ef3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gradle/plugins/src/main/kotlin/PublishingPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import org.gradle.api.plugins.ExtensionContainer
import org.gradle.api.plugins.JavaPluginExtension
import org.gradle.api.publish.PublishingExtension
import org.gradle.api.publish.maven.MavenPublication
import org.gradle.language.jvm.tasks.ProcessResources
import org.gradle.plugin.devel.GradlePluginDevelopmentExtension
import org.gradle.plugins.signing.SigningExtension

Expand Down Expand Up @@ -60,6 +61,9 @@ class PublishingPlugin : Plugin<Project> {
extensions.configure<JavaPluginExtension> {
withSourcesJar()
}
tasks.named("processResources", ProcessResources::class.java) { processResources ->
processResources.from(rootProject.file("LICENSE"))
}
extensions.configure<PublishingExtension> {
publications.configureEach { publication ->
(publication as? MavenPublication)?.pom { pom ->
Expand All @@ -68,7 +72,7 @@ class PublishingPlugin : Plugin<Project> {
pom.url.set("https://github.com/usefulness/ktlint-gradle-plugin")
pom.licenses { licenses ->
licenses.license { license ->
license.name.set("The Apache Software License, Version 2.0")
license.name.set("Apache-2.0")
license.url.set("https://github.com/usefulness/ktlint-gradle-plugin/blob/master/LICENSE")
}
}
Expand Down

0 comments on commit c784ef3

Please sign in to comment.