diff --git a/build.gradle b/build.gradle index bc3aef5a4..64c8ed305 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,7 @@ +/* + * Root project for xtext-core. + */ + ext.buildTime = new java.text.SimpleDateFormat('yyyyMMdd-HHmm').format(new Date()) subprojects { diff --git a/gradle/developers.gradle b/gradle/developers.gradle index 7143585c8..d10cdd290 100644 --- a/gradle/developers.gradle +++ b/gradle/developers.gradle @@ -1,3 +1,7 @@ +/* + * Information on Xtext developers used in generated pom files for Maven publishing. + */ + project { developers { developer { diff --git a/gradle/eclipse-project-layout.gradle b/gradle/eclipse-project-layout.gradle index 5d2e48d1c..db5c40c15 100644 --- a/gradle/eclipse-project-layout.gradle +++ b/gradle/eclipse-project-layout.gradle @@ -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') diff --git a/gradle/java-compiler-settings.gradle b/gradle/java-compiler-settings.gradle index 073fa273c..72d77c2aa 100644 --- a/gradle/java-compiler-settings.gradle +++ b/gradle/java-compiler-settings.gradle @@ -1,3 +1,7 @@ +/* + * Configuration of Java compiler, Javadoc, and additional dependency configurations. + */ + plugins.withType(JavaBasePlugin) { sourceCompatibility = '1.8' } diff --git a/gradle/manifest-gen.gradle b/gradle/manifest-gen.gradle index 53abb32e4..6ef8c64e0 100644 --- a/gradle/manifest-gen.gradle +++ b/gradle/manifest-gen.gradle @@ -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) diff --git a/gradle/maven-deployment.gradle b/gradle/maven-deployment.gradle index 3366beb5b..155f4b439 100644 --- a/gradle/maven-deployment.gradle +++ b/gradle/maven-deployment.gradle @@ -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) - } - -} \ No newline at end of file +} diff --git a/gradle/upstream-repositories.gradle b/gradle/upstream-repositories.gradle index 8302e4cdb..f0f2bf36f 100644 --- a/gradle/upstream-repositories.gradle +++ b/gradle/upstream-repositories.gradle @@ -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='. + */ + if (!hasProperty('upstreamBranch')) ext.upstreamBranch = 'master' def jenkinsRepo = { jobName -> "http://services.typefox.io/open-source/jenkins/job/$jobName/lastStableBuild/artifact/build/maven-repository/" } diff --git a/gradle/versions.gradle b/gradle/versions.gradle index fb3843d75..0df348fd5 100644 --- a/gradle/versions.gradle +++ b/gradle/versions.gradle @@ -1,3 +1,7 @@ +/* + * Base project version and versions of common dependencies. + */ + version = '2.11.0-SNAPSHOT' ext.versions = [