From ce44f3f847b20683c8523e7c265422462cb1a2a6 Mon Sep 17 00:00:00 2001 From: Jake Wharton Date: Fri, 31 May 2024 10:20:16 -0400 Subject: [PATCH] Always build test-app presenter I would rather take the slight build hit than maintain the conditional logic and extra CI job. --- .github/workflows/build.yaml | 13 ------------- redwood-treehouse-host/build.gradle | 13 ++++--------- .../app/cash/redwood/treehouse/FakeHostApi.kt | 0 .../kotlin/app/cash/redwood/treehouse/LeaksTest.kt | 0 .../treehouse/RetainEverythingCodeListener.kt | 0 .../RetainEverythingEventListenerFactory.kt | 0 .../RetainEverythingTreehouseContentSource.kt | 0 .../app/cash/redwood/treehouse/TreehouseTester.kt | 0 .../cash/redwood/treehouse/TreehouseTesterTest.kt | 0 .../app/cash/redwood/treehouse/leaks/CycleFinder.kt | 0 .../cash/redwood/treehouse/leaks/FindCycleTest.kt | 0 .../app/cash/redwood/treehouse/leaks/JvmHeap.kt | 0 .../app/cash/redwood/treehouse/leaks/JvmHeapTest.kt | 0 .../app/cash/redwood/treehouse/leaks/LeakWatcher.kt | 0 settings.gradle | 4 ++-- 15 files changed, 6 insertions(+), 24 deletions(-) rename redwood-treehouse-host/src/{appsJvmTest => jvmTest}/kotlin/app/cash/redwood/treehouse/FakeHostApi.kt (100%) rename redwood-treehouse-host/src/{appsJvmTest => jvmTest}/kotlin/app/cash/redwood/treehouse/LeaksTest.kt (100%) rename redwood-treehouse-host/src/{appsJvmTest => jvmTest}/kotlin/app/cash/redwood/treehouse/RetainEverythingCodeListener.kt (100%) rename redwood-treehouse-host/src/{appsJvmTest => jvmTest}/kotlin/app/cash/redwood/treehouse/RetainEverythingEventListenerFactory.kt (100%) rename redwood-treehouse-host/src/{appsJvmTest => jvmTest}/kotlin/app/cash/redwood/treehouse/RetainEverythingTreehouseContentSource.kt (100%) rename redwood-treehouse-host/src/{appsJvmTest => jvmTest}/kotlin/app/cash/redwood/treehouse/TreehouseTester.kt (100%) rename redwood-treehouse-host/src/{appsJvmTest => jvmTest}/kotlin/app/cash/redwood/treehouse/TreehouseTesterTest.kt (100%) rename redwood-treehouse-host/src/{appsJvmTest => jvmTest}/kotlin/app/cash/redwood/treehouse/leaks/CycleFinder.kt (100%) rename redwood-treehouse-host/src/{appsJvmTest => jvmTest}/kotlin/app/cash/redwood/treehouse/leaks/FindCycleTest.kt (100%) rename redwood-treehouse-host/src/{appsJvmTest => jvmTest}/kotlin/app/cash/redwood/treehouse/leaks/JvmHeap.kt (100%) rename redwood-treehouse-host/src/{appsJvmTest => jvmTest}/kotlin/app/cash/redwood/treehouse/leaks/JvmHeapTest.kt (100%) rename redwood-treehouse-host/src/{appsJvmTest => jvmTest}/kotlin/app/cash/redwood/treehouse/leaks/LeakWatcher.kt (100%) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bfed92018a..7eb54c4957 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -85,19 +85,6 @@ jobs: - run: xcodebuild -project redwood-layout-uiview/RedwoodLayoutUIViewTests.xcodeproj -scheme RedwoodLayoutUIViewTests -destination 'platform=iOS Simulator,name=iPhone 15,OS=latest' test - treehouse-host-check: - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: 21 - - uses: gradle/actions/setup-gradle@v3 - - # Run the tests that transitively depend on :test-app if it's available. - - run: ./gradlew :redwood-treehouse-host:check - sample-counter: runs-on: macos-latest steps: diff --git a/redwood-treehouse-host/build.gradle b/redwood-treehouse-host/build.gradle index 928c3165ee..033a9039e5 100644 --- a/redwood-treehouse-host/build.gradle +++ b/redwood-treehouse-host/build.gradle @@ -50,11 +50,8 @@ kotlin { } } jvmTest { - if (!rootProject.hasProperty('redwoodNoApps')) { - kotlin.srcDir('src/appsJvmTest/kotlin') - dependencies { - implementation projects.testApp.presenterTreehouse - } + dependencies { + implementation projects.testApp.presenterTreehouse } } } @@ -96,8 +93,6 @@ android { } // TreehouseTester expects to load our test application. -if (!rootProject.hasProperty('redwoodNoApps')) { - tasks.withType(Test.class).configureEach { - it.dependsOn(":test-app:presenter-treehouse:compileDevelopmentExecutableKotlinJsZipline") - } +tasks.withType(Test).configureEach { + it.dependsOn(":test-app:presenter-treehouse:compileDevelopmentExecutableKotlinJsZipline") } diff --git a/redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/FakeHostApi.kt b/redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/FakeHostApi.kt similarity index 100% rename from redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/FakeHostApi.kt rename to redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/FakeHostApi.kt diff --git a/redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/LeaksTest.kt b/redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/LeaksTest.kt similarity index 100% rename from redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/LeaksTest.kt rename to redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/LeaksTest.kt diff --git a/redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/RetainEverythingCodeListener.kt b/redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/RetainEverythingCodeListener.kt similarity index 100% rename from redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/RetainEverythingCodeListener.kt rename to redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/RetainEverythingCodeListener.kt diff --git a/redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/RetainEverythingEventListenerFactory.kt b/redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/RetainEverythingEventListenerFactory.kt similarity index 100% rename from redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/RetainEverythingEventListenerFactory.kt rename to redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/RetainEverythingEventListenerFactory.kt diff --git a/redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/RetainEverythingTreehouseContentSource.kt b/redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/RetainEverythingTreehouseContentSource.kt similarity index 100% rename from redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/RetainEverythingTreehouseContentSource.kt rename to redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/RetainEverythingTreehouseContentSource.kt diff --git a/redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/TreehouseTester.kt b/redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/TreehouseTester.kt similarity index 100% rename from redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/TreehouseTester.kt rename to redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/TreehouseTester.kt diff --git a/redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/TreehouseTesterTest.kt b/redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/TreehouseTesterTest.kt similarity index 100% rename from redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/TreehouseTesterTest.kt rename to redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/TreehouseTesterTest.kt diff --git a/redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/leaks/CycleFinder.kt b/redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/leaks/CycleFinder.kt similarity index 100% rename from redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/leaks/CycleFinder.kt rename to redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/leaks/CycleFinder.kt diff --git a/redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/leaks/FindCycleTest.kt b/redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/leaks/FindCycleTest.kt similarity index 100% rename from redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/leaks/FindCycleTest.kt rename to redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/leaks/FindCycleTest.kt diff --git a/redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/leaks/JvmHeap.kt b/redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/leaks/JvmHeap.kt similarity index 100% rename from redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/leaks/JvmHeap.kt rename to redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/leaks/JvmHeap.kt diff --git a/redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/leaks/JvmHeapTest.kt b/redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/leaks/JvmHeapTest.kt similarity index 100% rename from redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/leaks/JvmHeapTest.kt rename to redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/leaks/JvmHeapTest.kt diff --git a/redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/leaks/LeakWatcher.kt b/redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/leaks/LeakWatcher.kt similarity index 100% rename from redwood-treehouse-host/src/appsJvmTest/kotlin/app/cash/redwood/treehouse/leaks/LeakWatcher.kt rename to redwood-treehouse-host/src/jvmTest/kotlin/app/cash/redwood/treehouse/leaks/LeakWatcher.kt diff --git a/settings.gradle b/settings.gradle index bf204b6c5e..fefc125e02 100644 --- a/settings.gradle +++ b/settings.gradle @@ -85,6 +85,8 @@ include ':redwood-widget-compose' include ':redwood-widget-testing' include ':redwood-yoga' +include ':test-app:presenter' +include ':test-app:presenter-treehouse' include ':test-app:schema' include ':test-app:schema:compose' include ':test-app:schema:modifiers' @@ -98,8 +100,6 @@ if (!hasProperty('redwoodNoApps')) { include ':test-app:browser' include ':test-app:ios-shared' include ':test-app:launcher' - include ':test-app:presenter' - include ':test-app:presenter-treehouse' include ':samples:counter:android-composeui' include ':samples:counter:android-views'