Skip to content

Commit 20e7ea6

Browse files
committed
Multiplatform lifecycle
Refs: #12
1 parent 1baadad commit 20e7ea6

42 files changed

Lines changed: 421 additions & 90 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616
uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
19-
- name: set up JDK 17
19+
- name: set up JDK 21
2020
uses: actions/setup-java@v4
2121
with:
2222
distribution: 'temurin'
23-
java-version: 17
23+
java-version: 21
2424
- name: Cache
2525
uses: actions/cache@v4
2626
with:

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
with:
1515
fetch-depth: 0
1616
ref: refs/remotes/origin/master
17-
- name: set up JDK 17
17+
- name: set up JDK 21
1818
uses: actions/setup-java@v4
1919
with:
2020
distribution: 'temurin'
21-
java-version: 17
21+
java-version: 21
2222
- name: Cache
2323
uses: actions/cache@v4
2424
with:

build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ tasks.register("runCoroutinesTests") {
100100
description = "Run unit tests for the coroutines extension layer."
101101
}
102102

103+
tasks.register("runLifecycleTests") {
104+
dependsOn(":lifecycle:allTests")
105+
description = "Run unit tests for the lifecycle extension layer."
106+
}
107+
103108
tasks.register("runCommonflowTests") {
104109
dependsOn(":commonflow:viewmodel:allTests")
105110
description = "Run unit tests for the commonflow library."
@@ -145,6 +150,7 @@ tasks.register("runUnitTests") {
145150
dependsOn(
146151
"runStateMachineTests",
147152
"runCoroutinesTests",
153+
"runLifecycleTests",
148154
"runCommonflowTests",
149155
"runLceExampleUnitTests",
150156
"runWelcomeExampleUnitTests",

commonflow/compose/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ version = rootProject.version
3838
println("== Project version: $versionName ==")
3939

4040
kotlin {
41-
jvmToolchain(17)
41+
jvmToolchain(21)
4242

4343
jvm()
4444
android {
@@ -51,7 +51,7 @@ kotlin {
5151
}
5252

5353
compilerOptions {
54-
jvmTarget.set(JvmTarget.JVM_17)
54+
jvmTarget.set(JvmTarget.JVM_21)
5555
}
5656
}
5757

commonflow/data/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ version = rootProject.version
3636
println("== Project version: $versionName ==")
3737

3838
kotlin {
39-
jvmToolchain(17)
39+
jvmToolchain(21)
4040

4141
jvm()
4242
android {
@@ -49,7 +49,7 @@ kotlin {
4949
}
5050

5151
compilerOptions {
52-
jvmTarget.set(JvmTarget.JVM_17)
52+
jvmTarget.set(JvmTarget.JVM_21)
5353
}
5454
}
5555

commonflow/viewmodel/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ version = rootProject.version
3838
println("== Project version: $versionName ==")
3939

4040
kotlin {
41-
jvmToolchain(17)
41+
jvmToolchain(21)
4242

4343
jvm()
4444
android {
@@ -51,7 +51,7 @@ kotlin {
5151
}
5252

5353
compilerOptions {
54-
jvmTarget.set(JvmTarget.JVM_17)
54+
jvmTarget.set(JvmTarget.JVM_21)
5555
}
5656
}
5757

commonstatemachine/build.gradle.kts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ version = rootProject.version
3636
println("== Project version: $versionName ==")
3737

3838
kotlin {
39-
jvmToolchain(17)
39+
jvmToolchain(21)
4040

4141
jvm()
4242
android {
@@ -49,7 +49,7 @@ kotlin {
4949
}
5050

5151
compilerOptions {
52-
jvmTarget.set(JvmTarget.JVM_17)
52+
jvmTarget.set(JvmTarget.JVM_21)
5353
}
5454
}
5555

@@ -95,15 +95,6 @@ kotlin {
9595
commonTest.dependencies {
9696
implementation(libs.test.kotlin)
9797
}
98-
androidMain.dependencies {
99-
api(libs.androidx.lifecycle.common)
100-
}
101-
val androidHostTest by sourceSets.getting
102-
androidHostTest.dependencies {
103-
implementation(libs.kotlin.coroutines.core)
104-
implementation(libs.test.kotlin.coroutines)
105-
implementation(libs.test.androidx.lifecycle)
106-
}
10798
}
10899
}
109100
val javadocJar by tasks.registering(Jar::class) {

coroutines/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ version = rootProject.version
3535
println("== Project version: $versionName ==")
3636

3737
kotlin {
38-
jvmToolchain(17)
38+
jvmToolchain(21)
3939

4040
jvm()
4141
android {
@@ -48,7 +48,7 @@ kotlin {
4848
}
4949

5050
compilerOptions {
51-
jvmTarget.set(JvmTarget.JVM_17)
51+
jvmTarget.set(JvmTarget.JVM_21)
5252
}
5353
}
5454
js(IR) {

examples/androidcore/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ android {
4141
}
4242
}
4343
compileOptions {
44-
sourceCompatibility = JavaVersion.VERSION_17
45-
targetCompatibility = JavaVersion.VERSION_17
44+
sourceCompatibility = JavaVersion.VERSION_21
45+
targetCompatibility = JavaVersion.VERSION_21
4646
isCoreLibraryDesugaringEnabled = true
4747
}
4848
kotlin {
4949
compilerOptions {
50-
jvmTarget.set(JvmTarget.JVM_17)
50+
jvmTarget.set(JvmTarget.JVM_21)
5151
}
5252
}
5353
buildFeatures {

examples/books/app/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ android {
6666
}
6767
compileOptions {
6868
isCoreLibraryDesugaringEnabled = true
69-
sourceCompatibility = JavaVersion.VERSION_17
70-
targetCompatibility = JavaVersion.VERSION_17
69+
sourceCompatibility = JavaVersion.VERSION_21
70+
targetCompatibility = JavaVersion.VERSION_21
7171
}
7272
kotlin {
7373
compilerOptions {
74-
jvmTarget.set(JvmTarget.JVM_17)
74+
jvmTarget.set(JvmTarget.JVM_21)
7575
}
7676
}
7777
buildFeatures {

0 commit comments

Comments
 (0)