aboutsummaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
Diffstat (limited to 'sample')
-rw-r--r--sample/build.gradle21
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt11
-rw-r--r--sample/src/main/res/values/strings_sample.xml1
3 files changed, 25 insertions, 8 deletions
diff --git a/sample/build.gradle b/sample/build.gradle
index fb55b94..d2572c3 100644
--- a/sample/build.gradle
+++ b/sample/build.gradle
@@ -32,9 +32,9 @@ android {
def releaseSigning = file("../files/kau.properties")
def hasSigning = releaseSigning.exists()
- if (hasSigning) {
- signingConfigs {
+ signingConfigs {
+ if (hasSigning) {
def releaseProps = new Properties()
releaseSigning.withInputStream { releaseProps.load(it) }
@@ -45,12 +45,29 @@ android {
keyPassword releaseProps.getProperty('keyPassword')
}
}
+
+ debug {
+ storeFile file("../files/debug.keystore")
+ storePassword "debugKey"
+ keyAlias "debugKey"
+ keyPassword "debugKey"
+ }
}
buildTypes {
+ debug {
+ minifyEnabled false
+ shrinkResources false
+ applicationIdSuffix ".debug"
+ versionNameSuffix "-debug"
+ signingConfig signingConfigs.debug
+ resValue "string", "app_name", "KAU Debug"
+ }
+
release {
minifyEnabled true
if (hasSigning) signingConfig signingConfigs.release
+ resValue "string", "app_name", "KAU"
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
index 0d2e5a3..b424e91 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
@@ -233,11 +233,12 @@ class MainActivity : KPrefActivity() {
this.navigationBarColor = KPrefSample.accentColor
if (KPrefSample.version < BuildConfig.VERSION_CODE) {
KPrefSample.version = BuildConfig.VERSION_CODE
- showChangelog(R.xml.kau_changelog, KPrefSample.textColor) {
- titleColor(KPrefSample.textColor)
- backgroundColor(KPrefSample.bgColor)
- positiveColor(KPrefSample.accentColor)
- }
+ if (!BuildConfig.DEBUG)
+ showChangelog(R.xml.kau_changelog, KPrefSample.textColor) {
+ titleColor(KPrefSample.textColor)
+ backgroundColor(KPrefSample.bgColor)
+ positiveColor(KPrefSample.accentColor)
+ }
}
supportActionBar?.apply {
setDisplayHomeAsUpEnabled(false)
diff --git a/sample/src/main/res/values/strings_sample.xml b/sample/src/main/res/values/strings_sample.xml
index 1e3361e..46a8140 100644
--- a/sample/src/main/res/values/strings_sample.xml
+++ b/sample/src/main/res/values/strings_sample.xml
@@ -1,5 +1,4 @@
<resources>
- <string name="app_name">KAU</string>
<string name="header">This is a header</string>
<string name="desc">This is a description</string>
<string name="checkbox_1">Checkbox 1</string>