java - Gradle properties chosen based on build version used -
for android app, if build.gradle has 2 schemes, prod , qa, how can choose gradle_${chosen}.properties based on scheme? ie in build
prod { //use gradle_prod.properties } qa { //use gradle_qa.properties } if try like:
qa { processresources{ // ... } } i not find method processresources()...
you can use .properties file using like:
def properties props = new properties() def propfile = file('../filename.properties') if (propfile.canread()){ props.load(new fileinputstream(propfile)) xxx = file(props['my_key']) } instead if want use tasks defined in other .gradle files can use in file:
apply from: 'myfilename.gradle'
Comments
Post a Comment