Jelajahi Sumber

cleaned up some gradle warns

LH 6 tahun lalu
induk
melakukan
9d19ac5be8
3 mengubah file dengan 142 tambahan dan 137 penghapusan
  1. 21 20
      WPCMGr/build.gradle
  2. 61 59
      iZpl/build.gradle
  3. 60 58
      iZplPlugins/JukeBox/build.gradle

+ 21 - 20
WPCMGr/build.gradle

@@ -29,28 +29,29 @@ options.compilerArgs << '-Xlint:-deprecation'
 
 options.compilerArgs << '-XDignore.symbol.file'
 }
-startScripts << { 
+startScripts {
+    doLast {
+      def startScriptDir = outputDir.getAbsolutePath()
+      def winStartScript = startScriptDir + "/" + applicationName + ".bat"
+      def winStartScriptCopy = startScriptDir + "/" + applicationName + "c.bat"
+      def overwriteExistingFile = true
+      copyFile(winStartScript, winStartScriptCopy, overwriteExistingFile)
 
-  def startScriptDir = outputDir.getAbsolutePath()
-  def winStartScript = startScriptDir + "/" + applicationName + ".bat"
-  def winStartScriptCopy = startScriptDir + "/" + applicationName + "c.bat"
-  def overwriteExistingFile = true
-  copyFile(winStartScript, winStartScriptCopy, overwriteExistingFile)
-
-  modifyFile(winStartScript) {
-    // javaw.exe doesn't have a console
-    if(it.contains("java.exe")){
-      return it.replace("java.exe", "javaw.exe")
-    }
-    // Command that launches the app
-    else if(it.startsWith("\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS%")){
-      return "start \"\" /b " + it
+      modifyFile(winStartScript) {
+        // javaw.exe doesn't have a console
+        if(it.contains("java.exe")){
+          return it.replace("java.exe", "javaw.exe")
+        }
+        // Command that launches the app
+        else if(it.startsWith("\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS%")){
+          return "start \"\" /b " + it
+        }
+        // Leave the line unchanged
+        else{
+          return it
+        }
+      }
     }
-    // Leave the line unchanged
-    else{
-      return it
-    }
-  }
 }
 distZip {
   // Include the additional start script

+ 61 - 59
iZpl/build.gradle

@@ -23,67 +23,69 @@ jar{
     }
 }
 
-startScripts << { 
-  defaultJvmOpts = ["-Dlog4j.skipJansi=false"] // fahr zur hölle Log5J
-  def startScriptDir = outputDir.getAbsolutePath()
-  def winStartScript = startScriptDir + "/" + applicationName + ".bat"
-  def winStartScriptCopy = startScriptDir + "/" + applicationName + "c.bat"
-  def linuxStartScript = startScriptDir + "/" + applicationName
-  def overwriteExistingFile = true
-  copyFile(winStartScript, winStartScriptCopy, overwriteExistingFile)
+startScripts {
+    doLast {
+      defaultJvmOpts = ["-Dlog4j.skipJansi=false"] // fahr zur hölle Log5J
+      def startScriptDir = outputDir.getAbsolutePath()
+      def winStartScript = startScriptDir + "/" + applicationName + ".bat"
+      def winStartScriptCopy = startScriptDir + "/" + applicationName + "c.bat"
+      def linuxStartScript = startScriptDir + "/" + applicationName
+      def overwriteExistingFile = true
+      copyFile(winStartScript, winStartScriptCopy, overwriteExistingFile)
 
-  //:init
-  
-  modifyFile(winStartScript) {
-    // javaw.exe doesn't have a console
-    if(it.contains("java.exe")){
-      return it.replace("java.exe", "javaw.exe")
-    }
-    // Command that launches the app
-    else if(it.startsWith("\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS%")){
-      return "start \"\" /b " + it
-    }
-    else if (it.startsWith("set DEFAULT_JVM_OPTS="))
-    {
-        return it+" -Dlog4j.skipJansi=false"
-    }
-    else if(it.startsWith(":init"))
-    {
+      //:init
+      
+      modifyFile(winStartScript) {
+        // javaw.exe doesn't have a console
+        if(it.contains("java.exe")){
+          return it.replace("java.exe", "javaw.exe")
+        }
+        // Command that launches the app
+        else if(it.startsWith("\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS%")){
+          return "start \"\" /b " + it
+        }
+        else if (it.startsWith("set DEFAULT_JVM_OPTS="))
+        {
+            return it+" -Dlog4j.skipJansi=false"
+        }
+        else if(it.startsWith(":init"))
+        {
+            //HACK
+            return it+"\n"+"set VLC_PLUGIN_PATH=%APP_HOME%\\lib\\vlcbinaries\\plugins"
+        }
+        // Leave the line unchanged
+        else{
+          return it
+        }
+      }
+      
+        modifyFile(linuxStartScript) {
+        if (it.startsWith("DEFAULT_JVM_OPTS=\"\""))
+        {
+            return "DEFAULT_JVM_OPTS=\"-Dlog4j.skipJansi=false\""
+        }
+        // Leave the line unchanged
+        else{
+          return it
+        }
+      }
+      
+      modifyFile(winStartScriptCopy) {
+        if(it.startsWith(":init"))
+        {
         //HACK
-        return it+"\n"+"set VLC_PLUGIN_PATH=%APP_HOME%\\lib\\vlcbinaries\\plugins"
-    }
-    // Leave the line unchanged
-    else{
-      return it
-    }
-  }
-  
-    modifyFile(linuxStartScript) {
-    if (it.startsWith("DEFAULT_JVM_OPTS=\"\""))
-    {
-        return "DEFAULT_JVM_OPTS=\"-Dlog4j.skipJansi=false\""
-    }
-    // Leave the line unchanged
-    else{
-      return it
-    }
-  }
-  
-  modifyFile(winStartScriptCopy) {
-    if(it.startsWith(":init"))
-    {
-    //HACK
-        return it+"\n"+"set VLC_PLUGIN_PATH=%APP_HOME%\\lib\\vlcbinaries\\plugins" 
-    }
-    else if (it.startsWith("set DEFAULT_JVM_OPTS="))
-    {
-        return it+" -Dlog4j.skipJansi=false"
-    }
-    // Leave the line unchanged
-    else{
-      return it
+            return it+"\n"+"set VLC_PLUGIN_PATH=%APP_HOME%\\lib\\vlcbinaries\\plugins" 
+        }
+        else if (it.startsWith("set DEFAULT_JVM_OPTS="))
+        {
+            return it+" -Dlog4j.skipJansi=false"
+        }
+        // Leave the line unchanged
+        else{
+          return it
+        }
+      }
     }
-  }
 }
 distZip {
   // Include the additional start script
@@ -103,7 +105,7 @@ distZip {
 
 task apiJar(type: Jar, dependsOn: compileJava) {
  baseName = project.name + '-apistub'
- from sourceSets.main.output.classesDir
+ from sourceSets.main.output
  include '**/iZpl/API/*'
 }
 

+ 60 - 58
iZplPlugins/JukeBox/build.gradle

@@ -10,67 +10,69 @@ mainClassName = 'de.nplusc.izc.izpl.plugins.jukebox.StandaloneMain'
 //	//NO-OPtask als redirect
 //}
 
-startScripts << { 
-  defaultJvmOpts = ["-Dlog4j.skipJansi=false"] // fahr zur hölle Log5J
-  def startScriptDir = outputDir.getAbsolutePath()
-  def winStartScript = startScriptDir + "/" + applicationName + ".bat"
-  def winStartScriptCopy = startScriptDir + "/" + applicationName + "c.bat"
-  def linuxStartScript = startScriptDir + "/" + applicationName
-  def overwriteExistingFile = true
-  copyFile(winStartScript, winStartScriptCopy, overwriteExistingFile)
+startScripts {
+    doLast {
+      defaultJvmOpts = ["-Dlog4j.skipJansi=false"] // fahr zur hölle Log5J
+      def startScriptDir = outputDir.getAbsolutePath()
+      def winStartScript = startScriptDir + "/" + applicationName + ".bat"
+      def winStartScriptCopy = startScriptDir + "/" + applicationName + "c.bat"
+      def linuxStartScript = startScriptDir + "/" + applicationName
+      def overwriteExistingFile = true
+      copyFile(winStartScript, winStartScriptCopy, overwriteExistingFile)
 
-  //:init
-  
-  modifyFile(winStartScript) {
-    // javaw.exe doesn't have a console
-    if(it.contains("java.exe")){
-      return it.replace("java.exe", "javaw.exe")
-    }
-    // Command that launches the app
-    else if(it.startsWith("\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS%")){
-      return "start \"\" /b " + it
-    }
-    else if (it.startsWith("set DEFAULT_JVM_OPTS="))
-    {
-        return it+" -Dlog4j.skipJansi=false"
-    }
-    else if(it.startsWith(":init"))
-    {
+      //:init
+      
+      modifyFile(winStartScript) {
+        // javaw.exe doesn't have a console
+        if(it.contains("java.exe")){
+          return it.replace("java.exe", "javaw.exe")
+        }
+        // Command that launches the app
+        else if(it.startsWith("\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS%")){
+          return "start \"\" /b " + it
+        }
+        else if (it.startsWith("set DEFAULT_JVM_OPTS="))
+        {
+            return it+" -Dlog4j.skipJansi=false"
+        }
+        else if(it.startsWith(":init"))
+        {
+            //HACK
+            return it+"\n"+"set VLC_PLUGIN_PATH=%APP_HOME%\\lib\\vlcbinaries\\plugins"
+        }
+        // Leave the line unchanged
+        else{
+          return it
+        }
+      }
+      
+        modifyFile(linuxStartScript) {
+        if (it.startsWith("DEFAULT_JVM_OPTS=\"\""))
+        {
+            return "DEFAULT_JVM_OPTS=\"-Dlog4j.skipJansi=false\""
+        }
+        // Leave the line unchanged
+        else{
+          return it
+        }
+      }
+      
+      modifyFile(winStartScriptCopy) {
+        if(it.startsWith(":init"))
+        {
         //HACK
-        return it+"\n"+"set VLC_PLUGIN_PATH=%APP_HOME%\\lib\\vlcbinaries\\plugins"
-    }
-    // Leave the line unchanged
-    else{
-      return it
-    }
-  }
-  
-    modifyFile(linuxStartScript) {
-    if (it.startsWith("DEFAULT_JVM_OPTS=\"\""))
-    {
-        return "DEFAULT_JVM_OPTS=\"-Dlog4j.skipJansi=false\""
+            return it+"\n"+"set VLC_PLUGIN_PATH=%APP_HOME%\\lib\\vlcbinaries\\plugins" 
+        }
+        else if (it.startsWith("set DEFAULT_JVM_OPTS="))
+        {
+            return it+" -Dlog4j.skipJansi=false"
+        }
+        // Leave the line unchanged
+        else{
+          return it
+        }
+      }
     }
-    // Leave the line unchanged
-    else{
-      return it
-    }
-  }
-  
-  modifyFile(winStartScriptCopy) {
-    if(it.startsWith(":init"))
-    {
-    //HACK
-        return it+"\n"+"set VLC_PLUGIN_PATH=%APP_HOME%\\lib\\vlcbinaries\\plugins" 
-    }
-    else if (it.startsWith("set DEFAULT_JVM_OPTS="))
-    {
-        return it+" -Dlog4j.skipJansi=false"
-    }
-    // Leave the line unchanged
-    else{
-      return it
-    }
-  }
 }
 distZip {
   // Include the additional start script