xtext-core/gradle/maven-deployment.gradle

46 lines
1.6 KiB
Groovy
Raw Permalink Normal View History

/*
2016-12-23 07:45:26 +00:00
* Configuration of deployment to Maven repositories.
*/
2016-06-15 09:03:53 +00:00
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:https://github.com/eclipse/${rootProject.name}.git"
developerConnection = "scm:git:https://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"
}
}
}