Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert to API 21 as minSDK for all but Auth #594

Merged
merged 1 commit into from
Aug 28, 2024
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
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also just delete this test. It's gonna fail cause the methods it tests are deprecated and only return an empty list

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
Loading