File tree Expand file tree Collapse file tree 3 files changed +30
-7
lines changed Expand file tree Collapse file tree 3 files changed +30
-7
lines changed Original file line number Diff line number Diff line change 11apply plugin : ' com.android.application'
22apply plugin : ' checkstyle'
33apply from : ' ../config/android-common.gradle'
4+ apply from : ' ../config/keystore.gradle'
45
56android {
67 defaultConfig {
@@ -14,6 +15,24 @@ android {
1415 ' appAuthRedirectScheme' : ' com.googleusercontent.apps.YOUR-ID'
1516 ]
1617 }
18+
19+ signingConfigs {
20+ debugAndRelease {
21+ storeFile file(" ${ rootDir} /appauth.keystore" )
22+ storePassword " appauth"
23+ keyAlias " appauth"
24+ keyPassword " appauth"
25+ }
26+ }
27+
28+ buildTypes {
29+ debug {
30+ signingConfig signingConfigs. debugAndRelease
31+ }
32+ release {
33+ signingConfig signingConfigs. debugAndRelease
34+ }
35+ }
1736}
1837
1938dependencies {
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ subprojects {
2323 }
2424}
2525
26+ ext. verifyKeystore()
27+
2628def grgit = org.ajoberstar.grgit.Grgit . open(dir : ' .' )
2729def lastCommit = grgit. head()
2830
@@ -38,8 +40,10 @@ project.ext.compileSdkVersion = 25
3840project. ext. buildToolsVersion = ' 25.0.1'
3941project. ext. supportLibVersion = ' 25.1.0'
4042
41- task showVersion << {
42- logger. lifecycle(" Version ID: " + project. versionNum)
43- logger. lifecycle(" Version Name: " + project. versionName)
44- logger. lifecycle(" Version Date: " + project. versionDate)
43+ task showVersion {
44+ doLast {
45+ logger. lifecycle(" Version ID: " + project. versionNum)
46+ logger. lifecycle(" Version Name: " + project. versionName)
47+ logger. lifecycle(" Version Date: " + project. versionDate)
48+ }
4549}
Original file line number Diff line number Diff line change 33def generateKeystore = { keystoreFile ->
44 exec {
55 executable " keytool"
6- args [
6+ args(
77 " -genkey" ,
88 " -keystore" , " appauth.keystore" ,
99 " -alias" , " appauth" ,
@@ -13,14 +13,14 @@ def generateKeystore = { keystoreFile ->
1313 " -keypass" , " appauth" ,
1414 " -storepass" , " appauth" ,
1515 " -dname" , " CN=appauth"
16- ]
16+ )
1717 }
1818}
1919
2020// checks that a keystore exists in the expected location, and generates one
2121// if it does not.
2222ext. verifyKeystore = {
23- def keystoreFile = file(new File (projectDir, " appauth.keystore" ) )
23+ def keystoreFile = file(" ${ rootDir } / appauth.keystore" )
2424 if (! keystoreFile. exists()) {
2525 logger. lifecycle(" appauth.keystore missing - creating one" )
2626 generateKeystore(keystoreFile)
You can’t perform that action at this time.
0 commit comments