Skip to content

Commit

Permalink
update dependencies versions
Browse files Browse the repository at this point in the history
  • Loading branch information
avan1235 committed Dec 30, 2023
1 parent 23d17c2 commit 53bc728
Show file tree
Hide file tree
Showing 124 changed files with 2,866 additions and 1,688 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
30 changes: 15 additions & 15 deletions android-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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<KotlinCompile> {
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")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
15 changes: 3 additions & 12 deletions android-app/src/androidMain/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<resources>

<style name="Theme.MiniGames" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<style name="Theme.MiniGames" parent="Theme.AppCompat.DayNight.DarkActionBar">

<item name="colorPrimary">@color/PrimaryColor</item>
<item name="colorPrimaryVariant">@color/PrimaryVariantColor</item>
<item name="colorOnPrimary">@color/OnPrimaryColor</item>

<item name="colorSecondary">@color/SecondaryColor</item>
<item name="colorSecondaryVariant">@color/SecondaryVariantColor</item>
<item name="colorOnSecondary">@color/OnSecondaryColor</item>
<item name="colorOnBackground">@color/OnBackgroundColor</item>

<item name="android:statusBarColor" tools:targetApi="l">@color/BackgroundColor</item>
<item name="android:statusBarColor">@color/BackgroundColor</item>
</style>

<style name="Theme.MiniGames.NoActionBar">
Expand Down
2 changes: 1 addition & 1 deletion build-src/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
kotlin.code.style=official
org.gradle.jvmargs=-Xmx3g -Dfile.encoding=UTF-8
systemProp.kotlinVersion=1.7.20
systemProp.kotlinVersion=1.9.21
7 changes: 0 additions & 7 deletions build-src/src/main/kotlin/BuildSrcPlugin.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency
import org.gradle.api.tasks.JavaExec
import java.io.File
import java.lang.System.getenv
Expand All @@ -17,12 +16,6 @@ class BuildSrcPlugin : Plugin<Project> {
}
}

fun Project.kapt(dependency: String) {
val (group, name, version) = dependency.split(":")
val moduleDependency = DefaultExternalModuleDependency(group, name, version)
configurations.getByName("kapt").dependencies.add(moduleDependency)
}

private fun currentScopeEnvFile(): File =
File(ENV_FILE).takeIf { it.exists() } ?: File(FROM_XCODE_ENV_FILE)

