diff --git a/Dockerfile b/Dockerfile index 0e3f3ca6..3d4861c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ -FROM openjdk:11-jdk-slim AS build +FROM openjdk:17-jdk-slim AS build COPY . . RUN chmod +x ./gradlew RUN ./gradlew server:shadowJar -FROM openjdk:11-jdk-slim +FROM openjdk:17-jdk-slim ARG POSTGRES_PORT ARG POSTGRES_DB diff --git a/android-app/build.gradle.kts b/android-app/build.gradle.kts index 6db6d261..15725d51 100644 --- a/android-app/build.gradle.kts +++ b/android-app/build.gradle.kts @@ -22,35 +22,35 @@ android { } buildTypes { getByName("release") { - signingConfig isMinifyEnabled = true proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") } } compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } tasks.withType { kotlinOptions { - jvmTarget = "11" + jvmTarget = "17" } } } kotlin { - android() + jvmToolchain(17) + + androidTarget() + sourceSets { - named("androidMain") { - dependencies { - implementation(project(":shared")) - implementation(project(":shared-client")) - implementation(Dependencies.androidXActivity) - implementation(Dependencies.androidXActivityCompose) - implementation(Dependencies.androidGoogleMaterial) - implementation(Dependencies.essentyInstanceKeeper) - implementation(Dependencies.decompose) - } + androidMain.dependencies { + implementation(project(":shared")) + implementation(project(":shared-client")) + implementation(Dependencies.androidXActivity) + implementation(Dependencies.androidXActivityCompose) + implementation(Dependencies.decompose) + implementation("androidx.appcompat:appcompat:1.6.1") + implementation("androidx.appcompat:appcompat-resources:1.6.1") } } } diff --git a/android-app/src/androidMain/kotlin/ml/dev/kotlin/minigames/activity/MainActivity.kt b/android-app/src/androidMain/kotlin/ml/dev/kotlin/minigames/activity/MainActivity.kt index 4026602f..699680b2 100644 --- a/android-app/src/androidMain/kotlin/ml/dev/kotlin/minigames/activity/MainActivity.kt +++ b/android-app/src/androidMain/kotlin/ml/dev/kotlin/minigames/activity/MainActivity.kt @@ -2,14 +2,17 @@ package ml.dev.kotlin.minigames.activity import android.os.Bundle import androidx.activity.ComponentActivity -import com.arkivanov.essenty.backpressed.BackPressedHandler +import com.arkivanov.decompose.defaultComponentContext +import ml.dev.kotlin.minigames.shared.component.MiniGamesAppComponentContext +import ml.dev.kotlin.minigames.shared.component.MiniGamesAppComponentImpl import ml.dev.kotlin.minigames.shared.setMainAndroidApp class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - val backPressedHandler = BackPressedHandler(onBackPressedDispatcher) - setMainAndroidApp(backPressedHandler) + val appContext = MiniGamesAppComponentContext(applicationContext, window) + val component = MiniGamesAppComponentImpl(appContext, defaultComponentContext()) + setMainAndroidApp(component) } } diff --git a/android-app/src/androidMain/res/values/themes.xml b/android-app/src/androidMain/res/values/themes.xml index b5d6ced8..6ed03479 100644 --- a/android-app/src/androidMain/res/values/themes.xml +++ b/android-app/src/androidMain/res/values/themes.xml @@ -1,17 +1,8 @@ - + -