Gradle - Command line arguments

Asked

Viewed 140 times

1

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

I have locally my local file.properties where I define the path in ndk.dir, but there is the problem when this project goes to the integration server continues, as I do not versioning this file for reasons of being local configuration of each machine.

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

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

  • Already tried using system properties?

1 answer

0


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

I set up a task in my build where I create the file Settings.properties using the Groovy IO API, search the NDK path in the OS and check whether the file already exists or not. That way I make the call in Jenkins for this task and he tells run.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.