Skip to content

Commit

Permalink
Revert to API 21 as minSDK for all but Auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Daeda88 committed Aug 27, 2024
1 parent 0b0cee3 commit 685417e
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 18 deletions.
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ buildscript {
}

val compileSdkVersion by extra(34)
val minSdkVersion by extra(23)
val targetSdkVersion by extra(34)
val minSdkVersion by extra(21)

tasks {
register("updateVersions") {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import com.android.build.api.dsl.ManagedVirtualDevice
import com.android.build.api.dsl.TestOptions
import org.gradle.api.Project
import org.gradle.kotlin.dsl.create
import org.gradle.kotlin.dsl.provideDelegate

fun TestOptions.configureTestOptions() {
fun TestOptions.configureTestOptions(project: Project) {
val targetSdkVersion: Int by project
targetSdk = targetSdkVersion
unitTests {
isIncludeAndroidResources = true
all { test: org.gradle.api.tasks.testing.Test ->
Expand Down
2 changes: 1 addition & 1 deletion firebase-analytics/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

testOptions.configureTestOptions()
testOptions.configureTestOptions(project)
packaging {
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
resources.pickFirsts.add("META-INF/AL2.0")
Expand Down
2 changes: 1 addition & 1 deletion firebase-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

testOptions.configureTestOptions()
testOptions.configureTestOptions(project)
packaging {
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
resources.pickFirsts.add("META-INF/AL2.0")
Expand Down
5 changes: 2 additions & 3 deletions firebase-auth/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ plugins {
}

android {
val minSdkVersion: Int by project
val compileSdkVersion: Int by project

compileSdk = compileSdkVersion
namespace = "dev.gitlive.firebase.auth"

defaultConfig {
minSdk = minSdkVersion
minSdk = 23 // Auth has a MinSDK of 23. See https://github.com/firebase/firebase-android-sdk/issues/5927#issuecomment-2093466572
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

Expand All @@ -35,7 +34,7 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

testOptions.configureTestOptions()
testOptions.configureTestOptions(project)
packaging {
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
resources.pickFirsts.add("META-INF/AL2.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class FirebaseAuthTest {
}

@Test
@Ignore
fun testFetchSignInMethods() = runTest {
val email = "test+${Random.nextInt(100000)}@test.com"
var signInMethodResult = auth.fetchSignInMethodsForEmail(email)
Expand Down
2 changes: 1 addition & 1 deletion firebase-common-internal/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

testOptions.configureTestOptions()
testOptions.configureTestOptions(project)

packaging {
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
Expand Down
2 changes: 1 addition & 1 deletion firebase-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

testOptions.configureTestOptions()
testOptions.configureTestOptions(project)

packaging {
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
Expand Down
2 changes: 1 addition & 1 deletion firebase-config/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

testOptions.configureTestOptions()
testOptions.configureTestOptions(project)
packaging {
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
resources.pickFirsts.add("META-INF/AL2.0")
Expand Down
2 changes: 1 addition & 1 deletion firebase-crashlytics/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

testOptions.configureTestOptions()
testOptions.configureTestOptions(project)
packaging {
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
resources.pickFirsts.add("META-INF/AL2.0")
Expand Down
2 changes: 1 addition & 1 deletion firebase-database/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

testOptions.configureTestOptions()
testOptions.configureTestOptions(project)
packaging {
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
resources.pickFirsts.add("META-INF/AL2.0")
Expand Down
2 changes: 1 addition & 1 deletion firebase-firestore/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

testOptions.configureTestOptions()
testOptions.configureTestOptions(project)
packaging {
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
resources.pickFirsts.add("META-INF/AL2.0")
Expand Down
2 changes: 1 addition & 1 deletion firebase-functions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

testOptions.configureTestOptions()
testOptions.configureTestOptions(project)
packaging {
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
resources.pickFirsts.add("META-INF/AL2.0")
Expand Down
2 changes: 1 addition & 1 deletion firebase-installations/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

testOptions.configureTestOptions()
testOptions.configureTestOptions(project)
packaging {
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
resources.pickFirsts.add("META-INF/AL2.0")
Expand Down
2 changes: 1 addition & 1 deletion firebase-messaging/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

testOptions.configureTestOptions()
testOptions.configureTestOptions(project)
packaging {
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
resources.pickFirsts.add("META-INF/AL2.0")
Expand Down
2 changes: 1 addition & 1 deletion firebase-perf/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

testOptions.configureTestOptions()
testOptions.configureTestOptions(project)
packaging {
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
resources.pickFirsts.add("META-INF/AL2.0")
Expand Down
2 changes: 1 addition & 1 deletion firebase-storage/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

testOptions.configureTestOptions()
testOptions.configureTestOptions(project)
packaging {
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
resources.pickFirsts.add("META-INF/AL2.0")
Expand Down

0 comments on commit 685417e

Please sign in to comment.