Skip to content

Commit 2f88fcf

Browse files
Move workflow-runtime-android into android source set in workflow-runtime module. (2nd attempt)
First attempt was #1370, but got reverted in #1378 due to it having broken something. I need this in order to correctly consume Compose Multiplatform for the work migrating the runtime to compose (#1442). This reverts commit 58c1d40.
1 parent d45a070 commit 2f88fcf

38 files changed

Lines changed: 660 additions & 158 deletions

File tree

.github/workflows/kotlin.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,59 @@ jobs:
694694
failure-path-upload: '**/build/reports/androidTests/connected'
695695
failure-upload-name: core-tests-report-${{matrix.runtime}}-${{matrix.shardNum}}
696696

697+
# Doesn't use sharding because there are very few Android device tests in KMP.
698+
kmp-instrumentation-tests:
699+
name: KMP Instrumentation tests
700+
runs-on: workflow-kotlin-test-runner-ubuntu-4core
701+
timeout-minutes: 60
702+
strategy:
703+
# Allow tests to continue on other devices if they fail on one device.
704+
fail-fast: false
705+
matrix:
706+
api-level:
707+
- 31
708+
steps:
709+
- name: Checkout
710+
uses: actions/checkout@v6
711+
712+
- name: Instrumented tests
713+
uses: ./.github/actions/gradle-tasks-with-emulator
714+
with:
715+
tests-name: kmp-core-tests-results-${{matrix.shardNum}}
716+
api-level: ${{ matrix.api-level }}
717+
test-task: connectedAndroidTest
718+
write-cache-key: kmp-instrumentation-test-build-artifacts-${{matrix.shardNum}}
719+
restore-cache-key: kmp-instrumentation-test-build-artifacts
720+
failure-path-upload: '**/build/reports/androidTests/connected'
721+
failure-upload-name: kmp-instrumentation-tests-report-${{matrix.shardNum}}
722+
723+
# Doesn't use sharding because there are very few Android device tests in KMP.
724+
kmp-runtime-instrumentation-tests:
725+
name: KMP Alternate Runtime Instrumentation tests
726+
runs-on: workflow-kotlin-test-runner-ubuntu-4core
727+
timeout-minutes: 60
728+
strategy:
729+
# Allow tests to continue on other devices if they fail on one device.
730+
fail-fast: false
731+
matrix:
732+
api-level:
733+
- 31
734+
runtime: [ conflate, stateChange, drainExclusive, conflate-stateChange, partial, conflate-partial, stable, conflate-drainExclusive, stateChange-drainExclusive, partial-drainExclusive, conflate-partial-drainExclusive, all ]
735+
steps:
736+
- name: Checkout
737+
uses: actions/checkout@v6
738+
739+
- name: Instrumented tests
740+
uses: ./.github/actions/gradle-tasks-with-emulator
741+
with:
742+
tests-name: kmp-alt-runtime-tests-results-${{matrix.runtime}}
743+
api-level: ${{ matrix.api-level }}
744+
test-task: connectedAndroidTest -Pworkflow.runtime=${{matrix.runtime}}
745+
write-cache-key: kmp-runtime-instrumentation-test-artifacts-${{matrix.runtime}}
746+
restore-cache-key: kmp-runtime-instrumentation-test-artifacts
747+
failure-path-upload: '**/build/reports/androidTests/connected'
748+
failure-upload-name: kmp-runtime-instrumentation-tests-report-${{matrix.runtime}}
749+
697750
all-green:
698751
if: always()
699752
runs-on: ubuntu-latest
@@ -705,6 +758,7 @@ jobs:
705758
- dokka
706759
- unit-tests
707760
- instrumentation-tests
761+
- kmp-instrumentation-tests
708762
- kmp-jvm-tests
709763
- kmp-ios-tests
710764
- kmp-js-tests
@@ -724,6 +778,7 @@ jobs:
724778
- ktlint
725779
- performance-tests
726780
- runtime-instrumentation-tests
781+
- kmp-runtime-instrumentation-tests
727782
- shards-and-version
728783
- tutorials
729784

