Skip to content

Commit

Permalink
yet another build script fix
Browse files Browse the repository at this point in the history
  • Loading branch information
senior-sigan committed Jan 24, 2016
1 parent 24242f7 commit 142cb29
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

def gitSha = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim()
def gitCommitCount =
Integer.parseInt('git rev-list --count HEAD'.execute([], project.rootDir).text.trim())

android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
Expand All @@ -18,8 +22,10 @@ android {
applicationId "org.seniorsigan.zkpauthenticatorclient"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
versionCode gitCommitCount
versionName "$gitCommitCount"
archivesBaseName = "zkpauth-$versionCode"
buildConfigField "String", "GIT_SHA", "\"${gitSha}\""
multiDexEnabled true
}
buildTypes {
Expand All @@ -31,6 +37,10 @@ android {
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}

ext {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-alpha7'
classpath 'com.android.tools.build:gradle:1.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down

0 comments on commit 142cb29

Please sign in to comment.