[url_launcher_web] Add a no-op android/ folder (#2374)
diff --git a/packages/url_launcher/url_launcher_web/CHANGELOG.md b/packages/url_launcher/url_launcher_web/CHANGELOG.md
index a29a2ee..ecae116 100644
--- a/packages/url_launcher/url_launcher_web/CHANGELOG.md
+++ b/packages/url_launcher/url_launcher_web/CHANGELOG.md
@@ -1,3 +1,7 @@
+# 0.1.0+1
+
+- Add an android/ folder with no-op implementation to workaround https://github.com/flutter/flutter/issues/46304.
+
# 0.1.0
- Update docs and pubspec.
diff --git a/packages/url_launcher/url_launcher_web/android/.gitignore b/packages/url_launcher/url_launcher_web/android/.gitignore
new file mode 100644
index 0000000..c6cbe56
--- /dev/null
+++ b/packages/url_launcher/url_launcher_web/android/.gitignore
@@ -0,0 +1,8 @@
+*.iml
+.gradle
+/local.properties
+/.idea/workspace.xml
+/.idea/libraries
+.DS_Store
+/build
+/captures
diff --git a/packages/url_launcher/url_launcher_web/android/build.gradle b/packages/url_launcher/url_launcher_web/android/build.gradle
new file mode 100644
index 0000000..7e00a8f
--- /dev/null
+++ b/packages/url_launcher/url_launcher_web/android/build.gradle
@@ -0,0 +1,34 @@
+group 'io.flutter.url_launcher_web'
+version '1.0'
+
+buildscript {
+ repositories {
+ google()
+ jcenter()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:3.5.0'
+ }
+}
+
+rootProject.allprojects {
+ repositories {
+ google()
+ jcenter()
+ }
+}
+
+apply plugin: 'com.android.library'
+
+android {
+ compileSdkVersion 28
+
+ defaultConfig {
+ minSdkVersion 16
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ }
+ lintOptions {
+ disable 'InvalidPackage'
+ }
+}
diff --git a/packages/url_launcher/url_launcher_web/android/gradle.properties b/packages/url_launcher/url_launcher_web/android/gradle.properties
new file mode 100644
index 0000000..38c8d45
--- /dev/null
+++ b/packages/url_launcher/url_launcher_web/android/gradle.properties
@@ -0,0 +1,4 @@
+org.gradle.jvmargs=-Xmx1536M
+android.enableR8=true
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/packages/url_launcher/url_launcher_web/android/gradle/wrapper/gradle-wrapper.properties b/packages/url_launcher/url_launcher_web/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..019065d
--- /dev/null
+++ b/packages/url_launcher/url_launcher_web/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
diff --git a/packages/url_launcher/url_launcher_web/android/settings.gradle b/packages/url_launcher/url_launcher_web/android/settings.gradle
new file mode 100644
index 0000000..e632d77
--- /dev/null
+++ b/packages/url_launcher/url_launcher_web/android/settings.gradle
@@ -0,0 +1 @@
+rootProject.name = 'url_launcher_web'
diff --git a/packages/url_launcher/url_launcher_web/android/src/main/AndroidManifest.xml b/packages/url_launcher/url_launcher_web/android/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..cef3aa4
--- /dev/null
+++ b/packages/url_launcher/url_launcher_web/android/src/main/AndroidManifest.xml
@@ -0,0 +1,3 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="io.flutter.url_launcher_web">
+</manifest>
diff --git a/packages/url_launcher/url_launcher_web/android/src/main/java/io/flutter/url_launcher_web/UrlLauncherWebPlugin.java b/packages/url_launcher/url_launcher_web/android/src/main/java/io/flutter/url_launcher_web/UrlLauncherWebPlugin.java
new file mode 100644
index 0000000..4c763a8
--- /dev/null
+++ b/packages/url_launcher/url_launcher_web/android/src/main/java/io/flutter/url_launcher_web/UrlLauncherWebPlugin.java
@@ -0,0 +1,29 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package io.flutter.url_launcher_web;
+
+import androidx.annotation.NonNull;
+import io.flutter.embedding.engine.plugins.FlutterPlugin;
+import io.flutter.plugin.common.PluginRegistry.Registrar;
+
+/** UrlLauncherWebPlugin */
+public class UrlLauncherWebPlugin implements FlutterPlugin {
+ @Override
+ public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {}
+
+ // This static function is optional and equivalent to onAttachedToEngine. It supports the old
+ // pre-Flutter-1.12 Android projects. You are encouraged to continue supporting
+ // plugin registration via this function while apps migrate to use the new Android APIs
+ // post-flutter-1.12 via https://flutter.dev/go/android-project-migration.
+ //
+ // It is encouraged to share logic between onAttachedToEngine and registerWith to keep
+ // them functionally equivalent. Only one of onAttachedToEngine or registerWith will be called
+ // depending on the user's project. onAttachedToEngine or registerWith must both be defined
+ // in the same class.
+ public static void registerWith(Registrar registrar) {}
+
+ @Override
+ public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {}
+}
diff --git a/packages/url_launcher/url_launcher_web/pubspec.yaml b/packages/url_launcher/url_launcher_web/pubspec.yaml
index 16c84fa..64016c6 100644
--- a/packages/url_launcher/url_launcher_web/pubspec.yaml
+++ b/packages/url_launcher/url_launcher_web/pubspec.yaml
@@ -2,7 +2,7 @@
description: Web platform implementation of url_launcher
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/url_launcher/url_launcher_web
-version: 0.1.0
+version: 0.1.0+1
flutter:
plugin: