Skip to content

MinSDK 23 #7119

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

Merged
merged 14 commits into from
Jul 9, 2025
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extra["targetSdkVersion"] = 34

extra["compileSdkVersion"] = 34

extra["minSdkVersion"] = 21
extra["minSdkVersion"] = 23

firebaseContinuousIntegration {
ignorePaths =
Expand Down
2 changes: 1 addition & 1 deletion firebase-ai/firebase-ai.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ android {
namespace = "com.google.firebase.ai"
compileSdk = 34
defaultConfig {
minSdk = 21
minSdk = rootProject.extra["minSdkVersion"] as Int
consumerProguardFiles("consumer-rules.pro")
multiDexEnabled = true
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public void testInitializeApp_shouldPublishVersionForFirebaseCommon() {
// After sorting the user agents are expected to be {"fire-android/", "fire-auth/x.y.z",
// "fire-core/x.y.z", "test-component/1.2.3"}
assertThat(actualUserAgent[0]).contains("android-installer");
assertThat(actualUserAgent[1]).contains("android-min-sdk/21");
assertThat(actualUserAgent[1]).contains("android-min-sdk/23");
assertThat(actualUserAgent[2]).contains("android-platform");
assertThat(actualUserAgent[3]).contains("android-target-sdk");
assertThat(actualUserAgent[4]).contains("device-brand");
Expand Down
2 changes: 1 addition & 1 deletion firebase-config/firebase-config.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ android {
compileSdk = targetSdkVersion

defaultConfig {
minSdk = 21
minSdk = rootProject.extra["minSdkVersion"] as Int
multiDexEnabled = true
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
2 changes: 1 addition & 1 deletion firebase-dataconnect/demo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ android {
namespace = "com.google.firebase.dataconnect.minimaldemo"
compileSdk = 35
defaultConfig {
minSdk = 21
minSdk = 23
targetSdk = 35
versionCode = 1
versionName = "1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ abstract class FactoryTestRule<T, P> : ExternalResource() {
override fun after() {
active.set(false)
while (instances.isNotEmpty()) {
destroyInstance(instances.removeLast())
destroyInstance(instances.removeAt(instances.lastIndex))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.robolectric.annotation.Config;

@RunWith(RobolectricTestRunner.class)
@Config(sdk = 21, manifest = Config.NONE)
@Config(sdk = 23, manifest = Config.NONE)
public class MemorySpecTest extends SpecTestCase {

private static final String DURABLE_PERSISTENCE = "durable-persistence";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
import org.robolectric.shadows.ShadowPackageManager;

@RunWith(RobolectricTestRunner.class)
@Config(sdk = 21, qualifiers = "port")
@Config(sdk = 23, qualifiers = "port")
@LooperMode(LooperMode.Mode.LEGACY)
public class FirebaseInAppMessagingDisplayTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.robolectric.annotation.Config;

@RunWith(RobolectricTestRunner.class)
@Config(sdk = 21)
@Config(sdk = 23)
public class OnSwipeListenerTest {
private OnSwipeUpListener onSwipeListener;
private boolean sweptUp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import org.robolectric.annotation.Config;

@RunWith(RobolectricTestRunner.class)
@Config(sdk = 21, qualifiers = "por")
@Config(sdk = 23, qualifiers = "por")
public class FiamImageLoaderTest {
private static final String IMAGE_URL = "https://www.imgur.com";
@Mock private RequestManager glideRequestManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import org.robolectric.annotation.Config;

@RunWith(RobolectricTestRunner.class)
@Config(sdk = 21, qualifiers = "port")
@Config(sdk = 23, qualifiers = "port")
public class FiamWindowManagerTest {
private static final Context appContext = ApplicationProvider.getApplicationContext();
private static final int WINDOW_GRAVITY = Gravity.CENTER;
Expand Down
2 changes: 1 addition & 1 deletion firebase-messaging/src/test/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
android:versionCode="1"
android:versionName="1">

<!--<uses-sdk android:minSdkVersion="21"/>-->
<!--<uses-sdk android:minSdkVersion="23"/>-->
<application>
<service android:exported="false"
android:name="com.google.firebase.components.ComponentDiscoveryService">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ public void testClickActionAndLink() {

/** Test that a valid notification with color is displayed. */
@Test
@Config(sdk = Build.VERSION_CODES.LOLLIPOP)
@Config(sdk = Build.VERSION_CODES.M)
public void testColor() {
final String color = "#123456";
Bundle data = new Bundle();
Expand All @@ -489,7 +489,7 @@ public void testColor() {
}

@Test
@Config(sdk = Build.VERSION_CODES.LOLLIPOP)
@Config(sdk = Build.VERSION_CODES.M)
public void testNoColor() {
Bundle data = new Bundle();
data.putString(KEY_TITLE, "title 123");
Expand All @@ -503,7 +503,7 @@ public void testNoColor() {

/** Test that the user can choose the default color via AndroidManifest metadata. */
@Test
@Config(sdk = Build.VERSION_CODES.LOLLIPOP)
@Config(sdk = Build.VERSION_CODES.M)
public void testColorFromMetadata() {
Bundle metadata = new Bundle();
metadata.putInt(
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sdk=21
sdk=23
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ internal class FakeFirebaseApp(
val packageInfo = PackageInfoBuilder.newBuilder().setPackageName(context.packageName).build()
packageInfo.versionName = MOCK_APP_VERSION

metadata?.let { packageInfo.applicationInfo.metaData = it }
metadata?.let { packageInfo.applicationInfo!!.metaData = it }
shadowPackageManager.installPackage(packageInfo)

val activityManager = context.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

/** Tests for {@link FirebaseStorage}. */
@RunWith(RobolectricTestRunner.class)
@Config(sdk = Build.VERSION_CODES.LOLLIPOP_MR1)
@Config(sdk = Build.VERSION_CODES.M)
public class DeleteTest {

@Rule public RetryRule retryRule = new RetryRule(3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

/** Tests for {@link FirebaseStorage}. */
@RunWith(RobolectricTestRunner.class)
@Config(sdk = Build.VERSION_CODES.LOLLIPOP_MR1)
@Config(sdk = Build.VERSION_CODES.M)
public class ListTest {

@Rule public RetryRule retryRule = new RetryRule(3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

/** Tests for {@link FirebaseStorage}. */
@RunWith(RobolectricTestRunner.class)
@Config(sdk = Build.VERSION_CODES.LOLLIPOP_MR1)
@Config(sdk = Build.VERSION_CODES.M)
public class MetadataTest {

@Rule public RetryRule retryRule = new RetryRule(3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import org.robolectric.annotation.Config;

@RunWith(RobolectricTestRunner.class)
@Config(sdk = Build.VERSION_CODES.LOLLIPOP_MR1)
@Config(sdk = Build.VERSION_CODES.M)
public class NetworkRequestTest {

private FirebaseApp app;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

/** Tests for {@link FirebaseStorage}. */
@RunWith(RobolectricTestRunner.class)
@Config(sdk = Build.VERSION_CODES.LOLLIPOP_MR1)
@Config(sdk = Build.VERSION_CODES.M)
public class PathingTest {

@Rule public RetryRule retryRule = new RetryRule(3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
/** Tests for {@link FirebaseStorage}. */
@SuppressWarnings("ConstantConditions")
@RunWith(RobolectricTestRunner.class)
@Config(sdk = Build.VERSION_CODES.LOLLIPOP_MR1)
@Config(sdk = Build.VERSION_CODES.M)
public class UploadTest {

private static final String TEST_ASSET_ROOT = "assets/";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.robolectric.annotation.Config;

@RunWith(RobolectricTestRunner.class)
@Config(sdk = Build.VERSION_CODES.LOLLIPOP_MR1)
@Config(sdk = Build.VERSION_CODES.M)
public class StorageReferenceUriTest {

private static final EmulatedServiceSettings EMULATOR_SETTINGS =
Expand Down
2 changes: 1 addition & 1 deletion firebase-vertexai/firebase-vertexai.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ android {
namespace = "com.google.firebase.vertexai"
compileSdk = 34
defaultConfig {
minSdk = 21
minSdk = rootProject.extra["minSdkVersion"] as Int
consumerProguardFiles("consumer-rules.pro")
multiDexEnabled = true
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package com.google.android.datatransport.runtime.scheduling.jobscheduling;

import static android.os.Build.VERSION_CODES.LOLLIPOP;
import static android.os.Build.VERSION_CODES.M;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.AdditionalMatchers.gt;
import static org.mockito.ArgumentMatchers.any;
Expand Down Expand Up @@ -47,7 +47,7 @@
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;

@Config(sdk = {LOLLIPOP})
@Config(sdk = {M})
@RunWith(RobolectricTestRunner.class)
public class AlarmManagerSchedulerTest {
private static final long TWENTY_FOUR_HOURS = 24 * 60 * 60 * 1000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package com.google.android.datatransport.runtime.scheduling.jobscheduling;

import static android.os.Build.VERSION_CODES.LOLLIPOP;
import static android.os.Build.VERSION_CODES.M;
import static com.google.common.truth.Truth.assertThat;

import android.app.job.JobInfo;
Expand All @@ -37,7 +37,7 @@
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;

@Config(sdk = {LOLLIPOP})
@Config(sdk = {M})
@RunWith(RobolectricTestRunner.class)
public class JobInfoSchedulerTest {
private static final long TWENTY_FOUR_HOURS = 24 * 60 * 60 * 1000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package com.google.android.datatransport.runtime.scheduling.jobscheduling;

import static android.os.Build.VERSION_CODES.LOLLIPOP;
import static android.os.Build.VERSION_CODES.M;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.argThat;
Expand Down Expand Up @@ -52,7 +52,7 @@
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;

@Config(sdk = {LOLLIPOP})
@Config(sdk = {M})
@RunWith(RobolectricTestRunner.class)
public class UploaderTest {
private static final SynchronizationGuard guard =
Expand Down
Loading