Use gradle install*executable task output directory for zip file distribution


(Kapil Jain) #1

In gradle native usage, for each executable binary, gradle creates a install(binaryName)Executable task. When we run this task, it creates an install folder with all dependency of the binary packaged with a wrapper script to run the binary. I want to run this task during package task.
I tried following :
task package()
{
dependsOn subprojects.tasks.hello
}

Where there is a default defn for hello for each subproject. And the project where i generate a binary , i override the hello defn as follows :
task hello( overwrite: true) {
dependsOn installMyBinaryExecutable
}

However this does not work as it says no such task as installMyBinaryExecutable
It seems as gradle creates this task on the fly, its not able to find this task in initial parse.

Can someone help me to find correct way to deploy the generated wrapper so i dont have to write a custom wrapper of my own to run the executable