Skip to content

Commit

Permalink
Add a gradle warning to the AndroidX plugins (following flutter plugins)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldemarco authored and Paul DeMarco committed Jun 19, 2019
1 parent adb0717 commit 0b333cd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
def PLUGIN = "flutter_blue";
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 'com.pauldemarco.flutterblue'
version '1.0-SNAPSHOT'

Expand Down

0 comments on commit 0b333cd

Please sign in to comment.