Expand Down
6 changes: 3 additions & 3 deletions build-src/src/main/kotlin/Constants.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
object Constants {

object Android {
const val minSdk = 21
const val compileSdk = 33
const val targetSdk = 33
const val minSdk = 34
const val compileSdk = 34
const val targetSdk = 34
}

object iOS {
Expand Down
28 changes: 11 additions & 17 deletions build-src/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ object Dependencies {
val kotlinVersion by System.getProperties()
val composeVersion by System.getProperties()
val parcelizeDarwinVersion by System.getProperties()
const val ktor = "2.3.0"
const val exposed = "0.41.1" // Keep this version compatible with the version of exposed used by krush
const val krush = "1.2.0"
const val ktor = "2.3.7"
const val exposed = "0.45.0"
const val simpleMail = "1.3.3"
const val decompose = "0.5.0"
const val essenty = "0.2.2"
const val multiplatformSettings = "1.0.0"
const val decompose = "3.0.0-alpha03"
const val multiplatformSettings = "1.1.1"
const val coroutines = "1.7.3"
}

val kotlinxSerialization = "org.jetbrains.kotlinx:kotlinx-serialization-cbor:1.5.0"
val kotlinxSerialization = "org.jetbrains.kotlinx:kotlinx-serialization-cbor:1.6.2"
val kotlinxAtomicFu = "org.jetbrains.kotlinx:atomicfu:0.20.2"
val kotlinxDateTime = "org.jetbrains.kotlinx:kotlinx-datetime:0.4.0"
val uuid = "com.benasher44:uuid:0.7.0"
Expand Down Expand Up @@ -48,27 +47,22 @@ object Dependencies {
val multiplatformSettingsCoroutines = "com.russhwolf:multiplatform-settings-coroutines:${Version.multiplatformSettings}"
val multiplatformSettingsDatastore = "com.russhwolf:multiplatform-settings-datastore:${Version.multiplatformSettings}"

val androidGoogleMaterial = "com.google.android.material:material:1.4.0"
val kotlinxCoroutinesSwing = "org.jetbrains.kotlinx:kotlinx-coroutines-swing:${Version.coroutines}"
val kotlinxCoroutinesAndroid = "org.jetbrains.kotlinx:kotlinx-coroutines-android:${Version.coroutines}"

val androidXDataStorePreferences = "androidx.datastore:datastore-preferences:1.0.0"
val androidXActivity = "androidx.activity:activity:1.4.0"
val androidXActivityCompose = "androidx.activity:activity-compose:1.4.0"

val decompose = "com.arkivanov.decompose:decompose:${Version.decompose}"
val decomposeExtensions = "com.arkivanov.decompose:extensions-compose:${Version.decompose}"

val essentyParcelable = "com.arkivanov.essenty:parcelable:${Version.essenty}"
val essentyLifecycle = "com.arkivanov.essenty:lifecycle:${Version.essenty}"
val essentyStateKeeper = "com.arkivanov.essenty:state-keeper:${Version.essenty}"
val essentyInstanceKeeper = "com.arkivanov.essenty:instance-keeper:${Version.essenty}"
val parcelizeDarwinRuntime = "com.arkivanov.parcelize.darwin:runtime:${Version.parcelizeDarwinVersion}"

val exposedCore = "org.jetbrains.exposed:exposed-core:${Version.exposed}"
val exposedDao = "org.jetbrains.exposed:exposed-dao:${Version.exposed}"
val exposedJdbc = "org.jetbrains.exposed:exposed-jdbc:${Version.exposed}"
val exposedJavaTime = "org.jetbrains.exposed:exposed-java-time:${Version.exposed}"

val postgresSqlDriver = "org.postgresql:postgresql:42.3.0"

val krushAnnotationProcessor = "pl.touk.krush:krush-annotation-processor:${Version.krush}"
val krushRuntime = "pl.touk.krush:krush-runtime:${Version.krush}"
val krushRuntimePostgresql = "pl.touk.krush:krush-runtime-postgresql:${Version.krush}"
val postgresSqlDriver = "org.postgresql:postgresql:42.7.1"
}
22 changes: 11 additions & 11 deletions desktop-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ plugins {
}

kotlin {
jvm("desktop")
jvmToolchain(17)

jvm()

sourceSets {
named("desktopMain") {
dependencies {
implementation(project(":shared-client"))
implementation(compose.desktop.common)
implementation(compose.desktop.currentOs)
implementation(Dependencies.essentyInstanceKeeper)
}
jvmMain.dependencies {
implementation(project(":shared-client"))
implementation(compose.desktop.common)
implementation(compose.desktop.currentOs)
}
}
}
Expand All @@ -32,17 +32,17 @@ compose.desktop {
windows {
menu = true
upgradeUuid = "e60c3562-48f8-47db-91d9-ca54dfa92f35"
iconFile.set(projectDir.resolve("src/desktopMain/resources/ic_launcher.ico"))
iconFile.set(projectDir.resolve("src/jvmMain/resources/ic_launcher.ico"))
}

linux {
iconFile.set(projectDir.resolve("src/desktopMain/resources/ic_launcher.png"))
iconFile.set(projectDir.resolve("src/jvmMain/resources/ic_launcher.png"))
}

macOS {
bundleID = "ml.dev.kotlin.minigames.app"
appStore = false
iconFile.set(projectDir.resolve("src/desktopMain/resources/ic_launcher.icns"))
iconFile.set(projectDir.resolve("src/jvmMain/resources/ic_launcher.icns"))
signing {
sign.set(false)
}
Expand Down
15 changes: 8 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ org.jetbrains.compose.experimental.macos.enabled=true
org.jetbrains.compose.experimental.uikit.enabled=true

kotlin.native.cocoapods.generate.wrapper=true
kotlin.native.cacheKind=none
#kotlin.native.cacheKind=none
kotlin.native.useEmbeddableCompilerJar=true
kotlin.native.binary.memoryModel=experimental
kotlin.mpp.androidSourceSetLayoutVersion=2
kotlin.mpp.stability.nowarn=true
kotlin.mpp.enableCInteropCommonization=true

systemProp.kotlinVersion=1.8.20
systemProp.composeVersion=1.4.0
systemProp.agpVersion=7.4.2
systemProp.buildkonfigVersion=0.11.0
systemProp.shadowVersion=7.0.0
systemProp.parcelizeDarwinVersion=0.1.3
systemProp.kotlinVersion=1.9.21
systemProp.composeVersion=1.6.0-alpha01
systemProp.agpVersion=8.2.0
systemProp.buildkonfigVersion=0.15.1
systemProp.shadowVersion=7.1.2
systemProp.parcelizeDarwinVersion=0.2.3
systemProp.foojayResolverVersion=0.7.0
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
16 changes: 10 additions & 6 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

Expand Down Expand Up @@ -133,26 +130,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
Loading

0 comments on commit 53bc728

Please sign in to comment.