[go: nahoru, domu]

Adjust prebuiltJar gradle task in tools/swt to match tools/base.

Change-Id: I7927a56ab0ef1a0892f1373fecee97d71f26fdbc
diff --git a/build.gradle b/build.gradle
index 43e4d04..0c47647 100644
--- a/build.gradle
+++ b/build.gradle
@@ -15,7 +15,7 @@
     return baseVersion + '-SNAPSHOT'
 }
 
-subprojects {
+subprojects { Project project ->
     // Change buildDir first so that all plugins pick up the new value.
     project.buildDir = project.file("$project.parent.buildDir/../$project.name")
 
@@ -74,15 +74,9 @@
         from(sourceSets.main.output)
     }
 
-    task distZip(type: Zip) {
-        from(prebuiltJar) {
-            rename "(.*)-${project.version}-.*.jar", '$1.jar'
-        }
-        from(project.configurations.runtime) {
-            rename "(.*)-${project.version}-.*.jar", '$1.jar'
-        }
-
-        archiveName archivesBaseName + ".zip"
+    if (project.hasProperty("prebuiltPath")) {
+        prebuiltJar.destinationDir file(prebuiltPath)
+        prebuiltJar.archiveName project.archivesBaseName + ".jar"
     }
 
     // delay computing the manifest classpath only if the