Customize the file names for launcher scripts generated by "Application" plugin


(Alex Sko) #1

“application” plugin generates “launcher.bat” and “launcher” scripts. it would be nice to customize these file names - say, “mylauncher.bat” and “mylauncher”.

this is what I have to do for now:

startScripts {
  doLast {
  .........
    ant.move(file: "build/scripts/launcher.bat", tofile: "build/scripts/" + LAUNCHER_FILE_NAME_WITHOUT_EXTENSION +".bat")
    ant.move(file: "build/scripts/launcher",
   tofile: "build/scripts/" + LAUNCHER_FILE_NAME_WITHOUT_EXTENSION)
  }
}
  distZip {
   .............
    into("$zipFileName/bin") {
        from 'build/scripts'
        include "*"
    }
  }