mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 08:18:55 +00:00
[build] Added descriptions of common build files, removed remote publishing config
Signed-off-by: Miro Spönemann <miro.spoenemann@typefox.io>
This commit is contained in:
parent
af2abe4e54
commit
0ae96db5c9
8 changed files with 36 additions and 43 deletions
|
@ -1,3 +1,7 @@
|
|||
/*
|
||||
* Root project for xtext-core.
|
||||
*/
|
||||
|
||||
ext.buildTime = new java.text.SimpleDateFormat('yyyyMMdd-HHmm').format(new Date())
|
||||
|
||||
subprojects {
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/*
|
||||
* Information on Xtext developers used in generated pom files for Maven publishing.
|
||||
*/
|
||||
|
||||
project {
|
||||
developers {
|
||||
developer {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/*
|
||||
* Since we use the Eclipse Style layout where sources and resources
|
||||
* live in the same folders, we need to make some adjustments to Gradle'
|
||||
* defaults.
|
||||
* Since we use the Eclipse Style layout where sources and resources live in the same
|
||||
* folders, we need to make some adjustments to Gradle's defaults.
|
||||
*/
|
||||
|
||||
def isTestProject = name.endsWith('tests')
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/*
|
||||
* Configuration of Java compiler, Javadoc, and additional dependency configurations.
|
||||
*/
|
||||
|
||||
plugins.withType(JavaBasePlugin) {
|
||||
sourceCompatibility = '1.8'
|
||||
}
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
/*
|
||||
* The MANIFEST.MF files of this project are maintained manually. We have to make sure
|
||||
* that the Bundle-Version entries have the current timestamp in their qualifier using
|
||||
* the same format as generated by Tycho for Eclipse plug-ins. We also have to generate
|
||||
* a proper MANIFEST.MF for the source bundles.
|
||||
*/
|
||||
|
||||
def baseVersion = project.version
|
||||
if (baseVersion.endsWith('-SNAPSHOT'))
|
||||
baseVersion = baseVersion.substring(0, baseVersion.length() - 9)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
//------------------------------------------------------
|
||||
// Create additional sources and Javadoc artifacts
|
||||
/*
|
||||
* Configuration of artifacts to be deployed in Maven repositories.
|
||||
*/
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = 'sources'
|
||||
|
@ -15,23 +16,7 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
|
|||
from javadoc.destinationDir
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
// Sign the artifacts if the signing info is complete
|
||||
|
||||
apply plugin: 'signing'
|
||||
signing {
|
||||
required { gradle.taskGraph.hasTask('uploadArchives') }
|
||||
sign configurations.archives
|
||||
}
|
||||
if (!project.hasProperty('signing.secretKeyRingFile') || !project.property('signing.secretKeyRingFile')
|
||||
|| !project.hasProperty('signing.keyId') || !project.property('signing.keyId')
|
||||
|| !project.hasProperty('signing.password') || !project.property('signing.password')) {
|
||||
signArchives.enabled = false
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
// Configuration function for generated POMs
|
||||
|
||||
def configurePom = { pom ->
|
||||
pom.project {
|
||||
if (project.hasProperty('title')) {
|
||||
|
@ -59,9 +44,6 @@ def configurePom = { pom ->
|
|||
// so we can use the title and description settings for setting up Maven publishing.
|
||||
afterEvaluate {
|
||||
|
||||
//------------------------------------------------------
|
||||
// Task for copying to a local Maven repository
|
||||
|
||||
task createLocalMavenRepo(type: Upload) {
|
||||
group = 'Upload'
|
||||
description = 'Create or update the local Maven repository'
|
||||
|
@ -72,22 +54,4 @@ afterEvaluate {
|
|||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
// Task for uploading to a remote Maven repository
|
||||
|
||||
uploadArchives.repositories.mavenDeployer {
|
||||
beforeDeployment { deployment -> signing.signPom(deployment) }
|
||||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
|
||||
if (project.hasProperty('sonatypeUserName') && project.hasProperty('sonatypePassword')) {
|
||||
authentication(userName: sonatypeUserName, password: sonatypePassword)
|
||||
}
|
||||
}
|
||||
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
|
||||
if (project.hasProperty('sonatypeUserName') && project.hasProperty('sonatypePassword')) {
|
||||
authentication(userName: sonatypeUserName, password: sonatypePassword)
|
||||
}
|
||||
}
|
||||
configurePom(pom)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
/*
|
||||
* The build uses either public snapshots or branch-specific repositories on the Jenkins
|
||||
* build server as upstream repositories. Use the argument '-PuseJenkinsSnapshots=true'
|
||||
* to enable the Jenkins repositories. In this case you can select an upstream branch
|
||||
* with the argument '-PupstreamBranch=<branch name>'.
|
||||
*/
|
||||
|
||||
if (!hasProperty('upstreamBranch'))
|
||||
ext.upstreamBranch = 'master'
|
||||
def jenkinsRepo = { jobName -> "http://services.typefox.io/open-source/jenkins/job/$jobName/lastStableBuild/artifact/build/maven-repository/" }
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/*
|
||||
* Base project version and versions of common dependencies.
|
||||
*/
|
||||
|
||||
version = '2.11.0-SNAPSHOT'
|
||||
|
||||
ext.versions = [
|
||||
|
|
Loading…
Reference in a new issue