Skip to content

Upgrade to agp 7.4.2 #5127

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 5 commits into from
Jul 14, 2023
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
9 changes: 2 additions & 7 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ ktfmt {
googleStyle()
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

dependencies {
// Firebase performance plugin, it should be added here because of how gradle dependency
// resolution works, otherwise it breaks Fireperf Test Apps.
Expand All @@ -70,8 +65,8 @@ dependencies {

implementation(libs.kotlinx.serialization.json)
implementation("com.google.code.gson:gson:2.8.9")
implementation("com.android.tools.build:gradle:7.3.1")
implementation("com.android.tools.build:builder-test-api:7.2.2")
implementation("com.android.tools.build:gradle:7.4.2")
implementation("com.android.tools.build:builder-test-api:7.4.2")
implementation("gradle.plugin.com.github.sherter.google-java-format:google-java-format-gradle-plugin:0.9")

testImplementation(libs.bundles.kotest)
Expand Down
38 changes: 14 additions & 24 deletions firebase-firestore/firebase-firestore.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ protobuf {
}
}
}

android {
adbOptions {
timeOutInMs 60 * 1000
Expand All @@ -64,15 +65,23 @@ android {
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'proguard.txt'

def targetBackend = findProperty("targetBackend") ?: "emulator"
buildConfigField("String", "TARGET_BACKEND", "\"$targetBackend\"")

def localProps = new Properties()

try {
file("local.properties").withInputStream { localProps.load(it) }
} catch (FileNotFoundException e) {
}
}

sourceSets {
main {
proto {
srcDir 'src/proto'
}
java {
}
}
test {
java {
Expand All @@ -92,30 +101,12 @@ android {
}
testOptions.unitTests.includeAndroidResources = true

// Acceptable values are: 'emulator', 'qa', 'nightly', and 'prod'.
ext.targetBackend = 'emulator'
}

tasks.withType(Test) {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}

android.libraryVariants.all { variant ->
if (findProperty('targetBackend')) {
variant.buildConfigField("String", "TARGET_BACKEND", "\"${property("targetBackend")}\"")
} else {
// By default set the target backend to 'emulator'
variant.buildConfigField("String", "TARGET_BACKEND", "\"emulator\"")
}

def localProps = new Properties()

try {
file("local.properties").withInputStream { localProps.load(it) }
} catch (FileNotFoundException e) {
}
}

googleJavaFormat {
exclude 'src/testUtil/java/com/google/firebase/firestore/testutil/Assert.java'
exclude 'src/testUtil/java/com/google/firebase/firestore/testutil/ThrowingRunnable.java'
Expand Down Expand Up @@ -161,7 +152,6 @@ dependencies {
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.9.8'
testImplementation 'com.google.guava:guava-testlib:12.0-rc2'

androidTestImplementation project(':firebase-firestore')
androidTestImplementation 'junit:junit:4.13.2'
androidTestImplementation("com.google.truth:truth:$googleTruthVersion"){
exclude group: "org.codehaus.mojo", module: "animal-sniffer-annotations"
Expand All @@ -170,9 +160,9 @@ dependencies {
androidTestImplementation 'org.mockito:mockito-android:2.25.0'
androidTestImplementation 'com.fasterxml.jackson.core:jackson-databind:2.9.8'
androidTestImplementation "androidx.annotation:annotation:1.1.0"
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test:rules:1.2.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test:rules:1.5.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
}

gradle.projectsEvaluated {
Expand Down