Gradle - Command Line Arguments

1

I have a question about how to pass an argument on the command line where I will pass the NDK path of my Android project.

I have locally my local.properties file where I define the path in ndk.dir, however there is the problem when this project goes to the integration server continues, because I do not version this file because of the local configuration of each machine.

I tried to add manually in the Path of the integration server, but it did not work, so I believe that passing the NDK Path as an argument when running the script in Jenkins is the most viable option currently.

So I would like to know if there is a possibility of passing the NDK as an argument when running the Gradle build.

    
asked by anonymous 12.05.2015 / 22:41

1 answer

0

The solution I did, and I believe to be the most elegant.

I set up a task in my build where I create the settings.properties file using the Groovy IO API, look for the NDK path in the OS and check if the file already exists or not. That way I'll call jenkins for this task and he'll run it.

    
19.06.2015 / 20:57