Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/android_unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
# Tasks are listed per package rather than using the root testDebugUnitTest
# task, which would also build the Dart sources of the aggregate test app.
# Add a task here when a package gains an android/src/test directory.
run: cd tests/android && ./gradlew :firebase_crashlytics:testDebugUnitTest :cloud_functions:testDebugUnitTest :firebase_messaging:testDebugUnitTest
run: cd tests/android && ./gradlew :firebase_crashlytics:testDebugUnitTest :cloud_functions:testDebugUnitTest :cloud_firestore:testDebugUnitTest :firebase_messaging:testDebugUnitTest
- name: 'Upload test reports'
if: failure()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
Expand Down
32 changes: 30 additions & 2 deletions packages/cloud_firestore/cloud_firestore/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ buildscript {
}
}

allprojects {
rootProject.allprojects {
repositories {
google()
mavenCentral()
}
}


def firebaseCoreProject = findProject(':firebase_core')
if (firebaseCoreProject == null) {
throw new GradleException('Could not find the firebase_core FlutterFire plugin, have you added it as a dependency in your pubspec?')
Expand Down Expand Up @@ -50,6 +49,11 @@ android {
targetCompatibility project.ext.javaVersion
}

sourceSets {
main.java.srcDirs += "src/main/kotlin"
test.java.srcDirs += "src/test/kotlin"
}

buildFeatures {
buildConfig = true
}
Expand All @@ -58,6 +62,10 @@ android {
disable 'InvalidPackage'
}

testOptions {
unitTests.returnDefaultValues = true
}

dependencies {
api firebaseCoreProject
implementation platform("com.google.firebase:firebase-bom:${getRootProjectExtOrCoreProperty("FirebaseSDKVersion", firebaseCoreProject)}")
Expand All @@ -69,6 +77,26 @@ android {
exclude group: 'com.google.truth', module: 'truth'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
}
implementation 'androidx.annotation:annotation:1.7.0'
testImplementation 'junit:junit:4.13.2'
}
}

// Built-in Kotlin registers this extension before the script gets here.
// When it is off, Flutter applies the Kotlin plugin after this script.
if (extensions.findByName("kotlin") != null) {
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.fromTarget(project.ext.javaVersion.toString())
}
}
} else {
plugins.withId("org.jetbrains.kotlin.android") {
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.fromTarget(project.ext.javaVersion.toString())
}
}
}
}

Expand Down

This file was deleted.

This file was deleted.

Loading
Loading