diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index eece8e0f..6ed97560 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -10,9 +10,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: - node-version: '16.x' + node-version: '18.x' - name: Build website run: | diff --git a/app/build.gradle b/app/build.gradle index 44734271..436cf843 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -20,7 +20,13 @@ android { buildTypes { release { - minifyEnabled false + minifyEnabled true + shrinkResources true + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + debug { + minifyEnabled true + shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } @@ -28,6 +34,7 @@ android { compileOptions { sourceCompatibility JavaVersion.VERSION_11 targetCompatibility JavaVersion.VERSION_11 + coreLibraryDesugaringEnabled true } kotlinOptions { @@ -83,4 +90,5 @@ dependencies { implementation project(':timer-pingsender') testImplementation 'junit:junit:4.13.1' + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' } diff --git a/app/src/androidTest/java/com/gojek/courier/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/gojek/courier/ExampleInstrumentedTest.kt index e470851b..e69de29b 100644 --- a/app/src/androidTest/java/com/gojek/courier/ExampleInstrumentedTest.kt +++ b/app/src/androidTest/java/com/gojek/courier/ExampleInstrumentedTest.kt @@ -1,24 +0,0 @@ -package com.gojek.courier - -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.gojek.courier", appContext.packageName) - } -} diff --git a/courier/src/main/java/com/gojek/courier/utils/RuntimePlatform.kt b/courier/src/main/java/com/gojek/courier/utils/RuntimePlatform.kt index f6b5e019..2504d943 100644 --- a/courier/src/main/java/com/gojek/courier/utils/RuntimePlatform.kt +++ b/courier/src/main/java/com/gojek/courier/utils/RuntimePlatform.kt @@ -1,7 +1,10 @@ package com.gojek.courier.utils +import android.os.Build.VERSION +import android.os.Build.VERSION_CODES import java.lang.invoke.MethodHandles.Lookup import java.lang.reflect.Method +import java.util.Optional internal sealed class RuntimePlatform { @@ -49,4 +52,4 @@ internal sealed class RuntimePlatform { Default() } } -} +} \ No newline at end of file