artifacts.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,22 @@
5353
"javaVersion": 8,
5454
"publicationName": "kotlinMultiplatform"
5555
},
56+
{
57+
"gradlePath": ":workflow-runtime",
58+
"group": "com.squareup.workflow1",
59+
"artifactId": "workflow-runtime-android",
60+
"description": "Workflow Runtime",
61+
"packaging": "aar",
62+
"javaVersion": 17,
63+
"publicationName": "android"
64+
},
5665
{
5766
"gradlePath": ":workflow-runtime",
5867
"group": "com.squareup.workflow1",
5968
"artifactId": "workflow-runtime-iosarm64",
6069
"description": "Workflow Runtime",
6170
"packaging": "klib",
62-
"javaVersion": 8,
71+
"javaVersion": 17,
6372
"publicationName": "iosArm64"
6473
},
6574
{
@@ -68,7 +77,7 @@
6877
"artifactId": "workflow-runtime-iossimulatorarm64",
6978
"description": "Workflow Runtime",
7079
"packaging": "klib",
71-
"javaVersion": 8,
80+
"javaVersion": 17,
7281
"publicationName": "iosSimulatorArm64"
7382
},
7483
{
@@ -77,7 +86,7 @@
7786
"artifactId": "workflow-runtime-iosx64",
7887
"description": "Workflow Runtime",
7988
"packaging": "klib",
80-
"javaVersion": 8,
89+
"javaVersion": 17,
8190
"publicationName": "iosX64"
8291
},
8392
{
@@ -86,7 +95,7 @@
8695
"artifactId": "workflow-runtime-js",
8796
"description": "Workflow Runtime",
8897
"packaging": "klib",
89-
"javaVersion": 8,
98+
"javaVersion": 17,
9099
"publicationName": "js"
91100
},
92101
{
@@ -95,7 +104,7 @@
95104
"artifactId": "workflow-runtime-jvm",
96105
"description": "Workflow Runtime",
97106
"packaging": "jar",
98-
"javaVersion": 8,
107+
"javaVersion": 17,
99108
"publicationName": "jvm"
100109
},
101110
{
@@ -104,18 +113,9 @@
104113
"artifactId": "workflow-runtime",
105114
"description": "Workflow Runtime",
106115
"packaging": "jar",
107-
"javaVersion": 8,
116+
"javaVersion": 17,
108117
"publicationName": "kotlinMultiplatform"
109118
},
110-
{
111-
"gradlePath": ":workflow-runtime-android",
112-
"group": "com.squareup.workflow1",
113-
"artifactId": "workflow-runtime-android",
114-
"description": "Workflow Runtime Android",
115-
"packaging": "aar",
116-
"javaVersion": 8,
117-
"publicationName": "maven"
118-
},
119119
{
120120
"gradlePath": ":workflow-rx2",
121121
"group": "com.squareup.workflow1",

build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ apply(from = rootProject.file(".buildscript/binary-validation.gradle"))
3737
dependencies {
3838
dokka(project(":workflow-core"))
3939
dokka(project(":workflow-runtime"))
40-
dokka(project(":workflow-runtime-android"))
4140
dokka(project(":workflow-rx2"))
4241
dokka(project(":workflow-testing"))
4342
dokka(project(":workflow-ui:compose"))

gradle/libs.versions.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ androidx-transition = { module = "androidx.transition:transition", version.ref =
192192

193193
androidx-viewbinding = { module = "androidx.databinding:viewbinding", version.ref = "androidx-viewbinding" }
194194

195+
burst = { module = "app.cash.burst:burst", version.ref = "burst" }
195196
burst-plugin = { module = "app.cash.burst:burst-gradle-plugin", version.ref = "burst" }
196197

197198
dokka-gradle-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" }

settings.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ include(
6262
":workflow-config:config-jvm",
6363
":workflow-core",
6464
":workflow-runtime",
65-
":workflow-runtime-android",
6665
":workflow-rx2",
6766
":workflow-testing",
6867
":workflow-tracing",

workflow-config/config-android/dependencies/releaseRuntimeClasspath.txt

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,66 @@
1+
androidx.activity:activity-ktx:1.7.0
2+
androidx.activity:activity:1.7.0
3+
androidx.annotation:annotation-experimental:1.4.1
4+
androidx.annotation:annotation-jvm:1.8.1
5+
androidx.annotation:annotation:1.8.1
6+
androidx.arch.core:core-common:2.2.0
7+
androidx.arch.core:core-runtime:2.2.0
8+
androidx.autofill:autofill:1.0.0
9+
androidx.collection:collection-jvm:1.4.4
10+
androidx.collection:collection-ktx:1.4.4
11+
androidx.collection:collection:1.4.4
12+
androidx.compose.runtime:runtime-android:1.7.8
13+
androidx.compose.runtime:runtime-saveable-android:1.7.8
14+
androidx.compose.runtime:runtime-saveable:1.7.8
15+
androidx.compose.runtime:runtime:1.7.8
16+
androidx.compose.ui:ui-android:1.7.8
17+
androidx.compose.ui:ui-geometry-android:1.7.8
18+
androidx.compose.ui:ui-geometry:1.7.8
19+
androidx.compose.ui:ui-graphics-android:1.7.8
20+
androidx.compose.ui:ui-graphics:1.7.8
21+
androidx.compose.ui:ui-text-android:1.7.8
22+
androidx.compose.ui:ui-text:1.7.8
23+
androidx.compose.ui:ui-unit-android:1.7.8
24+
androidx.compose.ui:ui-unit:1.7.8
25+
androidx.compose.ui:ui-util-android:1.7.8
26+
androidx.compose.ui:ui-util:1.7.8
27+
androidx.compose:compose-bom:2025.03.01
28+
androidx.concurrent:concurrent-futures:1.1.0
29+
androidx.core:core-ktx:1.12.0
30+
androidx.core:core:1.12.0
31+
androidx.customview:customview-poolingcontainer:1.0.0
32+
androidx.emoji2:emoji2:1.2.0
33+
androidx.graphics:graphics-path:1.0.1
34+
androidx.interpolator:interpolator:1.0.0
35+
androidx.lifecycle:lifecycle-common-jvm:2.8.7
36+
androidx.lifecycle:lifecycle-common:2.8.7
37+
androidx.lifecycle:lifecycle-livedata-core:2.8.7
38+
androidx.lifecycle:lifecycle-process:2.8.7
39+
androidx.lifecycle:lifecycle-runtime-android:2.8.7
40+
androidx.lifecycle:lifecycle-runtime-compose-android:2.8.7
41+
androidx.lifecycle:lifecycle-runtime-compose:2.8.7
42+
androidx.lifecycle:lifecycle-runtime-ktx-android:2.8.7
43+
androidx.lifecycle:lifecycle-runtime-ktx:2.8.7
44+
androidx.lifecycle:lifecycle-runtime:2.8.7
45+
androidx.lifecycle:lifecycle-viewmodel-android:2.8.7
46+
androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7
47+
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.8.7
48+
androidx.lifecycle:lifecycle-viewmodel:2.8.7
49+
androidx.profileinstaller:profileinstaller:1.3.1
50+
androidx.savedstate:savedstate-ktx:1.2.1
51+
androidx.savedstate:savedstate:1.2.1
52+
androidx.startup:startup-runtime:1.1.1
53+
androidx.tracing:tracing:1.0.0
54+
androidx.versionedparcelable:versionedparcelable:1.1.1
55+
com.google.guava:listenablefuture:1.0
156
com.squareup.okio:okio-jvm:3.3.0
257
com.squareup.okio:okio:3.3.0
358
org.jetbrains.kotlin:kotlin-bom:2.1.21
459
org.jetbrains.kotlin:kotlin-stdlib-common:2.1.21
560
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.1.21
661
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.1.21
762
org.jetbrains.kotlin:kotlin-stdlib:2.1.21
63+
org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0
864
org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.9.0
965
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.9.0
1066
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0

workflow-runtime-android/README.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

workflow-runtime-android/api/workflow-runtime-android.api

Lines changed: 0 additions & 10 deletions
This file was deleted.

workflow-runtime-android/build.gradle.kts

Lines changed: 0 additions & 35 deletions
This file was deleted.

workflow-runtime-android/dependencies/releaseRuntimeClasspath.txt

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)