diff options
author | Jan Belle | 2018-11-23 11:13:23 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2018-11-23 11:13:23 +0000 |
commit | 4c57977d9e3f098ffae44ee5f3373878b351feca (patch) | |
tree | 3d5ab48374c13f3121ab26f75e341a97e1ae3458 | |
parent | 944241699bad336221c7407b3b4afb0b7b029efe (diff) | |
parent | 417a5beb1a6b5dbfd4fee5deac656e3bc0e50907 (diff) | |
download | org.eclipse.etrice-4c57977d9e3f098ffae44ee5f3373878b351feca.tar.gz org.eclipse.etrice-4c57977d9e3f098ffae44ee5f3373878b351feca.tar.xz org.eclipse.etrice-4c57977d9e3f098ffae44ee5f3373878b351feca.zip |
Merge "[releng] Implement Gradle task for build artifact promotion"
-rw-r--r-- | build.gradle | 3 | ||||
-rw-r--r-- | gradle/scmVersion.gradle | 4 | ||||
-rw-r--r-- | plugins/org.eclipse.etrice.generator.c/build.gradle | 8 | ||||
-rw-r--r-- | plugins/org.eclipse.etrice.generator.cpp/build.gradle | 8 | ||||
-rw-r--r-- | plugins/org.eclipse.etrice.generator.doc/build.gradle | 16 | ||||
-rw-r--r-- | plugins/org.eclipse.etrice.generator.java/build.gradle | 8 | ||||
-rw-r--r-- | releng/org.eclipse.etrice.parent/pom.xml | 3 | ||||
-rw-r--r-- | releng/org.eclipse.etrice.parent/pom_old.xml | 344 | ||||
-rw-r--r-- | releng/org.eclipse.etrice.releng/build.gradle | 32 | ||||
-rw-r--r-- | releng/org.eclipse.etrice.site/build.gradle | 8 | ||||
-rw-r--r-- | settings.gradle | 5 |
11 files changed, 90 insertions, 349 deletions
diff --git a/build.gradle b/build.gradle index 12ea6a7b3..76fb31e0f 100644 --- a/build.gradle +++ b/build.gradle @@ -3,9 +3,10 @@ plugins { } apply from: "$rootDir/gradle/scmVersion.gradle" +apply from: "$rootDir/gradle/versions.gradle" allprojects { - apply from: "$rootDir/gradle/versions.gradle" + apply plugin: 'base' group = 'org.eclipse.etrice' version = scmVersion.version diff --git a/gradle/scmVersion.gradle b/gradle/scmVersion.gradle index 71726d505..b416d4e7f 100644 --- a/gradle/scmVersion.gradle +++ b/gradle/scmVersion.gradle @@ -9,6 +9,10 @@ buildscript { apply plugin: pl.allegro.tech.build.axion.release.ReleasePlugin +if(properties.get('build.type') == 'N') { + ext.set('release.forceSnapshot', true) +} + scmVersion { tag { prefix = 'v' diff --git a/plugins/org.eclipse.etrice.generator.c/build.gradle b/plugins/org.eclipse.etrice.generator.c/build.gradle index 0f35e7672..f2ade81db 100644 --- a/plugins/org.eclipse.etrice.generator.c/build.gradle +++ b/plugins/org.eclipse.etrice.generator.c/build.gradle @@ -1,5 +1,9 @@ apply plugin: 'application' +configurations { + archive +} + dependencies { compile project(':plugins:org.eclipse.etrice.core.room') compile project(':plugins:org.eclipse.etrice.core.etphys') @@ -15,6 +19,10 @@ dependencies { compile "org.eclipse.xtext:org.eclipse.xtext:$versions.xtext" } +artifacts { + archive distZip +} + mainClassName = 'org.eclipse.etrice.generator.c.Main' distTar.enabled = false
\ No newline at end of file diff --git a/plugins/org.eclipse.etrice.generator.cpp/build.gradle b/plugins/org.eclipse.etrice.generator.cpp/build.gradle index 14b1fa305..f6ce27b2e 100644 --- a/plugins/org.eclipse.etrice.generator.cpp/build.gradle +++ b/plugins/org.eclipse.etrice.generator.cpp/build.gradle @@ -1,5 +1,9 @@ apply plugin: 'application' +configurations { + archive +} + dependencies { compile project(':plugins:org.eclipse.etrice.core.room') compile project(':plugins:org.eclipse.etrice.core.etphys') @@ -14,6 +18,10 @@ dependencies { compile "org.eclipse.xtext:org.eclipse.xtext:$versions.xtext" } +artifacts { + archive distZip +} + mainClassName = 'org.eclipse.etrice.generator.cpp.Main' distTar.enabled = false
\ No newline at end of file diff --git a/plugins/org.eclipse.etrice.generator.doc/build.gradle b/plugins/org.eclipse.etrice.generator.doc/build.gradle index f9280e812..32bcd95f7 100644 --- a/plugins/org.eclipse.etrice.generator.doc/build.gradle +++ b/plugins/org.eclipse.etrice.generator.doc/build.gradle @@ -1,3 +1,9 @@ +apply plugin: 'application' + +configurations { + archive +} + dependencies { compile project(':plugins:org.eclipse.etrice.core.etmap') compile project(':plugins:org.eclipse.etrice.core.genmodel') @@ -6,4 +12,12 @@ dependencies { compile project(':plugins:org.eclipse.etrice.generator.fsm') compile "org.eclipse.xtend:org.eclipse.xtend.lib:$versions.xtext" -}
\ No newline at end of file +} + +artifacts { + archive distZip +} + +mainClassName = 'org.eclipse.etrice.generator.doc.Main' + +distTar.enabled = false
\ No newline at end of file diff --git a/plugins/org.eclipse.etrice.generator.java/build.gradle b/plugins/org.eclipse.etrice.generator.java/build.gradle index d33e68f29..3427182d0 100644 --- a/plugins/org.eclipse.etrice.generator.java/build.gradle +++ b/plugins/org.eclipse.etrice.generator.java/build.gradle @@ -1,5 +1,9 @@ apply plugin: 'application' +configurations { + archive +} + dependencies { compile project(':plugins:org.eclipse.etrice.core.room') compile project(':plugins:org.eclipse.etrice.core.etphys') @@ -14,6 +18,10 @@ dependencies { compile "org.eclipse.xtext:org.eclipse.xtext:$versions.xtext" } +artifacts { + archive distZip +} + mainClassName = 'org.eclipse.etrice.generator.java.Main' distTar.enabled = false
\ No newline at end of file diff --git a/releng/org.eclipse.etrice.parent/pom.xml b/releng/org.eclipse.etrice.parent/pom.xml index 105bd74ec..ebd4060c9 100644 --- a/releng/org.eclipse.etrice.parent/pom.xml +++ b/releng/org.eclipse.etrice.parent/pom.xml @@ -33,7 +33,6 @@ <cbi.url>https://repo.eclipse.org/content/repositories/cbi-releases</cbi.url> <etrice.url>http://download.eclipse.org/etrice/updates/nightly</etrice.url> - <build.alias></build.alias> <build.type>N</build.type> </properties> @@ -111,7 +110,7 @@ </dependency> </dependencies> <configuration> - <format>'${build.alias}${build.type}'yyyyMMddHHmm</format> + <format>'${build.type}'yyyyMMddHHmm</format> <timestampProvider>jgit</timestampProvider> <jgit.dirtyWorkingTree>warning</jgit.dirtyWorkingTree> </configuration> diff --git a/releng/org.eclipse.etrice.parent/pom_old.xml b/releng/org.eclipse.etrice.parent/pom_old.xml deleted file mode 100644 index 1eb825362..000000000 --- a/releng/org.eclipse.etrice.parent/pom_old.xml +++ /dev/null @@ -1,344 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" - xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <modelVersion>4.0.0</modelVersion> - - <groupId>org.eclipse.etrice</groupId> - <artifactId>java-generator</artifactId> - <version>1.1.1-SNAPSHOT</version> - <packaging>pom</packaging> - - <name>eTrice Java generator</name> - - <description>code generator from ROOM (Real-Time Object Oriented Modeling) - models to the Java target language</description> - <url>http://eclipse.org/etrice</url> - <inceptionYear>2010</inceptionYear> - - <properties> - <project.build.sourceEncoding>Cp1252</project.build.sourceEncoding> - - <etrice.version>${project.version}</etrice.version> - - <tycho.version>0.19.0</tycho.version> - <tycho-extras.version>${tycho.version}</tycho-extras.version> - - <!-- eclipse version etrice is built against --> - <eclipse-repo.url>http://download.eclipse.org/releases/luna</eclipse-repo.url> - - <orbit-site>http://download.eclipse.org/tools/orbit/downloads/drops/R20130118183705/repository</orbit-site> - </properties> - - <organization> - <name>Protos Software GmbH</name> - <url>http://www.protos.de</url> - </organization> - - <licenses> - <license> - <name>Eclipse Public License - v 1.0</name> - <url>http://www.eclipse.org/legal/epl-v10.html</url> - </license> - </licenses> - - <issueManagement> - <system>Bugzilla</system> - <url>https://bugs.eclipse.org/bugs/enter_bug.cgi?product=eTrice</url> - </issueManagement> - - <ciManagement> - <system>Hudson</system> - <url>https://hudson.eclipse.org/etrice/job/etrice-maven3/</url> - </ciManagement> - - <scm> - <url>http://git.eclipse.org/c/etrice/org.eclipse.etrice.git/</url> - <connection>http://git.eclipse.org/gitroot/etrice/org.eclipse.etrice.git</connection> - <developerConnection>ssh://userid@git.eclipse.org/gitroot/etrice/org.eclipse.etrice.git</developerConnection> - </scm> - - <developers> - <developer> - <name>Thomas Schuetz</name> - </developer> - <developer> - <name>Henrik Rentz-Reichert</name> - </developer> - <developer> - <name>Thomas Jung</name> - </developer> - <developer> - <name>Juergen Haug</name> - </developer> - <developer> - <name>Eyrak Paen</name> - </developer> - <developer> - <name>Peter Karlitschek</name> - </developer> - </developers> - - <repositories> - <repository> - <id>eclipse</id> - <layout>p2</layout> - <url>${eclipse-repo.url}</url> - </repository> - <repository> - <id>orbit</id> - <layout>p2</layout> - <url>${orbit-site}</url> - </repository> - <repository> - <id>repository.jboss.org-public</id> - <name>JBoss.org Maven repository</name> - <url>https://repository.jboss.org/nexus/content/groups/public</url> - </repository> - </repositories> - - <pluginRepositories> - <pluginRepository> - <id>repo.eclipse.org.cbi-releases</id> - <url>https://repo.eclipse.org/content/repositories/cbi-releases/</url> - </pluginRepository> - </pluginRepositories> - - <modules> - <module>../../plugins/org.eclipse.etrice.core.common</module> - <module>../../plugins/org.eclipse.etrice.core.fsm</module> - <module>../../plugins/org.eclipse.etrice.core.room</module> - <module>../../plugins/org.eclipse.etrice.core.config</module> - <module>../../plugins/org.eclipse.etrice.core.etphys</module> - <module>../../plugins/org.eclipse.etrice.core.etmap</module> - <module>../../plugins/org.eclipse.etrice.core.genmodel.fsm</module> - <module>../../plugins/org.eclipse.etrice.core.genmodel</module> - <module>../../plugins/org.eclipse.etrice.generator.fsm</module> - <module>../../plugins/org.eclipse.etrice.generator</module> - <module>../../plugins/org.eclipse.etrice.generator.config</module> - <module>../../plugins/org.eclipse.etrice.generator.doc</module> - <module>../../plugins/org.eclipse.etrice.generator.java</module> - <module>../../plugins/org.eclipse.etrice.generator.java.mvn</module> - <module>../../runtime/org.eclipse.etrice.modellib.java</module> - <module>../../runtime/org.eclipse.etrice.runtime.java</module> - </modules> - - <profiles> - <profile> - <id>fast</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - </profile> - <profile> - <id>full</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-source-plugin</artifactId> - <version>2.2.1</version> - <executions> - <execution> - <id>attach-sources</id> - <goals> - <goal>jar</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>2.9.1</version> - <configuration> - <tags> - <tag> - <name>generated</name> - <placement>a</placement> - <head>Generated:</head> - </tag> - <tag> - <name>ordered</name> - <placement>X</placement> - <head>Ordered:</head> - </tag> - <tag> - <name>model</name> - <placement>X</placement> - <head>Model:</head> - </tag> - <tag> - <name>parameter</name> - <placement>X</placement> - <head>Parameter:</head> - </tag> - </tags> - </configuration> - <executions> - <execution> - <id>attach-javadocs</id> - <goals> - <goal>jar</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> - - <build> - <plugins> - <plugin> - <groupId>org.eclipse.tycho</groupId> - <artifactId>tycho-maven-plugin</artifactId> - <version>${tycho.version}</version> - <extensions>true</extensions> - </plugin> - </plugins> - <pluginManagement> - <plugins> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.1</version> - <configuration> - <source>1.6</source> - <target>1.6</target> - </configuration> - </plugin> - <plugin> - <groupId>org.eclipse.tycho</groupId> - <artifactId>target-platform-configuration</artifactId> - <version>${tycho.version}</version> - </plugin> - <plugin> - <groupId>org.eclipse.tycho</groupId> - <artifactId>tycho-compiler-plugin</artifactId> - <version>${tycho.version}</version> - <configuration> - <excludeResources> - <!-- avoid error markers in the target folder by excluding ecore models --> - <excludeResource>**/*.ecore</excludeResource> - </excludeResources> - <compilerArguments> - <enableJavadoc /> - <encoding>ISO-8859-1</encoding> - </compilerArguments> - </configuration> - </plugin> - <plugin> - <groupId>org.eclipse.tycho</groupId> - <artifactId>tycho-packaging-plugin</artifactId> - <version>${tycho.version}</version> - <dependencies> - <dependency> - <groupId>org.eclipse.tycho.extras</groupId> - <artifactId>tycho-buildtimestamp-jgit</artifactId> - <version>${tycho-extras.version}</version> - </dependency> - </dependencies> - <configuration> - <strictBinIncludes>false</strictBinIncludes> - <format>'v'yyyyMMdd-HHmm</format> - <timestampProvider>jgit</timestampProvider> - <jgit.ignore> - </jgit.ignore> - </configuration> - </plugin> - <plugin> - <groupId>org.eclipse.tycho</groupId> - <artifactId>tycho-p2-director-plugin</artifactId> - <version>${tycho.version}</version> - </plugin> - <plugin> - <groupId>org.eclipse.tycho</groupId> - <artifactId>tycho-p2-repository-plugin</artifactId> - <version>${tycho.version}</version> - </plugin> - <plugin> - <groupId>org.eclipse.tycho</groupId> - <artifactId>tycho-p2-plugin</artifactId> - <version>${tycho.version}</version> - <configuration> - <baselineMode>warn</baselineMode> - <baselineReplace>none</baselineReplace> - <baselineRepositories> - <repository> - <url>http://download.eclipse.org/eclipse/updates/4.2</url> - </repository> - </baselineRepositories> - </configuration> - </plugin> - <!--This plugin's configuration is used to store Eclipse m2e settings - only. It has no influence on the Maven build itself. --> - <plugin> - <groupId>org.eclipse.m2e</groupId> - <artifactId>lifecycle-mapping</artifactId> - <version>1.0.0</version> - <configuration> - <lifecycleMappingMetadata> - <pluginExecutions> - <pluginExecution> - <pluginExecutionFilter> - <groupId> - org.eclipse.tycho - </groupId> - <artifactId> - tycho-packaging-plugin - </artifactId> - <versionRange> - [0.19.0,) - </versionRange> - <goals> - <goal>validate-id</goal> - <goal>validate-version</goal> - <goal>build-qualifier</goal> - </goals> - </pluginExecutionFilter> - <action> - <ignore></ignore> - </action> - </pluginExecution> - <pluginExecution> - <pluginExecutionFilter> - <groupId> - org.eclipse.tycho - </groupId> - <artifactId> - tycho-compiler-plugin - </artifactId> - <versionRange> - [0.19.0,) - </versionRange> - <goals> - <goal>compile</goal> - </goals> - </pluginExecutionFilter> - <action> - <ignore></ignore> - </action> - </pluginExecution> - </pluginExecutions> - </lifecycleMappingMetadata> - </configuration> - </plugin> - </plugins> - </pluginManagement> - </build> - - <distributionManagement> - <repository> - <id>repo.eclipse.org</id> - <name>eTrice Repository - Releases</name> - <url>https://repo.eclipse.org/content/repositories/etrice-releases/</url> - </repository> - <snapshotRepository> - <id>repo.eclipse.org</id> - <name>eTrice Repository - Snapshots</name> - <url>https://repo.eclipse.org/content/repositories/etrice-snapshots/</url> - <uniqueVersion>true</uniqueVersion> - </snapshotRepository> - </distributionManagement> -</project> diff --git a/releng/org.eclipse.etrice.releng/build.gradle b/releng/org.eclipse.etrice.releng/build.gradle new file mode 100644 index 000000000..3e75a363e --- /dev/null +++ b/releng/org.eclipse.etrice.releng/build.gradle @@ -0,0 +1,32 @@ +configurations { + archives + updates +} + +dependencies { + archives project(path: ':plugins:org.eclipse.etrice.generator.c', configuration: 'archive') + archives project(path: ':plugins:org.eclipse.etrice.generator.cpp', configuration: 'archive') + archives project(path: ':plugins:org.eclipse.etrice.generator.java', configuration: 'archive') + archives project(path: ':plugins:org.eclipse.etrice.generator.doc', configuration: 'archive') + + updates project(path: ':releng:org.eclipse.etrice.site', configuration: 'archive') +} + + +def downloadDir = '/home/data/httpd/download.eclipse.org/etrice' +// downloadDir = "$buildDir/download" +def versionDir = version +if(version.endsWith('SNAPSHOT')) { + versionDir = 'nightly' +} +def promoteDir = "$downloadDir/$versionDir" + +task promote(type: Sync) { + from([configurations.archives, configurations.updates]) { + into 'archives' + } + from(zipTree(configurations.updates.singleFile)) { + into 'updates' + } + into promoteDir +}
\ No newline at end of file diff --git a/releng/org.eclipse.etrice.site/build.gradle b/releng/org.eclipse.etrice.site/build.gradle new file mode 100644 index 000000000..cbec1e254 --- /dev/null +++ b/releng/org.eclipse.etrice.site/build.gradle @@ -0,0 +1,8 @@ +configurations { + archive +} + +artifacts { + archive fileTree(dir: 'target', include: 'org.eclipse.etrice.site-*.zip').singleFile +} + diff --git a/settings.gradle b/settings.gradle index 91bd36c77..ea23dae88 100644 --- a/settings.gradle +++ b/settings.gradle @@ -32,4 +32,7 @@ include 'plugins:org.eclipse.etrice.core.common', 'tests:org.eclipse.etrice.generator.common.tests', 'tests:org.eclipse.etrice.generator.c.tests', 'tests:org.eclipse.etrice.generator.cpp.tests', - 'tests:org.eclipse.etrice.generator.java.tests'
\ No newline at end of file + 'tests:org.eclipse.etrice.generator.java.tests', + + 'releng:org.eclipse.etrice.releng', + 'releng:org.eclipse.etrice.site'
\ No newline at end of file |