Currently, I have one gradle.properties
file. It configured specifically for CI with low available memory, because otherwise CI will crash
org.gradle.jvmargs=-Xmx1500m -XX:MaxPermSize=512m
However, when I make builds on the local machine it is very slow and local machine allows more memory use. Can I have separate gradle.properties
for CI and AndroidStudio?
Android Studio uses Gradle, an advanced build toolkit, to automate and manage the build process, while allowing you to define flexible custom build configurations. Each build configuration can define its own set of code and resources, while reusing the parts common to all versions of your app.
properties in the project folder or in the C:\Users\Username. gradle. Please make sure that the name of file is "gradle.
Android Studio comes with a working installation of Gradle, so you don't need to install Gradle separately in that case. In order to create a new build or add a Wrapper to an existing build, you will need to install Gradle according to these instructions.
According to the documentation, you can have multiple gradle.properties
files. One in your project directory and one in user home directory.
As it's said:
The configuration is applied in following order (if an option is configured in multiple locations the last one wins):
- from gradle.properties in project build dir.
- from gradle.properties in gradle user home.
In your case, you cam place CI-specific properties into the gradle.properties under user home on CI-server. This properties will be specific for CI-server and take over local properties stored under VCS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With