Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 2be4c80

Browse files
author
Michael Klimushyn
authored
[flutter_webview] Raise min Flutter SDK to stable (#2425)
v2 embedding apps no longer need to special case their Flutter SDK requirement like they have since v0.3.15+3.
1 parent 6f046f3 commit 2be4c80

File tree

7 files changed

+20
-56
lines changed

7 files changed

+20
-56
lines changed

packages/webview_flutter/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.3.19+1
2+
3+
* Raise min Flutter SDK requirement to the latest stable. v2 embedding apps no
4+
longer need to special case their Flutter SDK requirement like they have
5+
since v0.3.15+3.
6+
17
## 0.3.19
28

39
* Add setting for iOS to allow gesture based navigation.

packages/webview_flutter/android/build.gradle

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -37,28 +37,3 @@ android {
3737
implementation 'androidx.webkit:webkit:1.0.0'
3838
}
3939
}
40-
41-
// TODO(mklim): Remove this hack once androidx.lifecycle is included on stable. https://github.com/flutter/flutter/issues/42348
42-
afterEvaluate {
43-
def containsEmbeddingDependencies = false
44-
for (def configuration : configurations.all) {
45-
for (def dependency : configuration.dependencies) {
46-
if (dependency.group == 'io.flutter' &&
47-
dependency.name.startsWith('flutter_embedding') &&
48-
dependency.isTransitive())
49-
{
50-
containsEmbeddingDependencies = true
51-
break
52-
}
53-
}
54-
}
55-
if (!containsEmbeddingDependencies) {
56-
android {
57-
dependencies {
58-
def lifecycle_version = "1.1.1"
59-
compileOnly "android.arch.lifecycle:common-java8:$lifecycle_version"
60-
compileOnly "android.arch.lifecycle:runtime:$lifecycle_version"
61-
}
62-
}
63-
}
64-
}

packages/webview_flutter/example/android/app/src/androidTestDebug/java/io/flutter/plugins/webviewflutterexample/MainActivityTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
import androidx.test.rule.ActivityTestRule;
44
import dev.flutter.plugins.e2e.FlutterRunner;
5+
import io.flutter.embedding.android.FlutterActivity;
56
import org.junit.Rule;
67
import org.junit.runner.RunWith;
78

89
@RunWith(FlutterRunner.class)
910
public class MainActivityTest {
10-
@Rule public ActivityTestRule<MainActivity> rule = new ActivityTestRule<>(MainActivity.class);
11+
@Rule
12+
public ActivityTestRule<FlutterActivity> rule = new ActivityTestRule<>(FlutterActivity.class);
1113
}

packages/webview_flutter/example/android/app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
android:icon="@mipmap/ic_launcher"
1111
android:label="webview_flutter_example"
1212
android:name="io.flutter.app.FlutterApplication">
13+
<meta-data
14+
android:name="flutterEmbedding"
15+
android:value="2" />
1316
<activity
1417
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
1518
android:exported="true"
@@ -30,7 +33,7 @@
3033
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
3134
android:hardwareAccelerated="true"
3235
android:launchMode="singleTop"
33-
android:name=".MainActivity"
36+
android:name="io.flutter.embedding.android.FlutterActivity"
3437
android:theme="@style/LaunchTheme"
3538
android:windowSoftInputMode="adjustResize">
3639
<intent-filter>

packages/webview_flutter/example/android/app/src/main/java/io/flutter/plugins/webviewflutterexample/EmbeddingV1Activity.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55
package io.flutter.plugins.webviewflutterexample;
66

77
import android.os.Bundle;
8+
import dev.flutter.plugins.e2e.E2EPlugin;
89
import io.flutter.app.FlutterActivity;
9-
import io.flutter.plugins.GeneratedPluginRegistrant;
10+
import io.flutter.plugins.webviewflutter.WebViewFlutterPlugin;
1011

1112
public class EmbeddingV1Activity extends FlutterActivity {
1213
@Override
1314
protected void onCreate(Bundle savedInstanceState) {
1415
super.onCreate(savedInstanceState);
15-
GeneratedPluginRegistrant.registerWith(this);
16+
E2EPlugin.registerWith(registrarFor("dev.flutter.plugins.e2e.E2EPlugin"));
17+
WebViewFlutterPlugin.registerWith(
18+
registrarFor("io.flutter.plugins.webviewflutter.WebViewFlutterPlugin"));
1619
}
1720
}

packages/webview_flutter/example/android/app/src/main/java/io/flutter/plugins/webviewflutterexample/MainActivity.java

Lines changed: 0 additions & 25 deletions
This file was deleted.

packages/webview_flutter/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: webview_flutter
22
description: A Flutter plugin that provides a WebView widget on Android and iOS.
3-
version: 0.3.19
3+
version: 0.3.19+1
44
homepage: https://github.com/flutter/plugins/tree/master/packages/webview_flutter
55

66
environment:
77
sdk: ">=2.0.0-dev.68.0 <3.0.0"
8-
flutter: ">=1.10.0 <2.0.0"
8+
flutter: ">=1.12.13+hotfix.5 <2.0.0"
99

1010
dependencies:
1111
flutter:

0 commit comments

Comments
 (0)