Skip to content

Commit 4c8a991

Browse files
Merge pull request #1350 from square/sedwards/move-render-android
1311: Dispatcher Tests for RenderWorkflowIn on Android
2 parents 22cf4a3 + 3eac67c commit 4c8a991

File tree

10 files changed

+477
-0
lines changed

10 files changed

+477
-0
lines changed

build-logic/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ dependencies {
6262

6363
compileOnly(gradleApi())
6464

65+
implementation(libs.burst.plugin)
6566
implementation(libs.android.gradle.plugin)
6667
implementation(libs.kgx)
6768
implementation(libs.dokka.gradle.plugin)

dependencies/classpath.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
androidx.databinding:databinding-common:8.8.0
22
androidx.databinding:databinding-compiler-common:8.8.0
3+
app.cash.burst:burst-gradle-plugin:2.1.0
4+
app.cash.burst:burst-jvm:2.1.0
5+
app.cash.burst:burst-kotlin-plugin:2.1.0
6+
app.cash.burst:burst:2.1.0
37
com.android.databinding:baseLibrary:8.8.0
48
com.android.tools.analytics-library:crash:31.8.0
59
com.android.tools.analytics-library:protos:31.8.0

gradle/libs.versions.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ androidx-tracing = "1.2.0"
3636
androidx-transition = "1.5.1"
3737
androidx-viewbinding = "8.1.2"
3838

39+
burst = "2.1.0"
40+
3941
detekt = "1.19.0"
4042
dokka = "2.0.0"
4143
dependencyGuard = "0.5.0"
@@ -83,6 +85,7 @@ squareup-moshi = "1.15.0"
8385
squareup-moshi-kotlin = "1.15.2"
8486
squareup-okhttp = "4.9.1"
8587
squareup-okio = "3.3.0"
88+
squareup-papa = "0.30"
8689
squareup-radiography = "2.4.1"
8790
squareup-retrofit = "2.9.0"
8891
squareup-seismic = "1.0.3"
@@ -184,6 +187,8 @@ androidx-transition = { module = "androidx.transition:transition", version.ref =
184187

185188
androidx-viewbinding = { module = "androidx.databinding:viewbinding", version.ref = "androidx-viewbinding" }
186189

190+
burst-plugin = { module = "app.cash.burst:burst-gradle-plugin", version.ref = "burst" }
191+
187192
dokka-gradle-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" }
188193

189194
dropbox-dependencyGuard = { module = "com.dropbox.dependency-guard:dependency-guard", version.ref = "dependencyGuard" }
@@ -258,6 +263,8 @@ squareup-moshi-kotlin = { module = "com.squareup.moshi:moshi-kotlin", version.re
258263

259264
squareup-okio = { module = "com.squareup.okio:okio", version.ref = "squareup-okio" }
260265

266+
squareup-papa = { module = "com.squareup.papa:papa", version.ref = "squareup-papa"}
267+
261268
squareup-radiography = { module = "com.squareup.radiography:radiography", version.ref = "squareup-radiography" }
262269

263270
squareup-seismic = { module = "com.squareup:seismic", version.ref = "squareup-seismic" }

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ include(
6464
":workflow-config:config-jvm",
6565
":workflow-core",
6666
":workflow-runtime",
67+
":workflow-runtime-android",
6768
":workflow-rx2",
6869
":workflow-testing",
6970
":workflow-tracing",

workflow-runtime-android/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Module Workflow Runtime Android
2+
3+
This module is an Android library that is used to test the Workflow Runtime with Android specific
4+
coroutine dispatchers. These are headless android-tests that run on device without UI.

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

Whitespace-only changes.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
plugins {
2+
id("com.android.library")
3+
id("kotlin-android")
4+
id("android-defaults")
5+
id("android-ui-tests")
6+
id("app.cash.burst")
7+
}
8+
9+
android {
10+
namespace = "com.squareup.workflow1.android"
11+
testNamespace = "$namespace.test"
12+
}
13+
14+
dependencies {
15+
api(project(":workflow-runtime"))
16+
implementation(project(":workflow-core"))
17+
18+
androidTestImplementation(libs.androidx.test.core)
19+
androidTestImplementation(libs.androidx.test.truth)
20+
androidTestImplementation(libs.kotlin.test.core)
21+
androidTestImplementation(libs.kotlin.test.jdk)
22+
androidTestImplementation(libs.kotlinx.coroutines.android)
23+
androidTestImplementation(libs.kotlinx.coroutines.core)
24+
androidTestImplementation(libs.kotlinx.coroutines.test)
25+
androidTestImplementation(libs.squareup.papa)
26+
androidTestImplementation(libs.turbine)
27+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
POM_ARTIFACT_ID=workflow-runtime-android
2+
POM_NAME=Workflow Runtime Android
3+
POM_PACKAGING=aar
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
3+
<application>
4+
<activity android:name="androidx.activity.ComponentActivity"/>
5+
</application>
6+
</manifest>

0 commit comments

Comments
 (0)