BREAKING CHANGE:
The Android Gradle plugin is only required when opening the project stand-alone, not when it is included as a dependency. By doing this, the project opens correctly in Android Studio, and it can also be consumed as a native module dependency from an application project without affecting the app project (avoiding unnecessary downloads/conflicts/etc).
Also moved getExtOrDefault to buildScript block to able to use everywhere in the file
This change shouldn't break any apps, but we are marking it as a breaking change in case there are some use cases we've missed.
[skip ci]
Each time building our app, this library causes a message like this
one to be printed, sometimes twice:
> Configure project :react-native-webview
:react-native-webview:reactNativeAndroidRoot /home/greg/z/mobile/node_modules/react-native/android
Worse, the message comes through even if I silence all normal
progress messages and warnings, with `./gradlew --quiet`.
It turns out that the `logger.quiet` method which these log lines are
using has a confusing name. It doesn't mean "log quietly", but more
like the opposite: "log even when asked to keep things quiet". See
documentation on Gradle log levels:
https://docs.gradle.org/current/userguide/logging.html
So, remove the noise by switching to `logger.info`. This avoids
bothering the user by default, and keeps the information readily
available if desired by passing `--info` to Gradle.