Skip to content

Commit

Permalink
Merge pull request #159 from uragiristereo/optional-keystore
Browse files Browse the repository at this point in the history
Make keystore optional
  • Loading branch information
amarullz authored Aug 6, 2024
2 parents 1640e77 + 347990b commit 8073a68
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,31 @@ android {
buildConfigField "long", "TIMESTAMP", System.currentTimeMillis() + "L"
setProperty("archivesBaseName", "animetv-" + versionName)
}

def keystoreFile = file('../keystore/debug.keystore')
def isKeystoreFileExists = keystoreFile.exists() && !keystoreFile.isDirectory()

buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.debug
if (isKeystoreFileExists) {
signingConfig signingConfigs.debug
}
}
debug {
minifyEnabled false
}
}
signingConfigs {
debug {
storeFile file('../keystore/debug.keystore')
storePassword "android"
keyAlias "androiddebugkey"
keyPassword "android"

if (isKeystoreFileExists) {
signingConfigs {
debug {
storeFile storeFile
storePassword "android"
keyAlias "androiddebugkey"
keyPassword "android"
}
}
}
}
Expand Down Expand Up @@ -62,4 +70,4 @@ dependencies {
implementation 'org.nanohttpd:nanohttpd:2.3.1'
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.20"
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.0"
}
}

0 comments on commit 8073a68

Please sign in to comment.