diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index c3718724..ac4fdf88 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -15,7 +15,14 @@
+
+
+
+
+
+
+
@@ -32,53 +39,20 @@
-
-
+
+
-
-
-
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -167,13 +141,16 @@
-
-
-
+
+
+
+
+
+
@@ -188,6 +165,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -217,17 +206,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -235,6 +213,11 @@
+
+
+
+
+
@@ -244,7 +227,7 @@
-
+
@@ -256,7 +239,6 @@
-
@@ -414,11 +396,9 @@
-
-
@@ -433,13 +413,14 @@
-
-
+
+
+
@@ -463,30 +444,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -607,9 +564,6 @@
-
-
-
@@ -617,17 +571,9 @@
-
-
-
-
-
-
-
-
@@ -654,13 +600,6 @@
-
-
-
-
-
-
-
@@ -702,20 +641,10 @@
-
-
-
-
-
-
-
-
-
-
@@ -723,50 +652,98 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8c86132f..37973716 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 1.0.0
+
+Breaking changes:
+- Fixed [Flutter AndroidX compatibility](https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility), the latest version that doesn't use `AndroidX` is `0.6.0`.
+
## 0.6.0
- added support for **iOS** inline native WebView integrated in the flutter widget tree
diff --git a/README.md b/README.md
index 8b98d6d3..ffd6b5bd 100644
--- a/README.md
+++ b/README.md
@@ -17,6 +17,8 @@ This plugin is inspired by the popular [cordova-plugin-inappbrowser](https://git
### Note for Android
During the build, if Android fails with `Error: uses-sdk:minSdkVersion 16 cannot be smaller than version 17 declared in library`, it means that you need to update the `minSdkVersion` of your `build.gradle` file to at least `17`.
+Because of [Flutter AndroidX compatibility](https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility), the latest version that doesn't use `AndroidX` is `0.6.0`.
+
### IMPORTANT Note for iOS
If you are starting a new fresh app, you need to create the Flutter App with `flutter create -i swift` (see [flutter/flutter#13422 (comment)](https://github.com/flutter/flutter/issues/13422#issuecomment-392133780)), otherwise, you will get this message:
```
diff --git a/android/build.gradle b/android/build.gradle
index 4c141f0f..f1b54ece 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,3 +1,16 @@
+def PLUGIN = "flutter_inappbrowser";
+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.pichillilorenzo.flutter_inappbrowser'
version '1.0-SNAPSHOT'
@@ -8,7 +21,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.3.0'
+ classpath 'com.android.tools.build:gradle:3.3.2'
}
}
@@ -36,7 +49,8 @@ android {
}
dependencies {
- implementation 'androidx.browser:browser:1.0.0-beta01'
- implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
+ implementation 'androidx.webkit:webkit:1.0.0'
+ implementation 'androidx.browser:browser:1.0.0'
+ implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.squareup.okhttp3:mockwebserver:3.11.0'
}
diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle
index cc2201a7..28464077 100644
--- a/example/android/app/build.gradle
+++ b/example/android/app/build.gradle
@@ -25,7 +25,12 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
- compileSdkVersion 27
+ compileOptions {
+ sourceCompatibility 1.8
+ targetCompatibility 1.8
+ }
+
+ compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
@@ -35,10 +40,10 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.pichillilorenzo.flutter_inappbrowserexample"
minSdkVersion 17
- targetSdkVersion 27
+ targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
@@ -56,6 +61,6 @@ flutter {
dependencies {
testImplementation 'junit:junit:4.12'
- androidTestImplementation 'com.android.support.test:runner:1.0.2'
- androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+ androidTestImplementation 'androidx.test:runner:1.1.1'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
diff --git a/example/android/build.gradle b/example/android/build.gradle
index bb8a3038..6e12e86d 100644
--- a/example/android/build.gradle
+++ b/example/android/build.gradle
@@ -5,7 +5,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.2.1'
+ classpath 'com.android.tools.build:gradle:3.3.2'
}
}
diff --git a/example/android/gradle.properties b/example/android/gradle.properties
index 8bd86f68..53ae0ae4 100644
--- a/example/android/gradle.properties
+++ b/example/android/gradle.properties
@@ -1 +1,3 @@
+android.enableJetifier=true
+android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536M
diff --git a/pubspec.yaml b/pubspec.yaml
index 4dbb80f9..e0f05c30 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: flutter_inappbrowser
description: A Flutter plugin that allows you to add an inline webview or open an in-app browser window (inspired by the popular cordova-plugin-inappbrowser).
-version: 0.6.0
+version: 1.0.0
author: Lorenzo Pichilli
homepage: https://github.com/pichillilorenzo/flutter_inappbrowser