You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@edgent.apache.org by ca...@apache.org on 2016/05/19 09:31:27 UTC

[02/16] incubator-quarks git commit: Working api/api gradle build files

Working api/api gradle build files


Project: http://git-wip-us.apache.org/repos/asf/incubator-quarks/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quarks/commit/258e6906
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quarks/tree/258e6906
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quarks/diff/258e6906

Branch: refs/heads/gradle
Commit: 258e690663a431b12e0d0a4a562b4f47bf64d6a7
Parents: f68d40a
Author: Daniel J. Debrunner <de...@us.ibm.com>
Authored: Tue Apr 19 17:24:27 2016 -0700
Committer: Daniel J. Debrunner <de...@us.ibm.com>
Committed: Wed May 18 09:59:23 2016 -0700

----------------------------------------------------------------------
 api/build.gradle          | 19 +++++++++++++++++--
 api/function/build.gradle | 25 +++++++++++++++++++++++++
 api/oplet/build.gradle    |  3 +--
 build.gradle              | 22 ++++++++++++++--------
 spi/build.gradle          | 18 ++++++++++++++++--
 5 files changed, 73 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quarks/blob/258e6906/api/build.gradle
----------------------------------------------------------------------
diff --git a/api/build.gradle b/api/build.gradle
index b91f02f..611e8ca 100644
--- a/api/build.gradle
+++ b/api/build.gradle
@@ -3,7 +3,22 @@
 
 subprojects {
     jar {
-       baseName jarPrefix + 'api.' + project.name
-       destinationDir new File(targetj8, 'lib')
+      baseName jarPrefix + 'api.' + project.name
+      destinationDir new File(targetj8, 'lib')
+
+      // Temp to allow existing ant build to work
+      archiveName baseName + '.jar'
+    }
+
+    jar.doFirst {
+      manifest {
+        def manifestCp = configurations.qext.files.collect  {
+        File file = it
+          "../ext/${file.name}"
+          }.join(' ')
+        
+         manifestCp += configurations.compile.copy().collect() { it.getName() }.join(' ')
+         attributes 'Class-Path': manifestCp
+      }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-quarks/blob/258e6906/api/function/build.gradle
----------------------------------------------------------------------
diff --git a/api/function/build.gradle b/api/function/build.gradle
new file mode 100644
index 0000000..4afa2db
--- /dev/null
+++ b/api/function/build.gradle
@@ -0,0 +1,25 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements;
+// and to You under the Apache License, Version 2.0.
+
+dependencies {
+  compile configurations.qext
+}
+
+//jar {
+//  manifest {
+//   def manifestCp = configurations.qext.files.collect  {
+//     File file = it
+//        "../ext/${file.name}"
+//        }.join(' ')
+//
+//   attributes 'Class-Path': manifestCp
+//  }
+//}
+
+task copyExt(type: Copy) {
+    from configurations.qext
+    into new File(targetj8, 'ext')
+}
+
+
+build.dependsOn(copyExt)

http://git-wip-us.apache.org/repos/asf/incubator-quarks/blob/258e6906/api/oplet/build.gradle
----------------------------------------------------------------------
diff --git a/api/oplet/build.gradle b/api/oplet/build.gradle
index c63bba2..f52651d 100644
--- a/api/oplet/build.gradle
+++ b/api/oplet/build.gradle
@@ -2,6 +2,5 @@
 // and to You under the Apache License, Version 2.0.
 
 dependencies {
-    compile project(':api:function'), project(':api:window'),
-            project(':api:execution')
+    compile project(':api:window'), project(':api:execution')
 }

http://git-wip-us.apache.org/repos/asf/incubator-quarks/blob/258e6906/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 4f76ba9..cdfa5c4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,13 +1,14 @@
 // Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements;
 // and to You under the Apache License, Version 2.0.
 
+apply plugin: 'base' 
+
 ext {
    jarPrefix = 'quarks.'
    target = file('target')
    targetj8 = new File(target, 'java8')
 }
 
-
 subprojects {
     version = '0.5.0'
 
@@ -22,17 +23,22 @@ subprojects {
     }
 
     dependencies {
-       qext 'com.google.code.gson:gson:2.2.4'
-       compile configurations.qext
+       qext 'com.google.code.gson:gson:2.2.4',
+                    'org.slf4j:slf4j-api:1.7.12'
        testCompile 'junit:junit:4.12'
     }
 
-   task copyExt(type: Copy) {
-       from configurations.qext
-       into new File(targetj8, 'ext')
-   }
+task copy << {
+    //def manifestCp = ''
+    //configurations.compile.copy().allDependencies
+    //    .each { dep -> println dep.files }
+
+    println configurations.compile.copy().collect() { it.getName() }.join(' ')
+}
 
-   build.dependsOn(copyExt)
 } 
 
+clean.doFirst {
+    delete target
+}
 

http://git-wip-us.apache.org/repos/asf/incubator-quarks/blob/258e6906/spi/build.gradle
----------------------------------------------------------------------
diff --git a/spi/build.gradle b/spi/build.gradle
index ac6f17b..484c109 100644
--- a/spi/build.gradle
+++ b/spi/build.gradle
@@ -3,7 +3,21 @@
 
 subprojects {
     jar {
-       baseName jarPrefix + 'spi.' + project.name
-       destinationDir new File(targetj8, 'lib')
+      baseName jarPrefix + 'spi.' + project.name
+      destinationDir new File(targetj8, 'lib')
+
+      // Temp to allow existing ant build to work
+      archiveName baseName + '.jar'
+    }
+    jar.doFirst {
+      manifest {
+        def manifestCp = configurations.qext.files.collect  {
+        File file = it
+          "../ext/${file.name}"
+          }.join(' ')
+        
+         manifestCp += configurations.compile.copy().collect() { it.getName() }.join(' ')
+         attributes 'Class-Path': manifestCp
+      }
     }
 }