Skip to content

Commit d1d49c8

Browse files
Michael Klimushynandreidiaconu
authored andcommitted
Add a gradle warning to the AndroidX plugins (flutter#1138)
This warning is only printed once per plugin on build failure. flutter/flutter#27106
1 parent ddb0956 commit d1d49c8

101 files changed

Lines changed: 651 additions & 37 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/android_alarm_manager/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.4.1+1
2+
3+
* Log a more detailed warning at build time about the previous AndroidX
4+
migration.
5+
16
## 0.4.1
27
* Added support for setting alarms which persist across reboots.
38
* Both `AndroidAlarmManager.oneShot` and `AndroidAlarmManager.periodic` have
@@ -23,6 +28,7 @@
2328
```
2429

2530
## 0.4.0
31+
2632
* **Breaking change**. Migrated the underlying AlarmService to utilize a
2733
BroadcastReceiver with a JobIntentService instead of a Service to handle
2834
processing of alarms. This requires AndroidManifest.xml to be updated to

packages/android_alarm_manager/android/build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
def PLUGIN = "android_alarm_manager";
2+
def ANDROIDX_WARNING = "flutterPluginsAndroidXWarning";
3+
gradle.buildFinished { buildResult ->
4+
if (buildResult.failure && !rootProject.ext.has(ANDROIDX_WARNING)) {
5+
println ' *********************************************************'
6+
println 'WARNING: This version of ' + PLUGIN + ' will break your Android build if it or its dependencies aren\'t compatible with AndroidX.'
7+
println ' See https://goo.gl/CP92wY for more information on the problem and how to fix it.'
8+
println ' This warning prints for all Android build failures. The real root cause of the error may be unrelated.'
9+
println ' *********************************************************'
10+
rootProject.ext.set(ANDROIDX_WARNING, true);
11+
}
12+
}
13+
114
group 'io.flutter.plugins.androidalarmmanager'
215
version '1.0-SNAPSHOT'
316

packages/android_alarm_manager/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: android_alarm_manager
22
description: Flutter plugin for accessing the Android AlarmManager service, and
33
running Dart code in the background when alarms fire.
4-
version: 0.4.1
4+
version: 0.4.1+1
55
author: Flutter Team <[email protected]>
66
homepage: https://github.com/flutter/plugins/tree/master/packages/android_alarm_manager
77

packages/android_intent/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.3.0+1
2+
3+
* Log a more detailed warning at build time about the previous AndroidX
4+
migration.
5+
16
## 0.3.0
27

38
* **Breaking change**. Migrate from the deprecated original Android Support

packages/android_intent/android/build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
def PLUGIN = "android_intent";
2+
def ANDROIDX_WARNING = "flutterPluginsAndroidXWarning";
3+
gradle.buildFinished { buildResult ->
4+
if (buildResult.failure && !rootProject.ext.has(ANDROIDX_WARNING)) {
5+
println ' *********************************************************'
6+
println 'WARNING: This version of ' + PLUGIN + ' will break your Android build if it or its dependencies aren\'t compatible with AndroidX.'
7+
println ' See https://goo.gl/CP92wY for more information on the problem and how to fix it.'
8+
println ' This warning prints for all Android build failures. The real root cause of the error may be unrelated.'
9+
println ' *********************************************************'
10+
rootProject.ext.set(ANDROIDX_WARNING, true);
11+
}
12+
}
13+
114
group 'io.flutter.plugins.androidintent'
215
version '1.0-SNAPSHOT'
316

packages/android_intent/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: android_intent
22
description: Flutter plugin for launching Android Intents. Not supported on iOS.
33
author: Flutter Team <[email protected]>
44
homepage: https://github.com/flutter/plugins/tree/master/packages/android_intent
5-
version: 0.3.0
5+
version: 0.3.0+1
66

77
flutter:
88
plugin:

packages/battery/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.3.0+1
2+
3+
* Log a more detailed warning at build time about the previous AndroidX
4+
migration.
5+
16
## 0.3.0
27

38
* **Breaking change**. Migrate from the deprecated original Android Support

packages/battery/android/build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
def PLUGIN = "battery";
2+
def ANDROIDX_WARNING = "flutterPluginsAndroidXWarning";
3+
gradle.buildFinished { buildResult ->
4+
if (buildResult.failure && !rootProject.ext.has(ANDROIDX_WARNING)) {
5+
println ' *********************************************************'
6+
println 'WARNING: This version of ' + PLUGIN + ' will break your Android build if it or its dependencies aren\'t compatible with AndroidX.'
7+
println ' See https://goo.gl/CP92wY for more information on the problem and how to fix it.'
8+
println ' This warning prints for all Android build failures. The real root cause of the error may be unrelated.'
9+
println ' *********************************************************'
10+
rootProject.ext.set(ANDROIDX_WARNING, true);
11+
}
12+
}
13+
114
group 'io.flutter.plugins.battery'
215
version '1.0-SNAPSHOT'
316

packages/battery/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Flutter plugin for accessing information about the battery state
33
(full, charging, discharging) on Android and iOS.
44
author: Flutter Team <[email protected]>
55
homepage: https://github.com/flutter/plugins/tree/master/packages/battery
6-
version: 0.3.0
6+
version: 0.3.0+1
77

88
flutter:
99
plugin:

packages/camera/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.3.0+3
2+
3+
* Log a more detailed warning at build time about the previous AndroidX
4+
migration.
5+
16
## 0.3.0+2
27

38
* Fix issue with calculating iOS image orientation in certain edge cases.

0 commit comments

Comments
 (0)