Skip to content

Commit

Permalink
build: set apache license in mvn artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
benedekh committed Jun 24, 2024
1 parent 9645b18 commit 90b75a2
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,29 @@ allprojects {
}
}
}

// Set maven metadata for all known publishing tasks. The exact tasks and names are only known after evaluation.
afterEvaluate {
tasks.withType<AbstractPublishToMaven>() {
this.publication?.apply {
setMetadata()
}
}
}
}

fun MavenPublication.setMetadata() {
pom {
url.set("https://github.com/modelix/modelix.incremental")
scm {
connection.set("scm:git:https://github.com/modelix/modelix.incremental.git")
url.set("https://github.com/modelix/modelix.incremental")
}
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
}
}

0 comments on commit 90b75a2

Please sign in to comment.