Hi,
I wanted to add a custom script to gradle build job. So added the below to my build.gradle file as recommended in the Gradle Application file
task createStartScriptsForUpdate(type: CreateStartScripts) {
mainClassName = 'com.connector.AppUpdater'
applicationName = 'app_updater'
outputDir = new File(project.buildDir, 'scripts')
classpath = jar.outputs.files + project.configurations.runtime
}
//tasks.build.dependsOn 'createStartScriptsForUpdate'
applicationDistribution.into("bin") {
from(createStartScriptsForUpdate)
fileMode = 0755
}
But the script file gets added twice in the final zip file when I run gradle build. Can someone help me fix the problem? Thanks.
Gradle Version: 2.9
Operating System and JVM version: Mac OS X 10.11.6 x86_64, JVM version is 1.8
Thanks,
Leena