From 2786dfaab957c10f032ba81466614dde9d6b3ef8 Mon Sep 17 00:00:00 2001 From: Lachlan McKee Date: Fri, 30 Aug 2024 09:27:03 +0100 Subject: [PATCH] Stop running 2.x build on 1.x branch --- .github/workflows/build_1.x.yml | 2 ++ .github/workflows/build_2.x.yml | 2 ++ build.gradle.kts | 18 ++++++++++++++---- gradle/libs.versions.toml | 2 +- libraries/core/build.gradle.kts | 1 - 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_1.x.yml b/.github/workflows/build_1.x.yml index bd3a823e9..744891b4b 100644 --- a/.github/workflows/build_1.x.yml +++ b/.github/workflows/build_1.x.yml @@ -5,6 +5,8 @@ on: branches: - 1.x pull_request: + branches: + - 1.x workflow_dispatch: env: diff --git a/.github/workflows/build_2.x.yml b/.github/workflows/build_2.x.yml index 5f6c92694..d253d18a2 100644 --- a/.github/workflows/build_2.x.yml +++ b/.github/workflows/build_2.x.yml @@ -5,6 +5,8 @@ on: branches: - 2.x pull_request: + branches: + - 2.x workflow_dispatch: env: diff --git a/build.gradle.kts b/build.gradle.kts index 04c2c1f5f..d51cbefc3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,4 @@ +import com.android.Version import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.dsl.KotlinVersion import org.jetbrains.kotlin.gradle.tasks.KotlinCompile @@ -100,10 +101,19 @@ tasks.withType(KotlinJvmCompile::class.java).configureEach { allprojects { configurations.all { - resolutionStrategy.dependencySubstitution { - substitute(module("com.bumble.appyx:customisations")) - .using(project(":libraries:customisations")) - .because("RIBs uses Appyx customisations as external dependency") + resolutionStrategy { + failOnNonReproducibleResolution() + dependencySubstitution { + substitute(module("com.bumble.appyx:customisations")) + .using(project(":libraries:customisations")) + .because("RIBs uses Appyx customisations as external dependency") + } + eachDependency { + when (requested.group) { + // Version 1.0 and 1.1 are included which cause ':libraries:core' espresso tests to fail + "androidx.tracing" -> useVersion(libs.versions.androidx.tracing.get()) + } + } } } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 51f787025..7063bbb4b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -7,6 +7,7 @@ androidTargetSdk = "34" accompanist = "0.28.0" androidx-lifecycle = "2.6.1" androidx-navigation-compose = "2.5.1" +androidx-tracing = "1.2.0" coil = "2.2.1" composeBom = "2024.04.00" ribs = "0.39.0" @@ -27,7 +28,6 @@ androidx-lifecycle-common = { module = "androidx.lifecycle:lifecycle-common", ve androidx-lifecycle-java8 = { module = "androidx.lifecycle:lifecycle-common-java8", version.ref = "androidx-lifecycle" } androidx-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidx-lifecycle" } androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "androidx-navigation-compose" } -androidx-tracing = "androidx.tracing:tracing:1.2.0" androidx-test-espresso-core = "androidx.test.espresso:espresso-core:3.6.0" androidx-test-junit = "androidx.test.ext:junit:1.2.0" androidx-test-rules = "androidx.test:rules:1.6.0" diff --git a/libraries/core/build.gradle.kts b/libraries/core/build.gradle.kts index f60486504..c03ab1b3d 100644 --- a/libraries/core/build.gradle.kts +++ b/libraries/core/build.gradle.kts @@ -50,7 +50,6 @@ dependencies { api(libs.androidx.appcompat) api(libs.kotlin.coroutines.android) - debugImplementation(libs.androidx.tracing) // Espresso fails without this implementation(composeBom) implementation(libs.androidx.activity.compose) implementation(libs.androidx.lifecycle.java8)