Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/kotlin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ jobs:
api-level: ${{ matrix.api-level }}
prepare-task: prepareConnectedCheckShard${{matrix.shardNum}}
# -x excludes tasks
test-task: connectedCheckShard${{matrix.shardNum}} -x :benchmarks:dungeon-benchmark:connectedCheck -x :benchmarks:performance-poetry:complex-benchmark:connectedCheck -x :benchmarks:performance-poetry:complex-poetry:connectedCheck
test-task: connectedCheckShard${{matrix.shardNum}} -x :benchmarks:dungeon-benchmark:connectedAndroidTest -x :benchmarks:performance-poetry:complex-benchmark:connectedAndroidTest -x :benchmarks:performance-poetry:complex-poetry:connectedAndroidTest
write-cache-key: androidTest-build-artifacts-${{matrix.shardNum}}
restore-cache-key: main-build-artifacts
failure-path-upload: '**/build/reports/androidTests/connected'
Expand Down Expand Up @@ -690,7 +690,7 @@ jobs:
api-level: ${{ matrix.api-level }}
prepare-task: prepareConnectedCheckShard${{matrix.shardNum}} -Pworkflow.runtime=${{matrix.runtime}}
# -x excludes tasks
test-task: connectedCheckShard${{matrix.shardNum}} -Pworkflow.runtime=${{matrix.runtime}} -x :benchmarks:dungeon-benchmark:connectedCheck -x :benchmarks:performance-poetry:complex-benchmark:connectedCheck -x :benchmarks:performance-poetry:complex-poetry:connectedCheck
test-task: connectedCheckShard${{matrix.shardNum}} -Pworkflow.runtime=${{matrix.runtime}} -x :benchmarks:dungeon-benchmark:connectedAndroidTest -x :benchmarks:performance-poetry:complex-benchmark:connectedAndroidTest -x :benchmarks:performance-poetry:complex-poetry:connectedAndroidTest
write-cache-key: androidTest-build-artifacts-${{matrix.shardNum}}-${{matrix.runtime}}
restore-cache-key: main-build-artifacts
failure-path-upload: '**/build/reports/androidTests/connected'
Expand Down
18 changes: 9 additions & 9 deletions artifacts.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@
"javaVersion": 8,
"publicationName": "kotlinMultiplatform"
},
{
"gradlePath": ":workflow-runtime",
"group": "com.squareup.workflow1",
"artifactId": "workflow-runtime-android",
"description": "Workflow Runtime",
"packaging": "aar",
"javaVersion": 8,
"publicationName": "android"
},
{
"gradlePath": ":workflow-runtime",
"group": "com.squareup.workflow1",
Expand Down Expand Up @@ -107,15 +116,6 @@
"javaVersion": 8,
"publicationName": "kotlinMultiplatform"
},
{
"gradlePath": ":workflow-runtime-android",
"group": "com.squareup.workflow1",
"artifactId": "workflow-runtime-android",
"description": "Workflow Runtime Android",
"packaging": "aar",
"javaVersion": 8,
"publicationName": "maven"
},
{
"gradlePath": ":workflow-rx2",
"group": "com.squareup.workflow1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,12 @@ fun shardConnectedCheckTasks(target: Project) {
// Calculate the cost of each project's tests
val projectsWithTestCount = lazy(NONE) {
target.subprojects
// Only Android projects can have these tasks.
// Use the KGP Android plugin instead of AGP since KGP has only one ID to look for.
.filter { it.plugins.hasPlugin("org.jetbrains.kotlin.android") }
.filter {
// Only Android projects can have these tasks.
// Use the KGP Android plugin instead of AGP since KGP has only one ID to look for.
it.plugins.hasPlugin("org.jetbrains.kotlin.android") ||
it.plugins.hasPlugin("com.android.kotlin.multiplatform.library")
}
.map { it to it.androidTestCost() }
}

Expand All @@ -58,7 +61,9 @@ fun shardConnectedCheckTasks(target: Project) {
// outside the task configuration block so that it only happens once.
val shardAssignments = projectsWithTestCount.shards()

val connectedTestName = "connectedCheck"
// We use connectedAndroidTest instead of connectedCheck since Android instrumented tests in KMP
// modules aren't included the latter, but they are in the former.
val connectedTestName = "connectedAndroidTest"

shardAssignments.forEach { shard ->

Expand Down Expand Up @@ -215,13 +220,16 @@ private val testAnnotationRegex = """@(?:org\.junit\.)?Test\s+""".toRegex()
*
* Each test function has a cost of 1. A project with 20 tests has a cost of 20.
*/
private fun Project.androidTestCost(): Int {

val androidTestSrc = file("src/androidTest/java")

if (!androidTestSrc.exists()) return 0

return androidTestSrc
private fun Project.androidTestCost(): Int =
listOf(
// Android-only, non-KMP modules.
file("src/androidTest/java"),
// KMP modules with android targets.
file("src/androidDeviceTest/kotlin"),
).sumOf { androidTestSrc ->
if (!androidTestSrc.exists()) return@sumOf 0

androidTestSrc
.walkTopDown()
.filter { it.isFile && it.extension == "kt" }
.sumOf { file ->
Expand Down
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ apply(from = rootProject.file(".buildscript/binary-validation.gradle"))
dependencies {
dokka(project(":workflow-core"))
dokka(project(":workflow-runtime"))
dokka(project(":workflow-runtime-android"))
dokka(project(":workflow-rx2"))
dokka(project(":workflow-testing"))
dokka(project(":workflow-ui:compose"))
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ androidx-transition = { module = "androidx.transition:transition", version.ref =

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

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

dokka-gradle-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" }
Expand Down
1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ include(
":workflow-config:config-jvm",
":workflow-core",
":workflow-runtime",
":workflow-runtime-android",
":workflow-rx2",
":workflow-testing",
":workflow-tracing",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,66 @@
androidx.activity:activity-ktx:1.7.0
androidx.activity:activity:1.7.0
androidx.annotation:annotation-experimental:1.4.1
androidx.annotation:annotation-jvm:1.8.1
androidx.annotation:annotation:1.8.1
androidx.arch.core:core-common:2.2.0
androidx.arch.core:core-runtime:2.2.0
androidx.autofill:autofill:1.0.0
androidx.collection:collection-jvm:1.4.4
androidx.collection:collection-ktx:1.4.4
androidx.collection:collection:1.4.4
androidx.compose.runtime:runtime-android:1.7.8
androidx.compose.runtime:runtime-saveable-android:1.7.8
androidx.compose.runtime:runtime-saveable:1.7.8
androidx.compose.runtime:runtime:1.7.8
androidx.compose.ui:ui-android:1.7.8
androidx.compose.ui:ui-geometry-android:1.7.8
androidx.compose.ui:ui-geometry:1.7.8
androidx.compose.ui:ui-graphics-android:1.7.8
androidx.compose.ui:ui-graphics:1.7.8
androidx.compose.ui:ui-text-android:1.7.8
androidx.compose.ui:ui-text:1.7.8
androidx.compose.ui:ui-unit-android:1.7.8
androidx.compose.ui:ui-unit:1.7.8
androidx.compose.ui:ui-util-android:1.7.8
androidx.compose.ui:ui-util:1.7.8
androidx.compose:compose-bom:2025.03.01
androidx.concurrent:concurrent-futures:1.1.0
androidx.core:core-ktx:1.12.0
androidx.core:core:1.12.0
androidx.customview:customview-poolingcontainer:1.0.0
androidx.emoji2:emoji2:1.2.0
androidx.graphics:graphics-path:1.0.1
androidx.interpolator:interpolator:1.0.0
androidx.lifecycle:lifecycle-common-jvm:2.8.7
androidx.lifecycle:lifecycle-common:2.8.7
androidx.lifecycle:lifecycle-livedata-core:2.8.7
androidx.lifecycle:lifecycle-process:2.8.7
androidx.lifecycle:lifecycle-runtime-android:2.8.7
androidx.lifecycle:lifecycle-runtime-compose-android:2.8.7
androidx.lifecycle:lifecycle-runtime-compose:2.8.7
androidx.lifecycle:lifecycle-runtime-ktx-android:2.8.7
androidx.lifecycle:lifecycle-runtime-ktx:2.8.7
androidx.lifecycle:lifecycle-runtime:2.8.7
androidx.lifecycle:lifecycle-viewmodel-android:2.8.7
androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.8.7
androidx.lifecycle:lifecycle-viewmodel:2.8.7
androidx.profileinstaller:profileinstaller:1.3.1
androidx.savedstate:savedstate-ktx:1.2.1
androidx.savedstate:savedstate:1.2.1
androidx.startup:startup-runtime:1.1.1
androidx.tracing:tracing:1.0.0
androidx.versionedparcelable:versionedparcelable:1.1.1
com.google.guava:listenablefuture:1.0
com.squareup.okio:okio-jvm:3.3.0
com.squareup.okio:okio:3.3.0
org.jetbrains.kotlin:kotlin-bom:2.1.21
org.jetbrains.kotlin:kotlin-stdlib-common:2.1.21
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.1.21
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.1.21
org.jetbrains.kotlin:kotlin-stdlib:2.1.21
org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0
org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.9.0
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.9.0
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0
Expand Down
11 changes: 0 additions & 11 deletions workflow-runtime-android/README.md

This file was deleted.

10 changes: 0 additions & 10 deletions workflow-runtime-android/api/workflow-runtime-android.api

This file was deleted.

35 changes: 0 additions & 35 deletions workflow-runtime-android/build.gradle.kts

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions workflow-runtime-android/gradle.properties

This file was deleted.

10 changes: 5 additions & 5 deletions workflow-runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ This module contains the core APIs and logic for running workflows.
## Kotlin Multiplatform

This module is a Kotlin Multiplatform module. The targets currently included for build and test
are `jvm`, `ios`, and `iosSimulatorSimulatorArm64`. If you are having issues with the tests,
ensure you have the correct version of XCode installed and can launch a simulator as it's specified
in the gradle build file (Currently iPhone 14).
are `jvm`, `android`, `ios`, and `iosSimulatorSimulatorArm64`. If you are having issues with the
tests, ensure you have the correct version of XCode installed and can launch a simulator as it's
specified in the gradle build file (Currently iPhone 14).

You can also choose to specify your targets for build and test with the property `workflow.targets`
as either `kmp`, `jvm`, `ios`, `js`. The default is `kmp` (all the targets). Set this in your
global `~/.gradle/gradle.properties` or specify the property in your gradle command, e.g.:
as either `kmp`, `jvm`, `android`, `ios`, `js`. The default is `kmp` (all the targets). Set this in
your global `~/.gradle/gradle.properties` or specify the property in your gradle command, e.g.:

```bash
./gradlew build -Pworkflow.targets=jvm
Expand Down
Loading
Loading