From e123b1e89386b44cc7d61bfdc351093e71874487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Are=20Johan=20Tverr=C3=A5?= Date: Fri, 5 Mar 2021 14:55:46 +0100 Subject: [PATCH 1/5] Migrate example project to Flutter embedding v2 --- .../android/app/src/main/AndroidManifest.xml | 33 +++++++++++-------- .../com/yourcompany/example/MainActivity.java | 11 ++----- .../app/src/main/res/values/styles.xml | 4 +++ example/android/gradlew | 0 4 files changed, 25 insertions(+), 23 deletions(-) mode change 100644 => 100755 example/android/gradlew diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 6dc50e8..204bf22 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -5,7 +5,7 @@ flutter needs it to communicate with the running application to allow setting breakpoints, to provide hot reload, etc. --> - + + android:icon="@mipmap/ic_launcher" + android:label="example"> - + + + + + + android:name="io.flutter.embedding.android.NormalTheme" + android:resource="@style/NormalTheme" /> - - + + + diff --git a/example/android/app/src/main/java/com/yourcompany/example/MainActivity.java b/example/android/app/src/main/java/com/yourcompany/example/MainActivity.java index fada39c..d45a314 100644 --- a/example/android/app/src/main/java/com/yourcompany/example/MainActivity.java +++ b/example/android/app/src/main/java/com/yourcompany/example/MainActivity.java @@ -1,14 +1,7 @@ package com.yourcompany.example; -import android.os.Bundle; - -import io.flutter.app.FlutterActivity; -import io.flutter.plugins.GeneratedPluginRegistrant; +import io.flutter.embedding.android.FlutterActivity; public class MainActivity extends FlutterActivity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - GeneratedPluginRegistrant.registerWith(this); - } + } diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml index 00fa441..8a3609b 100644 --- a/example/android/app/src/main/res/values/styles.xml +++ b/example/android/app/src/main/res/values/styles.xml @@ -5,4 +5,8 @@ Flutter draws its first frame --> @drawable/launch_background + + diff --git a/example/android/gradlew b/example/android/gradlew old mode 100644 new mode 100755 From 455b5728be9d74647f214b6b8b6a3fe7b1aab824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Are=20Johan=20Tverr=C3=A5?= Date: Fri, 5 Mar 2021 14:57:33 +0100 Subject: [PATCH 2/5] Update .gitignore --- example/.gitignore | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/example/.gitignore b/example/.gitignore index c9edd23..9d532b1 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -1,11 +1,41 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp .DS_Store -.dart_tool/ +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies .packages +.pub-cache/ .pub/ +/build/ -build/ +# Web related +lib/generated_plugin_registrant.dart -.flutter-plugins +# Symbolication related +app.*.symbols -.idea/* \ No newline at end of file +# Obfuscation related +app.*.map.json From 1b3b3dadb709133a43b942fbad64a8a0f747bc4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Are=20Johan=20Tverr=C3=A5?= Date: Fri, 5 Mar 2021 14:58:55 +0100 Subject: [PATCH 3/5] Update ios .gitignore --- example/ios/.gitignore | 64 +++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 38 deletions(-) diff --git a/example/ios/.gitignore b/example/ios/.gitignore index 2a8c8b6..e96ef60 100644 --- a/example/ios/.gitignore +++ b/example/ios/.gitignore @@ -1,44 +1,32 @@ -.idea/ -.vagrant/ -.sconsign.dblite -.svn/ - -.DS_Store -*.swp -profile - -DerivedData/ -build/ -GeneratedPluginRegistrant.h -GeneratedPluginRegistrant.m - -.generated/ - -*.pbxuser *.mode1v3 *.mode2v3 +*.moved-aside +*.pbxuser *.perspectivev3 - -!default.pbxuser +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. !default.mode1v3 !default.mode2v3 +!default.pbxuser !default.perspectivev3 - -xcuserdata - -*.moved-aside - -*.pyc -*sync/ -Icon? -.tags* - -/Flutter/app.flx -/Flutter/app.zip -/Flutter/flutter_assets/ -/Flutter/App.framework -/Flutter/Flutter.framework -/Flutter/Generated.xcconfig -/ServiceDefinitions.json - -Pods/ From afd205576a3c0996d2d592318c86703b6f78b498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Are=20Johan=20Tverr=C3=A5?= Date: Fri, 5 Mar 2021 14:59:29 +0100 Subject: [PATCH 4/5] Update android .gitignore --- example/android/.gitignore | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/example/android/.gitignore b/example/android/.gitignore index 65b7315..0a741cb 100644 --- a/example/android/.gitignore +++ b/example/android/.gitignore @@ -1,10 +1,11 @@ -*.iml -*.class -.gradle +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat /local.properties -/.idea/workspace.xml -/.idea/libraries -.DS_Store -/build -/captures GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties From 2964e80cf8b8c1f6ef753b4d10b35cc982588fc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Are=20Johan=20Tverr=C3=A5?= Date: Fri, 5 Mar 2021 15:00:43 +0100 Subject: [PATCH 5/5] Add unversioned android project file --- example/android/settings_aar.gradle | 1 + 1 file changed, 1 insertion(+) create mode 100644 example/android/settings_aar.gradle diff --git a/example/android/settings_aar.gradle b/example/android/settings_aar.gradle new file mode 100644 index 0000000..e7b4def --- /dev/null +++ b/example/android/settings_aar.gradle @@ -0,0 +1 @@ +include ':app'