Skip to content

Commit

Permalink
Kotlin 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
motorro committed May 30, 2024
1 parent 279fdd9 commit e9827a1
Show file tree
Hide file tree
Showing 21 changed files with 185 additions and 122 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
/.idea/copilot
/.idea/*.xd
.DS_Store
/build
/.kotlin
build
/captures
.externalNativeBuild
Expand Down
13 changes: 13 additions & 0 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ plugins {
alias(libs.plugins.kotlin.jvm) apply(false)
alias(libs.plugins.kotlin.android) apply(false)
alias(libs.plugins.kotlin.kapt) apply(false)
alias(libs.plugins.compose) apply(false)
alias(libs.plugins.kotlin.dokka) apply(false)
alias(libs.plugins.hilt) apply(false)
alias(libs.plugins.nexus.publish)
Expand Down
16 changes: 2 additions & 14 deletions commonstatemachine/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,11 @@ kotlin {
val jvmMain by getting
val jvmTest by getting
val androidMain by getting {
dependsOn(jvmMain)
dependencies {
api(libs.androidx.lifecycle.common)
}
}
val androidUnitTest by getting {
dependsOn(commonTest)
dependencies {
implementation(libs.kotlin.coroutines.core)
implementation(libs.test.kotlin.coroutines)
Expand All @@ -108,21 +106,11 @@ kotlin {
val iosX64Main by getting
val iosArm64Main by getting
val iosSimulatorArm64Main by getting
val iosMain by creating {
dependsOn(commonMain)
iosX64Main.dependsOn(this)
iosArm64Main.dependsOn(this)
iosSimulatorArm64Main.dependsOn(this)
}
val iosMain by creating
val iosX64Test by getting
val iosArm64Test by getting
val iosSimulatorArm64Test by getting
val iosTest by creating {
dependsOn(commonTest)
iosX64Test.dependsOn(this)
iosArm64Test.dependsOn(this)
iosSimulatorArm64Test.dependsOn(this)
}
val iosTest by creating
}
targets.all {
compilations.all {
Expand Down
22 changes: 4 additions & 18 deletions coroutines/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -91,32 +91,18 @@ kotlin {
}
val jvmMain by getting
val jvmTest by getting
val androidMain by getting {
dependsOn(jvmMain)
}
val androidUnitTest by getting {
dependsOn(commonTest)
}
val androidMain by getting
val androidUnitTest by getting
val jsMain by getting
val jsTest by getting
val iosX64Main by getting
val iosArm64Main by getting
val iosSimulatorArm64Main by getting
val iosMain by creating {
dependsOn(commonMain)
iosX64Main.dependsOn(this)
iosArm64Main.dependsOn(this)
iosSimulatorArm64Main.dependsOn(this)
}
val iosMain by creating
val iosX64Test by getting
val iosArm64Test by getting
val iosSimulatorArm64Test by getting
val iosTest by creating {
dependsOn(commonTest)
iosX64Test.dependsOn(this)
iosArm64Test.dependsOn(this)
iosSimulatorArm64Test.dependsOn(this)
}
val iosTest by creating
}
targets.all {
compilations.all {
Expand Down
15 changes: 12 additions & 3 deletions examples/androidcore/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ plugins {
id "com.android.library"
id "org.jetbrains.kotlin.android"
id "org.jetbrains.kotlin.kapt"
id "org.jetbrains.kotlin.plugin.compose"
}

android {
Expand Down Expand Up @@ -45,19 +46,27 @@ android {
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion libs.versions.compose.compiler.get()
}
namespace 'com.motorro.statemachine.androidcore'
}

composeCompiler {
enableStrongSkippingMode = true

reportsDestination = layout.buildDirectory.dir("compose_compiler")
stabilityConfigurationFile = rootProject.layout.projectDirectory.file("stability_config.conf")
}

dependencies {
api libs.timber

coreLibraryDesugaring libs.desugaring

implementation libs.kotlin.coroutines.core

def composeBom = platform(libs.compose.bom)
implementation composeBom
androidTestImplementation composeBom

implementation libs.bundles.compose.core
implementation libs.compose.activity
implementation libs.compose.foundation
Expand Down
15 changes: 12 additions & 3 deletions examples/lce/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
plugins {
id "com.android.application"
id "org.jetbrains.kotlin.android"
id "org.jetbrains.kotlin.plugin.compose"
}

android {
Expand Down Expand Up @@ -49,9 +50,6 @@ android {
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion libs.versions.compose.compiler.get()
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
Expand All @@ -60,6 +58,13 @@ android {
namespace 'com.motorro.statemachine.lce'
}

composeCompiler {
enableStrongSkippingMode = true

reportsDestination = layout.buildDirectory.dir("compose_compiler")
stabilityConfigurationFile = rootProject.layout.projectDirectory.file("stability_config.conf")
}

dependencies {
implementation project(path: ':commonstatemachine')
implementation project(path: ':coroutines')
Expand All @@ -78,6 +83,10 @@ dependencies {
implementation libs.kotlin.coroutines.core
implementation libs.kotlin.coroutines.android

def composeBom = platform(libs.compose.bom)
implementation composeBom
androidTestImplementation composeBom

implementation libs.bundles.compose.core
implementation libs.compose.activity
implementation libs.compose.viewmodel
Expand Down
15 changes: 12 additions & 3 deletions examples/lifecycle/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
plugins {
alias(libs.plugins.android.app)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose)
}

val versionCode: String by project.extra
Expand Down Expand Up @@ -60,16 +61,20 @@ android {
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}

composeCompiler {
enableStrongSkippingMode.set(true)

reportsDestination.set(layout.buildDirectory.dir("compose_compiler"))
stabilityConfigurationFile.set(rootProject.layout.projectDirectory.file("stability_config.conf"))
}

dependencies {
implementation(project(":commonstatemachine"))
implementation(project(":coroutines"))
Expand All @@ -87,6 +92,10 @@ dependencies {
implementation(libs.kotlin.coroutines.core)
implementation(libs.kotlin.coroutines.android)

val composeBom = platform(libs.compose.bom)
implementation(composeBom)
androidTestImplementation(composeBom)

implementation(libs.bundles.compose.core)
implementation(libs.compose.activity)
implementation(libs.compose.viewmodel)
Expand Down
15 changes: 12 additions & 3 deletions examples/multi/mixed/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
plugins {
alias(libs.plugins.android.app)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose)
}

val versionCode: String by project.extra
Expand Down Expand Up @@ -60,16 +61,20 @@ android {
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}

composeCompiler {
enableStrongSkippingMode.set(true)

reportsDestination.set(layout.buildDirectory.dir("compose_compiler"))
stabilityConfigurationFile.set(rootProject.layout.projectDirectory.file("stability_config.conf"))
}

dependencies {
implementation(project(":commonstatemachine"))
implementation(project(":coroutines"))
Expand All @@ -87,6 +92,10 @@ dependencies {
implementation(libs.kotlin.coroutines.core)
implementation(libs.kotlin.coroutines.android)

val composeBom = platform(libs.compose.bom)
implementation(composeBom)
androidTestImplementation(composeBom)

implementation(libs.bundles.compose.core)
implementation(libs.compose.activity)
implementation(libs.compose.viewmodel)
Expand Down
15 changes: 12 additions & 3 deletions examples/multi/navbar/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
plugins {
alias(libs.plugins.android.app)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose)
}

val versionCode: String by project.extra
Expand Down Expand Up @@ -60,16 +61,20 @@ android {
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}

composeCompiler {
enableStrongSkippingMode.set(true)

reportsDestination.set(layout.buildDirectory.dir("compose_compiler"))
stabilityConfigurationFile.set(rootProject.layout.projectDirectory.file("stability_config.conf"))
}

dependencies {
implementation(project(":commonstatemachine"))
implementation(project(":coroutines"))
Expand All @@ -87,6 +92,10 @@ dependencies {
implementation(libs.kotlin.coroutines.core)
implementation(libs.kotlin.coroutines.android)

val composeBom = platform(libs.compose.bom)
implementation(composeBom)
androidTestImplementation(composeBom)

implementation(libs.bundles.compose.core)
implementation(libs.compose.activity)
implementation(libs.compose.viewmodel)
Expand Down
15 changes: 12 additions & 3 deletions examples/multi/parallel/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
plugins {
alias(libs.plugins.android.app)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose)
}

val versionCode: String by project.extra
Expand Down Expand Up @@ -60,16 +61,20 @@ android {
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}

composeCompiler {
enableStrongSkippingMode.set(true)

reportsDestination.set(layout.buildDirectory.dir("compose_compiler"))
stabilityConfigurationFile.set(rootProject.layout.projectDirectory.file("stability_config.conf"))
}

dependencies {
implementation(project(":commonstatemachine"))
implementation(project(":coroutines"))
Expand All @@ -87,6 +92,10 @@ dependencies {
implementation(libs.kotlin.coroutines.core)
implementation(libs.kotlin.coroutines.android)

val composeBom = platform(libs.compose.bom)
implementation(composeBom)
androidTestImplementation(composeBom)

implementation(libs.bundles.compose.core)
implementation(libs.compose.activity)
implementation(libs.compose.viewmodel)
Expand Down
Loading

0 comments on commit e9827a1

Please sign in to comment.