Skip to content

Commit c836ba9

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 c836ba9

37 files changed

Lines changed: 501 additions & 150 deletions

File tree

.github/workflows/kotlin.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,55 @@ 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+
steps:
703+
- name: Checkout
704+
uses: actions/checkout@v6
705+
706+
- name: Instrumented tests
707+
uses: ./.github/actions/gradle-tasks-with-emulator
708+
with:
709+
tests-name: kmp-core-tests-results-${{matrix.shardNum}}
710+
api-level: ${{ matrix.api-level }}
711+
# prepare-task: prepareConnectedCheckShard${{matrix.shardNum}}
712+
test-task: connectedAndroidTest
713+
write-cache-key: androidDeviceTest-build-artifacts-${{matrix.shardNum}}
714+
restore-cache-key: kmp-instrumentation-test-build-artifacts
715+
failure-path-upload: '**/build/reports/androidTests/connected'
716+
failure-upload-name: kmp-instrumentation-tests-report-${{matrix.shardNum}}
717+
718+
# Doesn't use sharding because there are very few Android device tests in KMP.
719+
kmp-runtime-instrumentation-tests:
720+
name: KMP Alternate Runtime Instrumentation tests
721+
runs-on: workflow-kotlin-test-runner-ubuntu-4core
722+
timeout-minutes: 60
723+
strategy:
724+
# Allow tests to continue on other devices if they fail on one device.
725+
fail-fast: false
726+
matrix:
727+
api-level:
728+
- 31
729+
runtime: [ conflate, stateChange, drainExclusive, conflate-stateChange, partial, conflate-partial, stable, conflate-drainExclusive, stateChange-drainExclusive, partial-drainExclusive, conflate-partial-drainExclusive, all ]
730+
steps:
731+
- name: Checkout
732+
uses: actions/checkout@v6
733+
734+
- name: Instrumented tests
735+
uses: ./.github/actions/gradle-tasks-with-emulator
736+
with:
737+
tests-name: kmp-alt-runtime-tests-results-${{matrix.runtime}}
738+
api-level: ${{ matrix.api-level }}
739+
# prepare-task: prepare??? -Pworkflow.runtime=${{matrix.runtime}}
740+
test-task: connectedAndroidTest -Pworkflow.runtime=${{matrix.runtime}}
741+
write-cache-key: androidDeviceTest-build-artifacts-${{matrix.runtime}}
742+
restore-cache-key: kmp-runtime-instrumentation-test-artifacts
743+
failure-path-upload: '**/build/reports/androidTests/connected'
744+
failure-upload-name: kmp-runtime-instrumentation-tests-report-${{matrix.runtime}}
745+
697746
all-green:
698747
if: always()
699748
runs-on: ubuntu-latest
@@ -705,6 +754,7 @@ jobs:
705754
- dokka
706755
- unit-tests
707756
- instrumentation-tests
757+
- kmp-instrumentation-tests
708758
- kmp-jvm-tests
709759
- kmp-ios-tests
710760
- kmp-js-tests
@@ -724,6 +774,7 @@ jobs:
724774
- ktlint
725775
- performance-tests
726776
- runtime-instrumentation-tests
777+
- kmp-runtime-instrumentation-tests
727778
- shards-and-version
728779
- tutorials
729780

artifacts.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@
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": 8,
63+
"publicationName": "android"
64+
},
5665
{
5766
"gradlePath": ":workflow-runtime",
5867
"group": "com.squareup.workflow1",
@@ -107,15 +116,6 @@
107116
"javaVersion": 8,
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)