Commit 35884c9e by Maurits van Beusekom

Fix Android deprecation warning

parent c5fb452e
## 6.0.1
* Fixed deprecation warning when building Android project.
## 6.0.0
This release includes the following **breaking changes**:
* Migrated to null safety
* Removed PermissionStatus.undetermined, PermissionStatus.denied will be used instead.
* Removed PermissionStatus.undetermined, PermissionStatus.denied will be used instead (see our "[Changes in 6.0.0](https://github.com/Baseflow/flutter-permission-handler/wiki/Changes-in-6.0.0)" wiki page for more details).
## 5.1.0+2
......
group 'com.baseflow.permissionhandler'
version '1.0-SNAPSHOT'
def args = ["-Xlint:deprecation","-Xlint:unchecked","-Werror"]
buildscript {
repositories {
......@@ -20,6 +21,10 @@ rootProject.allprojects {
}
}
project.getTasks().withType(JavaCompile){
options.compilerArgs.addAll(args)
}
apply plugin: 'com.android.library'
android {
......
......@@ -11,7 +11,6 @@ import io.flutter.embedding.engine.plugins.activity.ActivityAware;
import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding;
import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.PluginRegistry.Registrar;
/**
* Platform implementation of the permission_handler Flutter plugin.
......@@ -19,8 +18,8 @@ import io.flutter.plugin.common.PluginRegistry.Registrar;
* <p>Instantiate this in an add to app scenario to gracefully handle activity and context changes.
* See {@code com.example.permissionhandlerexample.MainActivity} for an example.
*
* <p>Call {@link #registerWith(Registrar)} to register an implementation of this that uses the
* stable {@code io.flutter.plugin.common} package.
* <p>Call {@link #registerWith(io.flutter.plugin.common.PluginRegistry.Registrar)} to register an
* implementation of this that uses the stable {@code io.flutter.plugin.common} package.
*/
public final class PermissionHandlerPlugin implements FlutterPlugin, ActivityAware {
......@@ -36,7 +35,8 @@ public final class PermissionHandlerPlugin implements FlutterPlugin, ActivityAwa
* <p>Calling this automatically initializes the plugin. However plugins initialized this way
* won't react to changes in activity or context, unlike {@link PermissionHandlerPlugin}.
*/
public static void registerWith(Registrar registrar) {
@SuppressWarnings("deprecation")
public static void registerWith(io.flutter.plugin.common.PluginRegistry.Registrar registrar) {
final PermissionHandlerPlugin plugin = new PermissionHandlerPlugin();
plugin.startListening(registrar.context(), registrar.messenger());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment