diff --git a/.gitignore b/.gitignore index b2dc3af..bcaf8b5 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,4 @@ .externalNativeBuild .cxx local.properties -/keystore.jks +keystore.jks diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 6168e3f..5c66500 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -7,6 +7,15 @@ android { namespace = "com.henryhiles.qscan" compileSdk = 33 + signingConfigs { + create("release") { + storeFile = file("${rootDir}/keystore.jks") + keyPassword = System.getenv("KEY_PASSWORD") + keyAlias = "key0" + storePassword = System.getenv("STORE_PASSWORD") + } + } + defaultConfig { applicationId = "com.henryhiles.qscan" minSdk = 29 @@ -14,7 +23,6 @@ android { versionCode = 1 versionName = "1.0" - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { useSupportLibrary = true } @@ -23,6 +31,8 @@ android { buildTypes { named("release") { isMinifyEnabled = true + isShrinkResources = true + signingConfig = signingConfigs.getByName("release") setProguardFiles( listOf( getDefaultProguardFile("proguard-android-optimize.txt"), @@ -31,7 +41,6 @@ android { ) } named("debug") { - isMinifyEnabled = false applicationIdSuffix = ".debug" } } diff --git a/app/src/androidTest/java/com/henryhiles/qscan/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/henryhiles/qscan/ExampleInstrumentedTest.kt deleted file mode 100644 index 090e67c..0000000 --- a/app/src/androidTest/java/com/henryhiles/qscan/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.henryhiles.qscan - -import androidx.test.platform.app.InstrumentationRegistry -import androidx.test.ext.junit.runners.AndroidJUnit4 - -import org.junit.Test -import org.junit.runner.RunWith - -import org.junit.Assert.* - -/** - * Instrumented test, which will execute on an Android device. - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("com.henryhiles.qscan", appContext.packageName) - } -} \ No newline at end of file