Skip to content

Commit

Permalink
feat(firebase_remote_config): use new Android Firebase SDK versioning…
Browse files Browse the repository at this point in the history
… setup
  • Loading branch information
Salakar committed Jul 31, 2020
1 parent 7316eaa commit 680d539
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
8 changes: 8 additions & 0 deletions packages/firebase_remote_config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
## 0.4.0-dev.1

* Depend on new `firebase_core` (pre-release).
* Firebase iOS SDK versions are now locked to use the same version defined in
`firebase_core`.
* Firebase Android SDK versions are now using the Firebase Bill of Materials (BoM)
to specify individual SDK versions. BoM version is also sourced from
`firebase_core`.
* Added support for MacOS.
* Allow iOS & MacOS plugins to be imported as modules.


## 0.3.1+1

Expand Down
20 changes: 17 additions & 3 deletions packages/firebase_remote_config/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ rootProject.allprojects {

apply plugin: 'com.android.library'

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?')
} else if (!firebaseCoreProject.properties['FirebaseSDKVersion']) {
throw new GradleException('A newer version of the firebase_core FlutterFire plugin is required, please update your firebase_core pubspec dependency.')
}

def getRootProjectExtOrCoreProperty(name, firebaseCoreProject) {
if (!rootProject.ext.has('FlutterFire')) return firebaseCoreProject.properties[name]
if (!rootProject.ext.get('FlutterFire')[name]) return firebaseCoreProject.properties[name]
return rootProject.ext.get('FlutterFire').get(name)
}

android {
compileSdkVersion 28

Expand All @@ -32,9 +45,10 @@ android {
disable 'InvalidPackage'
}
dependencies {
api 'com.google.firebase:firebase-config:19.0.3'
implementation 'com.google.firebase:firebase-common:19.3.0'
implementation 'androidx.annotation:annotation:1.0.0'
api firebaseCoreProject
implementation platform("com.google.firebase:firebase-bom:${getRootProjectExtOrCoreProperty("FirebaseSDKVersion", firebaseCoreProject)}")
implementation 'com.google.firebase:firebase-config'
implementation 'androidx.annotation:annotation:1.1.0'
}
}

Expand Down

This file was deleted.

0 comments on commit 680d539

Please sign in to comment.