mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 08:48:55 +00:00
43 lines
1.2 KiB
Groovy
43 lines
1.2 KiB
Groovy
/*
|
|
* Configuration of deployment to Maven repositories.
|
|
*/
|
|
|
|
// Configuration function for generated POMs
|
|
def configurePom = { pom ->
|
|
pom.project {
|
|
if (project.hasProperty('title')) {
|
|
name = project.title
|
|
description = project.description
|
|
}
|
|
packaging 'jar'
|
|
url 'https://www.eclipse.org/Xtext/'
|
|
licenses {
|
|
license {
|
|
name 'Eclipse Public License, Version 1.0'
|
|
url 'http://www.eclipse.org/legal/epl-v10.html'
|
|
}
|
|
}
|
|
scm {
|
|
connection "scm:git:git@github.com:eclipse/${rootProject.name}.git"
|
|
developerConnection "scm:git:git@github.com:eclipse/${rootProject.name}.git"
|
|
url "git@github.com:eclipse/${rootProject.name}.git"
|
|
}
|
|
}
|
|
apply from: "${rootDir}/gradle/developers.gradle", to: pom
|
|
}
|
|
|
|
// We need to wait until the project's own build file has been executed
|
|
// so we can use the title and description settings for setting up Maven publishing.
|
|
afterEvaluate {
|
|
|
|
task createLocalMavenRepo(type: Upload) {
|
|
group = 'Upload'
|
|
description = 'Create or update the local Maven repository'
|
|
configuration = configurations.archives
|
|
repositories.mavenDeployer {
|
|
repository(url: "file:" + file("${rootDir}/build/maven-repository"))
|
|
configurePom(pom)
|
|
}
|
|
}
|
|
|
|
}
|