You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@edgent.apache.org by dl...@apache.org on 2016/08/29 13:38:49 UTC
[1/4] incubator-edgent git commit: add maven reop support for gradle
Repository: incubator-edgent
Updated Branches:
refs/heads/master fa16203b5 -> c64a1c812
add maven reop support for gradle
Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/4adaaedb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/4adaaedb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/4adaaedb
Branch: refs/heads/master
Commit: 4adaaedbbd7e17e3ceb32d82787d53022723c1b5
Parents: 50df358
Author: Yaoliang Chen <ya...@cn.ibm.com>
Authored: Mon Aug 15 14:40:22 2016 +0800
Committer: Yaoliang Chen <ya...@cn.ibm.com>
Committed: Mon Aug 15 14:40:22 2016 +0800
----------------------------------------------------------------------
build.gradle | 45 ++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 42 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/4adaaedb/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 65aba44..95586ec 100644
--- a/build.gradle
+++ b/build.gradle
@@ -25,6 +25,21 @@ allprojects {
}
}
+/* SET PROJECT INFO for all artifacts */
+assert hasProperty('version') // See version in gradle.properties.
+System.out.println("version=${version}")
+group = 'org.apache.edgent'
+
+def getDate() {
+ if (!hasProperty('buildDate') || buildDate == null) {
+ ext.buildDate = new java.util.Date().format('yyyyMMddHHmm');
+ }
+ return ext.buildDate;
+}
+
+getDate();
+
+
ext {
commithash = {
try {
@@ -47,9 +62,10 @@ ext {
/* Configure subprojects */
subprojects {
-
+ apply plugin: 'maven-publish'
apply plugin: "jacoco"
-
+ ext.artifact = project.name
+
if (buildFile.isFile() && !buildFile.exists()) {
configurations.create('default')
return
@@ -133,6 +149,13 @@ subprojects {
configure jarOptions
}
+ task sourceJar(type: Jar) {
+ // baseName-appendix-version-classifier.extension
+ from sourceSets.main.allJava
+ classifier = 'sources'
+ }
+
+
task copyJar(type: Copy) {
def projectGroup = "$project.group".replace("edgent.", "")
@@ -159,6 +182,22 @@ subprojects {
}
}
+ publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifactId = artifact
+ artifact sourceJar
+ //artifact javadocJar
+ //artifact testJar
+ pom.withXml {
+ // Example of appending more information to pom.
+ //asNode().appendNode('description', 'A demonstration of Maven POM customization')
+ }
+ }
+ }
+ }
+
copyJar.dependsOn assemble
build.dependsOn copyJar
}
@@ -376,4 +415,4 @@ build.finalizedBy aggregateJavadoc
task wrapper(type: Wrapper) {
jarFile = rootProject.file('.gradle-wrapper/gradle-wrapper.jar')
-}
\ No newline at end of file
+}
[3/4] incubator-edgent git commit: Merge branch 'master' of
https://github.com/apache/incubator-edgent
Posted by dl...@apache.org.
Merge branch 'master' of https://github.com/apache/incubator-edgent
Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/5477795e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/5477795e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/5477795e
Branch: refs/heads/master
Commit: 5477795e0807554895d6b0f1401b982edfd236bf
Parents: 6606e62 fa16203
Author: Yaoliang Chen <ya...@cn.ibm.com>
Authored: Thu Aug 18 22:24:44 2016 +0800
Committer: Yaoliang Chen <ya...@cn.ibm.com>
Committed: Thu Aug 18 22:24:44 2016 +0800
----------------------------------------------------------------------
DEVELOPMENT.md | 36 ++++++++
build.gradle | 247 +++++++++++++++++++++++++++++++++++++++++----------
settings.gradle | 4 +
3 files changed, 242 insertions(+), 45 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/5477795e/build.gradle
----------------------------------------------------------------------
diff --cc build.gradle
index dc2f973,eefae3c..0258f68
--- a/build.gradle
+++ b/build.gradle
@@@ -25,22 -27,10 +27,25 @@@ allprojects
}
}
+ apply plugin: 'java'
+
+/* SET PROJECT INFO for all artifacts */
+assert hasProperty('version') // See version in gradle.properties.
+System.out.println("version=${version}")
+group = 'org.apache.edgent'
+
+def getDate() {
+ if (!hasProperty('buildDate') || buildDate == null) {
+ ext.buildDate = new java.util.Date().format('yyyyMMddHHmm');
+ }
+ return ext.buildDate;
+}
+
+getDate();
+
+
ext {
+ commithash_error = ''
commithash = {
try {
return "git rev-parse --short HEAD".execute().text.trim()
@@@ -62,10 -67,15 +82,17 @@@
/* Configure subprojects */
subprojects {
+
+ // ignore aggregator only projects so we don't assemble empty jars, etc for them.
+ if (aggregatorOnlyProjects.contains(project.path)) {
+ return
+ }
+
+ apply plugin: 'maven-publish'
+ apply plugin: 'java'
apply plugin: "jacoco"
-
+ ext.artifact = project.name
+
if (buildFile.isFile() && !buildFile.exists()) {
configurations.create('default')
return
@@@ -149,14 -165,8 +182,15 @@@
configure jarOptions
}
+ task sourceJar(type: Jar) {
+ // baseName-appendix-version-classifier.extension
+ from sourceSets.main.allJava
+ classifier = 'sources'
+ }
+
+
task copyJar(type: Copy) {
+ description = "Copy subproject's assembled artifacts to target_dir (implicitly builds jars due to 'from jar')"
def projectGroup = "$project.group".replace("edgent.", "")
if (["api", "providers", "runtime", "spi"].contains(projectGroup)) {
@@@ -169,44 -182,40 +206,54 @@@
rename("$jar.archiveName", "$jar.baseName.$jar.extension")
//Copy Sample SRC to dist
- copy {
- into "${rootProject.ext.target_java8_dir}/" + projectGroup + "/src/$project.name/src/main/java/"
- from(sourceSets.main.allSource.srcDirs) {
- include '**/*.java'
+ doLast {
+ copy {
+ from(sourceSets.main.allSource.srcDirs) { include '**/*.java' }
+ into "${rootProject.ext.target_java8_dir}/$projectGroup/src/$project.name/src/main/java/"
}
}
- } else {
+ }
+ else {
+ // println "copyJar(cfg) other $project.group $projectGroup $project.name $jar.archiveName"
from jar
- into "${rootProject.ext.target_java8_dir}/" + projectGroup + "/$project.name".replaceAll(":", "/") + "/lib"
+ into "${rootProject.ext.target_java8_dir}/$projectGroup/$project.name/lib"
rename("$jar.archiveName", "$jar.baseName.$jar.extension")
+
+ // Copy console.war (should be more general but this works for now)
+ if (projectGroup == 'console' && project.name == 'servlets') {
+ doLast {
+ copy {
+ from war
+ into "${rootProject.ext.target_java8_dir}/$projectGroup/webapps"
+ }
+ }
+ }
}
}
+
+ publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifactId = artifact
+ artifact sourceJar
+ //artifact javadocJar
+ //artifact testJar
+ pom.withXml {
+ }
+ }
+ }
+ }
-
- copyJar.dependsOn assemble
- build.dependsOn copyJar
+
+ // assemble: inject updating target_dir
+ assemble.finalizedBy copyJar
}
- task copyScript {
- copy {
- includeEmptyDirs = false
- from "scripts/"
- into "${rootProject.ext.target_java8_dir}/scripts/"
- include "**/*"
- }
+ task copyScripts(type: Copy) {
+ description = 'Copy scripts to target_java8_dir'
+ includeEmptyDirs = false
+ from("scripts/") { include "**/*" }
+ into "${rootProject.ext.target_java8_dir}/scripts/"
}
//Create Junit Report
[4/4] incubator-edgent git commit: build gradle refine the group id &
artifacts names
Posted by dl...@apache.org.
build gradle refine the group id & artifacts names
Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/c64a1c81
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/c64a1c81
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/c64a1c81
Branch: refs/heads/master
Commit: c64a1c812242a5cdcf27f24aa03fc7bc48688cdf
Parents: 5477795
Author: Yaoliang Chen <ya...@cn.ibm.com>
Authored: Thu Aug 25 17:43:56 2016 +0800
Committer: Yaoliang Chen <ya...@cn.ibm.com>
Committed: Thu Aug 25 17:43:56 2016 +0800
----------------------------------------------------------------------
build.gradle | 30 ++++++++----------------------
1 file changed, 8 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/c64a1c81/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 0258f68..5a6d6e6 100644
--- a/build.gradle
+++ b/build.gradle
@@ -29,20 +29,6 @@ allprojects {
apply plugin: 'java'
-/* SET PROJECT INFO for all artifacts */
-assert hasProperty('version') // See version in gradle.properties.
-System.out.println("version=${version}")
-group = 'org.apache.edgent'
-
-def getDate() {
- if (!hasProperty('buildDate') || buildDate == null) {
- ext.buildDate = new java.util.Date().format('yyyyMMddHHmm');
- }
- return ext.buildDate;
-}
-
-getDate();
-
ext {
commithash_error = ''
@@ -92,7 +78,8 @@ subprojects {
apply plugin: 'java'
apply plugin: "jacoco"
ext.artifact = project.name
-
+ //group = 'org.apache.edgent'
+
if (buildFile.isFile() && !buildFile.exists()) {
configurations.create('default')
return
@@ -234,13 +221,12 @@ subprojects {
publishing {
publications {
mavenJava(MavenPublication) {
- from components.java
- artifactId = artifact
+ groupId "org.apache.edgent"
+ artifactId "$project.group".replace("edgent.", "") + "." + artifact
+ version build_version
artifact sourceJar
- //artifact javadocJar
- //artifact testJar
- pom.withXml {
- }
+
+ from components.java
}
}
}
@@ -570,4 +556,4 @@ build {
task wrapper(type: Wrapper) {
jarFile = rootProject.file('.gradle-wrapper/gradle-wrapper.jar')
-}
\ No newline at end of file
+}
[2/4] incubator-edgent git commit: formatting build.gradle
Posted by dl...@apache.org.
formatting build.gradle
Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/6606e62f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/6606e62f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/6606e62f
Branch: refs/heads/master
Commit: 6606e62fa4d4d1e97eb573c0efca9a0ca0b179a2
Parents: 4adaaed
Author: Yaoliang Chen <ya...@cn.ibm.com>
Authored: Mon Aug 15 14:46:09 2016 +0800
Committer: Yaoliang Chen <ya...@cn.ibm.com>
Committed: Mon Aug 15 14:46:09 2016 +0800
----------------------------------------------------------------------
build.gradle | 38 ++++++++++++++++++--------------------
1 file changed, 18 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/6606e62f/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 95586ec..dc2f973 100644
--- a/build.gradle
+++ b/build.gradle
@@ -31,10 +31,10 @@ System.out.println("version=${version}")
group = 'org.apache.edgent'
def getDate() {
- if (!hasProperty('buildDate') || buildDate == null) {
- ext.buildDate = new java.util.Date().format('yyyyMMddHHmm');
- }
- return ext.buildDate;
+ if (!hasProperty('buildDate') || buildDate == null) {
+ ext.buildDate = new java.util.Date().format('yyyyMMddHHmm');
+ }
+ return ext.buildDate;
}
getDate();
@@ -150,9 +150,9 @@ subprojects {
}
task sourceJar(type: Jar) {
- // baseName-appendix-version-classifier.extension
- from sourceSets.main.allJava
- classifier = 'sources'
+ // baseName-appendix-version-classifier.extension
+ from sourceSets.main.allJava
+ classifier = 'sources'
}
@@ -183,19 +183,17 @@ subprojects {
}
publishing {
- publications {
- mavenJava(MavenPublication) {
- from components.java
- artifactId = artifact
- artifact sourceJar
- //artifact javadocJar
- //artifact testJar
- pom.withXml {
- // Example of appending more information to pom.
- //asNode().appendNode('description', 'A demonstration of Maven POM customization')
- }
- }
- }
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifactId = artifact
+ artifact sourceJar
+ //artifact javadocJar
+ //artifact testJar
+ pom.withXml {
+ }
+ }
+ }
}
copyJar.dependsOn assemble