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:52 UTC

[4/4] incubator-edgent git commit: build gradle refine the group id & artifacts names

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
+}