38 lines
1.1 KiB
Groovy
38 lines
1.1 KiB
Groovy
apply plugin: 'com.android.library'
|
|
/*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
// must be applied after your artifact generating plugin (eg. java / com.android.library)
|
|
//apply plugin: 'bintray-release'
|
|
|
|
// query git for the the SHA, Tag and commit count. Use these to automate versioning.
|
|
def gitTag = 'git describe --tags'.execute([], project.rootDir).text.trim()
|
|
def gitCommitCount =
|
|
Integer.parseInt('git rev-list --count HEAD'.execute([], project.rootDir).text.trim())
|
|
|
|
android {
|
|
compileSdkVersion 24
|
|
buildToolsVersion "23.0.3"
|
|
|
|
defaultConfig {
|
|
minSdkVersion 9
|
|
targetSdkVersion 23
|
|
versionCode gitCommitCount
|
|
versionName gitTag
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compile fileTree(dir: 'libs', include: ['*.jar'])
|
|
compile 'com.android.support:appcompat-v7:24.2.1'
|
|
compile 'com.android.support:support-v4:24.2.1'
|
|
compile 'com.android.support:recyclerview-v7:24.2.1'
|
|
|
|
testCompile 'junit:junit:4.12'
|
|
}
|
|
|
|
|