info: java: upgrade workspace
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 20 Mar 2019 08:22:16 +0000 (09:22 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 20 Mar 2019 08:43:10 +0000 (09:43 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
12 files changed:
lib/info.java/build.gradle
lib/info.java/cnf/ext/maven-workspace.mvn
lib/info.java/cnf/gradle/dependencies/biz.aQute.bnd.gradle/biz.aQute.bnd.gradle-4.1.0.jar [deleted file]
lib/info.java/cnf/gradle/dependencies/biz.aQute.bnd.gradle/biz.aQute.bnd.gradle-4.2.0.jar [new file with mode: 0644]
lib/info.java/cnf/gradle/dependencies/biz.aQute.bndlib/biz.aQute.bndlib-4.2.0.jar [new file with mode: 0644]
lib/info.java/cnf/gradle/dependencies/biz.aQute.repository/biz.aQute.repository-4.2.0.jar [new file with mode: 0644]
lib/info.java/cnf/gradle/dependencies/biz.aQute.resolve/biz.aQute.resolve-4.2.0.jar [new file with mode: 0644]
lib/info.java/cnf/gradle/doc/CHANGELOG.md
lib/info.java/cnf/gradle/template/init.gradle
lib/info.java/cnf/gradle/template/javaProject.gradle
lib/info.java/cnf/gradle/template/master.gradle
lib/info.java/gradle.properties

index 8b326ba..b3401fe 100644 (file)
@@ -10,7 +10,7 @@
 /* Setup the build dependencies */
 buildscript {
   dependencies {
-    classpath files(bndURI) + bndBuildDependencies
+    classpath files(bndURIs) + bndBuildDependencies
   }
 }
 
index 5056382..ec8f661 100644 (file)
@@ -2,4 +2,7 @@
 # For the workspace
 #
 
-biz.aQute.bnd:biz.aQute.bnd.gradle:4.1.0
+biz.aQute.bnd:biz.aQute.bnd.gradle:4.2.0
+biz.aQute.bnd:biz.aQute.bndlib:4.2.0
+biz.aQute.bnd:biz.aQute.repository:4.2.0
+biz.aQute.bnd:biz.aQute.resolve:4.2.0
diff --git a/lib/info.java/cnf/gradle/dependencies/biz.aQute.bnd.gradle/biz.aQute.bnd.gradle-4.1.0.jar b/lib/info.java/cnf/gradle/dependencies/biz.aQute.bnd.gradle/biz.aQute.bnd.gradle-4.1.0.jar
deleted file mode 100644 (file)
index 7e255bd..0000000
Binary files a/lib/info.java/cnf/gradle/dependencies/biz.aQute.bnd.gradle/biz.aQute.bnd.gradle-4.1.0.jar and /dev/null differ
diff --git a/lib/info.java/cnf/gradle/dependencies/biz.aQute.bnd.gradle/biz.aQute.bnd.gradle-4.2.0.jar b/lib/info.java/cnf/gradle/dependencies/biz.aQute.bnd.gradle/biz.aQute.bnd.gradle-4.2.0.jar
new file mode 100644 (file)
index 0000000..5320d10
Binary files /dev/null and b/lib/info.java/cnf/gradle/dependencies/biz.aQute.bnd.gradle/biz.aQute.bnd.gradle-4.2.0.jar differ
diff --git a/lib/info.java/cnf/gradle/dependencies/biz.aQute.bndlib/biz.aQute.bndlib-4.2.0.jar b/lib/info.java/cnf/gradle/dependencies/biz.aQute.bndlib/biz.aQute.bndlib-4.2.0.jar
new file mode 100644 (file)
index 0000000..bc854d4
Binary files /dev/null and b/lib/info.java/cnf/gradle/dependencies/biz.aQute.bndlib/biz.aQute.bndlib-4.2.0.jar differ
diff --git a/lib/info.java/cnf/gradle/dependencies/biz.aQute.repository/biz.aQute.repository-4.2.0.jar b/lib/info.java/cnf/gradle/dependencies/biz.aQute.repository/biz.aQute.repository-4.2.0.jar
new file mode 100644 (file)
index 0000000..b09a7a2
Binary files /dev/null and b/lib/info.java/cnf/gradle/dependencies/biz.aQute.repository/biz.aQute.repository-4.2.0.jar differ
diff --git a/lib/info.java/cnf/gradle/dependencies/biz.aQute.resolve/biz.aQute.resolve-4.2.0.jar b/lib/info.java/cnf/gradle/dependencies/biz.aQute.resolve/biz.aQute.resolve-4.2.0.jar
new file mode 100644 (file)
index 0000000..88a9f45
Binary files /dev/null and b/lib/info.java/cnf/gradle/dependencies/biz.aQute.resolve/biz.aQute.resolve-4.2.0.jar differ
index 4cdc116..8bd89de 100644 (file)
@@ -7,10 +7,16 @@ This workspace is compatible with all bndtools versions since 3.3.0.REL.
 
 # Update Log
 
-# Changes since bndtools 4.1.0 release
+# Changes since bndtools 4.2.0 release
 
 * this: -
 
+# Changes since bndtools 4.1.0 release
+
+* Fix the clean task
+* Update the jacoco version to 0.8.3
+* Most bundle versions were updated
+
 # Changes since bndtools 4.0.0 release
 
 * Indexing is now done through the Index task of the Bnd Gradle plugin
index 87d2642..82afb69 100644 (file)
@@ -19,27 +19,44 @@ import aQute.bnd.osgi.Constants
 /* Add bnd as a script dependency */
 buildscript {
   dependencies {
-    def bndURI = rootDir.toURI().resolve(bnd_jar)
-    if (bndURI.scheme != 'file') {
-      /* If not a local file, copy to a local file in cnf/cache */
-      def cnfCache = mkdir("${rootDir}/${bnd_cnf}/cache")
-      def bndJarFile = new File(cnfCache, 'biz.aQute.bnd.gradle.jar')
-      if (!bndJarFile.exists()) {
-        println "Downloading ${bndURI} to ${bndJarFile} ..."
-        bndURI.toURL().withInputStream { is ->
-          bndJarFile.withOutputStream { os ->
-            def bos = new BufferedOutputStream( os )
-            bos << is
+    bnd_jars = bnd_jars.trim()
+
+    def bndURIs = []
+    if (bnd_jars.empty) {
+      def tree = fileTree("${rootDir}/${bnd_cnf}/gradle/dependencies").matching {
+        include "**/*.jar"
+      }
+      for (f in tree.files.sort()) {
+        bndURIs += f.toURI()
+      }
+    } else {
+      def bndJars = bnd_jars.split('\\s*,\\s*')
+      for (bndJar in bndJars) {
+        def bndURI = rootDir.toURI().resolve(bndJar)
+        if (bndURI.scheme != 'file') {
+          /* If not a local file, copy to a local file in cnf/cache */
+          def cnfCache = mkdir("${rootDir}/${bnd_cnf}/cache")
+          def bndJarFile = new File(cnfCache, new File(bndURI.path).name)
+          if (!bndJarFile.exists()) {
+            println "Downloading ${bndURI}"
+            bndURI.toURL().withInputStream { is ->
+              bndJarFile.withOutputStream { os ->
+                def bos = new BufferedOutputStream( os )
+                bos << is
+              }
+            }
           }
+          bndURI = bndJarFile.toURI()
         }
+        bndURIs += bndURI
       }
-      bndURI = bndJarFile.toURI()
     }
-    classpath files(bndURI)
+
+    classpath files(bndURIs)
 
     /* After the rootProject is created, pass URI to projects */
     gradle.rootProject { rootProject ->
-      rootProject.ext.bndURI = bndURI
+      rootProject.ext.bndURIs = bndURIs
     }
   }
 }
index 016d5b6..c124b33 100644 (file)
@@ -25,8 +25,10 @@ apply from: rootProject.file("${rootProject.bnd_cnf}/gradle/template/jacoco.grad
 
 clean.doLast {
   sourceSets.each {
-    if (projectDir != it.output.classesDir) {
-      delete(it.output.classesDir)
+    for (d in it.output.classesDirs) {
+      if (projectDir != d) {
+        delete(d)
+      }
     }
     if (projectDir != it.output.resourcesDir) {
       delete(it.output.resourcesDir)
index 5c58340..d1c1e30 100644 (file)
@@ -10,7 +10,7 @@
  *
  * Called by build.gradle in the root of the workspace to configure the project set.
  *
- * Depends on bndURI and bndWorkspace properties set by settings.gradle.
+ * Depends on bndURIs and bndWorkspace properties set by settings.gradle.
  */
 
 import aQute.bnd.build.Workspace
@@ -20,7 +20,7 @@ import aQute.bnd.osgi.Constants
 /* Setup the build dependencies */
 buildscript {
   dependencies {
-    classpath files(bndURI) + bndBuildDependencies
+    classpath files(bndURIs) + bndBuildDependencies
   }
 }
 
@@ -28,7 +28,7 @@ buildscript {
 assert(project == rootProject             )
 assert(hasProperty('bnd_cnf'             ))
 assert(hasProperty('bndBuildDependencies'))
-assert(hasProperty('bndURI             ))
+assert(hasProperty('bndURIs'             ))
 assert(hasProperty('bndWorkspace'        ))
 
 
index 66d560a..3c717c9 100644 (file)
@@ -1,5 +1,6 @@
-# bnd_jar can also be a URL.
-bnd_jar=cnf/gradle/dependencies/biz.aQute.bnd.gradle/biz.aQute.bnd.gradle-4.1.0.jar
+# bnd_jars is a comma-separated list of files and/or URLs
+# when empty then all jars under cnf/gradle/dependencies are used
+bnd_jars=
 
 # Default gradle tasks to build for the root project (comma-separated)
 root_defaultTask=build