Added generator for p2 repo build

This commit is contained in:
Miro Spönemann 2016-11-23 14:37:56 +01:00
parent 9246a048b7
commit 5e4738ba2e
3 changed files with 37 additions and 5 deletions

View file

@ -2,27 +2,37 @@
* Root project for xtext-core.
*/
buildscript {
repositories.mavenLocal()
dependencies {
classpath 'io.typefox:p2-repo-gen:0.1.0'
}
}
apply from: "${rootDir}/gradle/versions.gradle"
apply from: "${rootDir}/gradle/p2-deployment.gradle"
ext.buildTime = new java.text.SimpleDateFormat('yyyyMMdd-HHmm').format(new Date())
subprojects {
group = 'org.eclipse.xtext'
version = rootProject.version
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply from: "${rootDir}/gradle/upstream-repositories.gradle"
apply from: "${rootDir}/gradle/versions.gradle"
apply from: "${rootDir}/gradle/java-compiler-settings.gradle"
apply from: "${rootDir}/gradle/maven-deployment.gradle"
apply from: "${rootDir}/gradle/eclipse-project-layout.gradle"
apply from: "${rootDir}/gradle/manifest-gen.gradle"
apply from: "${rootDir}/gradle/validation.gradle"
group = 'org.eclipse.xtext'
}
task cleanLocalMavenRepo(type: Delete) {
group = 'Upload'
description = 'Delete the local Maven repository'
group 'Build'
description 'Deletes the local Maven repository'
delete 'build/maven-repository'
}

View file

@ -3,6 +3,8 @@
*/
task sourcesJar(type: Jar, dependsOn: classes) {
group 'Build'
description 'Assembles a jar archive containing the sources.'
classifier = 'sources'
from sourceSets.main.allSource
from ('.') {
@ -12,6 +14,8 @@ task sourcesJar(type: Jar, dependsOn: classes) {
artifacts.archives sourcesJar
task javadocJar(type: Jar, dependsOn: javadoc) {
group 'Build'
description 'Assembles a jar archive containing the JavaDoc output.'
classifier = 'javadoc'
from javadoc.destinationDir
}

View file

@ -0,0 +1,18 @@
/*
* The p2gen plugin generates a Tycho build that assembles a p2 repository.
* The generator task should be rerun whenever necessary, e.g. when the version changes.
*/
apply plugin: 'io.typefox.p2gen'
group = 'org.eclipse.xtext'
p2gen {
targetRepository {
location "http://download.eclipse.org/modeling/tmf/xtext/updates/releases/${versions.xtext_bootstrap}/"
unit 'org.eclipse.xtext.sdk.feature.group'
}
targetRepository {
location 'http://download.eclipse.org/releases/luna/201502271000/'
}
}