-
-
Save billmote/cedf1e2771613ac36009 to your computer and use it in GitHub Desktop.
Using the local.properties file of an Android Studio project to select the latest BuildTools version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.library' | |
android { | |
compileSdkVersion 'Google Inc.:Google APIs:22' | |
Properties localProps = new Properties() | |
localProps.load(new FileInputStream(file('../local.properties'))) | |
def buildToolVer = file("${localProps['sdk.dir']}/build-tools/").listFiles().sort().reverse().first().name; | |
buildToolsVersion buildToolVer; | |
defaultConfig { | |
minSdkVersion 16 | |
targetSdkVersion 22 | |
} | |
buildTypes { | |
release { | |
minifyEnabled false | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' | |
} | |
} | |
publishNonDefault true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment