Skip to content

Commit

Permalink
Add a gradle warning to the AndroidX plugins (flutter#1138)
Browse files Browse the repository at this point in the history
This warning is only printed once per plugin on build failure.

flutter/flutter#27106
  • Loading branch information
Michael Klimushyn authored Feb 8, 2019
1 parent 79eeec5 commit 5169655
Show file tree
Hide file tree
Showing 101 changed files with 651 additions and 37 deletions.
6 changes: 6 additions & 0 deletions packages/android_alarm_manager/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.4.1+1

* Log a more detailed warning at build time about the previous AndroidX
migration.

## 0.4.1
* Added support for setting alarms which persist across reboots.
* Both `AndroidAlarmManager.oneShot` and `AndroidAlarmManager.periodic` have
Expand All @@ -23,6 +28,7 @@
```

## 0.4.0

* **Breaking change**. Migrated the underlying AlarmService to utilize a
BroadcastReceiver with a JobIntentService instead of a Service to handle
processing of alarms. This requires AndroidManifest.xml to be updated to
Expand Down
13 changes: 13 additions & 0 deletions packages/android_alarm_manager/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
def PLUGIN = "android_alarm_manager";
def ANDROIDX_WARNING = "flutterPluginsAndroidXWarning";
gradle.buildFinished { buildResult ->
if (buildResult.failure && !rootProject.ext.has(ANDROIDX_WARNING)) {
println ' *********************************************************'
println 'WARNING: This version of ' + PLUGIN + ' will break your Android build if it or its dependencies aren\'t compatible with AndroidX.'
println ' See https://goo.gl/CP92wY for more information on the problem and how to fix it.'
println ' This warning prints for all Android build failures. The real root cause of the error may be unrelated.'
println ' *********************************************************'
rootProject.ext.set(ANDROIDX_WARNING, true);
}
}

group 'io.flutter.plugins.androidalarmmanager'
version '1.0-SNAPSHOT'

Expand Down
2 changes: 1 addition & 1 deletion packages/android_alarm_manager/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: android_alarm_manager
description: Flutter plugin for accessing the Android AlarmManager service, and
running Dart code in the background when alarms fire.
version: 0.4.1
version: 0.4.1+1
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/android_alarm_manager

Expand Down
5 changes: 5 additions & 0 deletions packages/android_intent/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.3.0+1

* Log a more detailed warning at build time about the previous AndroidX
migration.

## 0.3.0

* **Breaking change**. Migrate from the deprecated original Android Support
Expand Down
13 changes: 13 additions & 0 deletions packages/android_intent/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
def PLUGIN = "android_intent";
def ANDROIDX_WARNING = "flutterPluginsAndroidXWarning";
gradle.buildFinished { buildResult ->
if (buildResult.failure && !rootProject.ext.has(ANDROIDX_WARNING)) {
println ' *********************************************************'
println 'WARNING: This version of ' + PLUGIN + ' will break your Android build if it or its dependencies aren\'t compatible with AndroidX.'
println ' See https://goo.gl/CP92wY for more information on the problem and how to fix it.'
println ' This warning prints for all Android build failures. The real root cause of the error may be unrelated.'
println ' *********************************************************'
rootProject.ext.set(ANDROIDX_WARNING, true);
}
}

group 'io.flutter.plugins.androidintent'
version '1.0-SNAPSHOT'

Expand Down
2 changes: 1 addition & 1 deletion packages/android_intent/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: android_intent
description: Flutter plugin for launching Android Intents. Not supported on iOS.
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/android_intent
version: 0.3.0
version: 0.3.0+1

flutter:
plugin:
Expand Down
5 changes: 5 additions & 0 deletions packages/battery/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.3.0+1

* Log a more detailed warning at build time about the previous AndroidX
migration.

## 0.3.0

* **Breaking change**. Migrate from the deprecated original Android Support
Expand Down
13 changes: 13 additions & 0 deletions packages/battery/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
def PLUGIN = "battery";
def ANDROIDX_WARNING = "flutterPluginsAndroidXWarning";
gradle.buildFinished { buildResult ->
if (buildResult.failure && !rootProject.ext.has(ANDROIDX_WARNING)) {
println ' *********************************************************'
println 'WARNING: This version of ' + PLUGIN + ' will break your Android build if it or its dependencies aren\'t compatible with AndroidX.'
println ' See https://goo.gl/CP92wY for more information on the problem and how to fix it.'
println ' This warning prints for all Android build failures. The real root cause of the error may be unrelated.'
println ' *********************************************************'
rootProject.ext.set(ANDROIDX_WARNING, true);
}
}

group 'io.flutter.plugins.battery'
version '1.0-SNAPSHOT'

Expand Down
2 changes: 1 addition & 1 deletion packages/battery/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for accessing information about the battery state
(full, charging, discharging) on Android and iOS.
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/battery
version: 0.3.0
version: 0.3.0+1

flutter:
plugin:
Expand Down
5 changes: 5 additions & 0 deletions packages/camera/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.3.0+3

* Log a more detailed warning at build time about the previous AndroidX
migration.

## 0.3.0+2

* Fix issue with calculating iOS image orientation in certain edge cases.
Expand Down
13 changes: 13 additions & 0 deletions packages/camera/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
def PLUGIN = "camera";
def ANDROIDX_WARNING = "flutterPluginsAndroidXWarning";
gradle.buildFinished { buildResult ->
if (buildResult.failure && !rootProject.ext.has(ANDROIDX_WARNING)) {
println ' *********************************************************'
println 'WARNING: This version of ' + PLUGIN + ' will break your Android build if it or its dependencies aren\'t compatible with AndroidX.'
println ' See https://goo.gl/CP92wY for more information on the problem and how to fix it.'
println ' This warning prints for all Android build failures. The real root cause of the error may be unrelated.'
println ' *********************************************************'
rootProject.ext.set(ANDROIDX_WARNING, true);
}
}

group 'io.flutter.plugins.camera'
version '1.0-SNAPSHOT'

Expand Down
2 changes: 1 addition & 1 deletion packages/camera/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: camera
description: A Flutter plugin for getting information about and controlling the
camera on Android and iOS. Supports previewing the camera feed and capturing images.
version: 0.3.0+2
version: 0.3.0+3
authors:
- Flutter Team <flutter-dev@googlegroups.com>
- Luigi Agosti <luigi@tengio.com>
Expand Down
6 changes: 6 additions & 0 deletions packages/cloud_firestore/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
## 0.9.0+1

* Log a more detailed warning at build time about the previous AndroidX
migration.

## 0.9.0

* **Breaking change**. Migrate from the deprecated original Android Support
Library to AndroidX. This shouldn't result in any functional changes, but it
requires any Android apps using this plugin to [also
Expand Down
13 changes: 13 additions & 0 deletions packages/cloud_firestore/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
def PLUGIN = "cloud_firestore";
def ANDROIDX_WARNING = "flutterPluginsAndroidXWarning";
gradle.buildFinished { buildResult ->
if (buildResult.failure && !rootProject.ext.has(ANDROIDX_WARNING)) {
println ' *********************************************************'
println 'WARNING: This version of ' + PLUGIN + ' will break your Android build if it or its dependencies aren\'t compatible with AndroidX.'
println ' See https://goo.gl/CP92wY for more information on the problem and how to fix it.'
println ' This warning prints for all Android build failures. The real root cause of the error may be unrelated.'
println ' *********************************************************'
rootProject.ext.set(ANDROIDX_WARNING, true);
}
}

group 'io.flutter.plugins.firebase.firestore'
version '1.0-SNAPSHOT'

Expand Down
2 changes: 1 addition & 1 deletion packages/cloud_firestore/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for Cloud Firestore, a cloud-hosted, noSQL database
live synchronization and offline support on Android and iOS.
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/cloud_firestore
version: 0.9.0
version: 0.9.0+1

flutter:
plugin:
Expand Down
6 changes: 6 additions & 0 deletions packages/cloud_functions/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
## 0.1.0+1

* Log a more detailed warning at build time about the previous AndroidX
migration.

## 0.1.0

* **Breaking change**. Migrate from the deprecated original Android Support
Library to AndroidX. This shouldn't result in any functional changes, but it
requires any Android apps using this plugin to [also
Expand Down
13 changes: 13 additions & 0 deletions packages/cloud_functions/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
def PLUGIN = "cloud_functions";
def ANDROIDX_WARNING = "flutterPluginsAndroidXWarning";
gradle.buildFinished { buildResult ->
if (buildResult.failure && !rootProject.ext.has(ANDROIDX_WARNING)) {
println ' *********************************************************'
println 'WARNING: This version of ' + PLUGIN + ' will break your Android build if it or its dependencies aren\'t compatible with AndroidX.'
println ' See https://goo.gl/CP92wY for more information on the problem and how to fix it.'
println ' This warning prints for all Android build failures. The real root cause of the error may be unrelated.'
println ' *********************************************************'
rootProject.ext.set(ANDROIDX_WARNING, true);
}
}

group 'io.flutter.plugins.firebase.cloudfunctions.cloudfunctions'
version '1.0-SNAPSHOT'

Expand Down
2 changes: 1 addition & 1 deletion packages/cloud_functions/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: cloud_functions
description: Flutter plugin for Cloud Functions.
version: 0.1.0
version: 0.1.0+1
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/cloud_functions

Expand Down
5 changes: 5 additions & 0 deletions packages/connectivity/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.4.0+2

* Log a more detailed warning at build time about the previous AndroidX
migration.

## 0.4.0+1

* Updated `Connectivity` to a singleton.
Expand Down
13 changes: 13 additions & 0 deletions packages/connectivity/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
def PLUGIN = "connectivity";
def ANDROIDX_WARNING = "flutterPluginsAndroidXWarning";
gradle.buildFinished { buildResult ->
if (buildResult.failure && !rootProject.ext.has(ANDROIDX_WARNING)) {
println ' *********************************************************'
println 'WARNING: This version of ' + PLUGIN + ' will break your Android build if it or its dependencies aren\'t compatible with AndroidX.'
println ' See https://goo.gl/CP92wY for more information on the problem and how to fix it.'
println ' This warning prints for all Android build failures. The real root cause of the error may be unrelated.'
println ' *********************************************************'
rootProject.ext.set(ANDROIDX_WARNING, true);
}
}

group 'io.flutter.plugins.connectivity'
version '1.0-SNAPSHOT'

Expand Down
2 changes: 1 addition & 1 deletion packages/connectivity/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for discovering the state of the network (WiFi &
mobile/cellular) connectivity on Android and iOS.
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/connectivity
version: 0.4.0+1
version: 0.4.0+2

flutter:
plugin:
Expand Down
5 changes: 5 additions & 0 deletions packages/device_info/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## 0.4.0

* Log a more detailed warning at build time about the previous AndroidX
migration.

## 0.4.0

* **Breaking change**. Migrate from the deprecated original Android Support
Library to AndroidX. This shouldn't result in any functional changes, but it
requires any Android apps using this plugin to [also
Expand Down
13 changes: 13 additions & 0 deletions packages/device_info/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
def PLUGIN = "device_info";
def ANDROIDX_WARNING = "flutterPluginsAndroidXWarning";
gradle.buildFinished { buildResult ->
if (buildResult.failure && !rootProject.ext.has(ANDROIDX_WARNING)) {
println ' *********************************************************'
println 'WARNING: This version of ' + PLUGIN + ' will break your Android build if it or its dependencies aren\'t compatible with AndroidX.'
println ' See https://goo.gl/CP92wY for more information on the problem and how to fix it.'
println ' This warning prints for all Android build failures. The real root cause of the error may be unrelated.'
println ' *********************************************************'
rootProject.ext.set(ANDROIDX_WARNING, true);
}
}

group 'io.flutter.plugins.deviceinfo'
version '1.0-SNAPSHOT'

Expand Down
2 changes: 1 addition & 1 deletion packages/device_info/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin providing detailed information about the device
(make, model, etc.), and Android or iOS version the app is running on.
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/device_info
version: 0.4.0
version: 0.4.0+1

flutter:
plugin:
Expand Down
6 changes: 6 additions & 0 deletions packages/firebase_admob/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
## 0.8.0+1

* Log a more detailed warning at build time about the previous AndroidX
migration.

## 0.8.0

* **Breaking change**. Migrate from the deprecated original Android Support
Library to AndroidX. This shouldn't result in any functional changes, but it
requires any Android apps using this plugin to [also
Expand Down
13 changes: 13 additions & 0 deletions packages/firebase_admob/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
def PLUGIN = "firebase_admob";
def ANDROIDX_WARNING = "flutterPluginsAndroidXWarning";
gradle.buildFinished { buildResult ->
if (buildResult.failure && !rootProject.ext.has(ANDROIDX_WARNING)) {
println ' *********************************************************'
println 'WARNING: This version of ' + PLUGIN + ' will break your Android build if it or its dependencies aren\'t compatible with AndroidX.'
println ' See https://goo.gl/CP92wY for more information on the problem and how to fix it.'
println ' This warning prints for all Android build failures. The real root cause of the error may be unrelated.'
println ' *********************************************************'
rootProject.ext.set(ANDROIDX_WARNING, true);
}
}

group 'io.flutter.plugins.firebaseadmob'
version '1.0-SNAPSHOT'

Expand Down
2 changes: 1 addition & 1 deletion packages/firebase_admob/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: firebase_admob
description: Firebase AdMob plugin for Flutter applications.
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/firebase_admob
version: 0.8.0
version: 0.8.0+1

flutter:
plugin:
Expand Down
5 changes: 5 additions & 0 deletions packages/firebase_analytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.0.1

* Log a more detailed warning at build time about the previous AndroidX
migration.

## 2.0.0

* **Breaking change**. Migrate from the deprecated original Android Support
Expand Down
13 changes: 13 additions & 0 deletions packages/firebase_analytics/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
def PLUGIN = "firebase_analytics";
def ANDROIDX_WARNING = "flutterPluginsAndroidXWarning";
gradle.buildFinished { buildResult ->
if (buildResult.failure && !rootProject.ext.has(ANDROIDX_WARNING)) {
println ' *********************************************************'
println 'WARNING: This version of ' + PLUGIN + ' will break your Android build if it or its dependencies aren\'t compatible with AndroidX.'
println ' See https://goo.gl/CP92wY for more information on the problem and how to fix it.'
println ' This warning prints for all Android build failures. The real root cause of the error may be unrelated.'
println ' *********************************************************'
rootProject.ext.set(ANDROIDX_WARNING, true);
}
}

group 'io.flutter.plugins.firebaseanalytics'
version '1.0-SNAPSHOT'

Expand Down
2 changes: 1 addition & 1 deletion packages/firebase_analytics/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for Google Analytics for Firebase, an app measuremen
solution that provides insight on app usage and user engagement on Android and iOS.
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/firebase_analytics
version: 2.0.0
version: 2.0.1

flutter:
plugin:
Expand Down
5 changes: 5 additions & 0 deletions packages/firebase_auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.8.0+3

* Log a more detailed warning at build time about the previous AndroidX
migration.

## 0.8.0+2

* Update Google sign-in example in the README.
Expand Down
14 changes: 14 additions & 0 deletions packages/firebase_auth/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
def PLUGIN = "firebase_auth";
def ANDROIDX_WARNING = "flutterPluginsAndroidXWarning";
gradle.buildFinished { buildResult ->
if (buildResult.failure && !rootProject.ext.has(ANDROIDX_WARNING)) {
println ' *********************************************************'
println 'WARNING: This version of ' + PLUGIN + ' will break your Android build if it or its dependencies aren\'t compatible with AndroidX.'
println ' See https://goo.gl/CP92wY for more information on the problem and how to fix it.'
println ' This warning prints for all Android build failures. The real root cause of the error may be unrelated.'
println ' *********************************************************'
rootProject.ext.set(ANDROIDX_WARNING, true);
}
}


group 'io.flutter.plugins.firebaseauth'
version '1.0-SNAPSHOT'

Expand Down
Loading

0 comments on commit 5169655

Please sign in to comment.