Skip to content

Commit 2513474

Browse files
author
Chris Yang
authored
[firebase_database] Support v2 android embedder. (#287)
1 parent 002149d commit 2513474

File tree

16 files changed

+682
-537
lines changed

16 files changed

+682
-537
lines changed

packages/firebase_database/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 3.1.0
2+
3+
* Support Android V2 embedding.
4+
* Migrate to using the new e2e test binding.
5+
16
## 3.0.9
27

38
* Updated README instructions for contributing for consistency with other Flutterfire plugins.

packages/firebase_database/android/build.gradle

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,28 @@ android {
3838
}
3939

4040
apply from: file("./user-agent.gradle")
41+
42+
afterEvaluate {
43+
def containsEmbeddingDependencies = false
44+
for (def configuration : configurations.all) {
45+
for (def dependency : configuration.dependencies) {
46+
if (dependency.group == 'io.flutter' &&
47+
dependency.name.startsWith('flutter_embedding') &&
48+
dependency.isTransitive())
49+
{
50+
containsEmbeddingDependencies = true
51+
break
52+
}
53+
}
54+
}
55+
if (!containsEmbeddingDependencies) {
56+
android {
57+
dependencies {
58+
def lifecycle_version = "1.1.1"
59+
compileOnly "android.arch.lifecycle:runtime:$lifecycle_version"
60+
compileOnly "android.arch.lifecycle:common:$lifecycle_version"
61+
compileOnly "android.arch.lifecycle:common-java8:$lifecycle_version"
62+
}
63+
}
64+
}
65+
}

0 commit comments

Comments
 (0)