xtext-core/gradle/maven-deployment.gradle
Sven Efftinge f9b6d1bebe
[eclipse/xtext#1176] Migrate to EPL 2.0
Signed-off-by: Sven Efftinge <sven.efftinge@typefox.io>
Co-authored-by: Sebastian Zarnekow <Sebastian.Zarnekow@gmail.com>
2020-02-11 12:02:02 +01:00

45 lines
1.6 KiB
Groovy

/*
* Configuration of deployment to Maven repositories.
*/
def noJavaDoc = name.endsWith('tests') || name.contains('testlanguage')
publishing {
publications {
LocalMavenRepo(MavenPublication) {
from components.java
artifact sourcesJar
if (!noJavaDoc) {
artifact javadocJar
}
pom {
url = 'https://www.eclipse.org/Xtext/'
licenses {
license {
name = 'Eclipse Public License, Version 2.0'
url = 'http://www.eclipse.org/legal/epl-2.0'
}
}
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"
}
// 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 {
if (project.hasProperty('title')) {
name = project.title
description = project.description
}
}
}
apply from: "${rootDir}/gradle/developers.gradle", to: pom
}
}
repositories {
maven {
url = "$rootProject.buildDir/maven-repository"
}
}
}