Update to Android embedding v2, updated to Gradle 7, upgraded internal dependencies to latest versions

This commit is contained in:
Varakh 2022-04-29 00:44:23 +02:00
parent 830deab2e1
commit 3625461b57
10 changed files with 78 additions and 55 deletions

View file

@ -3,6 +3,9 @@
## 1.4.2+15 - UNRELEASED ## 1.4.2+15 - UNRELEASED
* Minor cleanup * Minor cleanup
* Added external drone CI * Added external drone CI
* Updated to Android embedding v2
* Updated to Gradle 7
* Upgraded internal dependencies to latest versions
## 1.4.1+14 ## 1.4.1+14
* Fixed opening links * Fixed opening links

View file

@ -32,8 +32,8 @@ Start by installing dependencies and generating entities!
### Working versions for SDK ### Working versions for SDK
``` ```
Flutter version 2.8.1 Flutter version 2.10.5
Dart version 2.15.1 Dart version 2.16.2
``` ```
## Dependencies ## Dependencies

View file

@ -31,7 +31,7 @@ if (keystorePropertiesFile.exists()) {
} }
android { android {
compileSdkVersion 30 compileSdkVersion 31
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
@ -40,7 +40,7 @@ android {
defaultConfig { defaultConfig {
applicationId "de.varakh.fbmobile" applicationId "de.varakh.fbmobile"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 30 targetSdkVersion 31
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View file

@ -6,11 +6,12 @@
additional functionality it is fine to subclass or reimplement additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. --> FlutterApplication and put your custom class here. -->
<application <application
android:name="io.flutter.app.FlutterApplication" android:name="${applicationName}"
android:label="FileBin" android:label="FileBin"
android:icon="@mipmap/ic_launcher"> android:icon="@mipmap/ic_launcher">
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTask" android:launchMode="singleTask"
android:theme="@style/LaunchTheme" android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"

View file

@ -1,14 +1,6 @@
package de.varakh.fbmobile; package de.varakh.fbmobile;
import androidx.annotation.NonNull;
import io.flutter.embedding.android.FlutterActivity; import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.plugins.GeneratedPluginRegistrant;
public class MainActivity extends FlutterActivity { public class MainActivity extends FlutterActivity {
@Override
public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine);
}
} }

View file

@ -5,9 +5,7 @@ buildscript {
} }
dependencies { dependencies {
// TODO switch to 4.0.1 again: https://github.com/flutter/flutter/issues/58479 classpath 'com.android.tools.build:gradle:7.0.4'
// TODO switch to 4.0.1 again: https://github.com/miguelpruivo/flutter_file_picker/issues/545
classpath 'com.android.tools.build:gradle:3.6.2'
} }
} }

View file

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip

View file

@ -11,14 +11,15 @@ class LinkService {
final DialogService _dialogService = locator<DialogService>(); final DialogService _dialogService = locator<DialogService>();
Future open(String link) async { Future open(String link) async {
if (await canLaunch(link)) { Uri uri = Uri.parse(link);
await launch(link);
if (await canLaunchUrl(uri)) {
await launchUrl(uri);
} else { } else {
_logger.e('Could not launch link $link'); _logger.e('Could not launch link $link');
_dialogService.showDialog( _dialogService.showDialog(
title: translate('link.dialog.title'), title: translate('link.dialog.title'),
description: description: translate('link.dialog.description', args: {'link': link}));
translate('link.dialog.description', args: {'link': link}));
} }
} }
} }

View file

@ -56,7 +56,7 @@ packages:
name: build_daemon name: build_daemon
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.0.1" version: "3.1.0"
build_resolvers: build_resolvers:
dependency: transitive dependency: transitive
description: description:
@ -70,7 +70,7 @@ packages:
name: build_runner name: build_runner
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.7" version: "2.1.10"
build_runner_core: build_runner_core:
dependency: transitive dependency: transitive
description: description:
@ -217,7 +217,7 @@ packages:
name: file_picker name: file_picker
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.3.2" version: "4.5.1"
fixnum: fixnum:
dependency: transitive dependency: transitive
description: description:
@ -342,14 +342,14 @@ packages:
name: json_annotation name: json_annotation
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.4.0" version: "4.5.0"
json_serializable: json_serializable:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: json_serializable name: json_serializable
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "6.1.4" version: "6.2.0"
linkify: linkify:
dependency: transitive dependency: transitive
description: description:
@ -378,6 +378,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.12.11" version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
meta: meta:
dependency: transitive dependency: transitive
description: description:
@ -412,14 +419,14 @@ packages:
name: package_info_plus name: package_info_plus
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0" version: "1.4.2"
package_info_plus_linux: package_info_plus_linux:
dependency: transitive dependency: transitive
description: description:
name: package_info_plus_linux name: package_info_plus_linux
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.3" version: "1.0.5"
package_info_plus_macos: package_info_plus_macos:
dependency: transitive dependency: transitive
description: description:
@ -440,14 +447,14 @@ packages:
name: package_info_plus_web name: package_info_plus_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.4" version: "1.0.5"
package_info_plus_windows: package_info_plus_windows:
dependency: transitive dependency: transitive
description: description:
name: package_info_plus_windows name: package_info_plus_windows
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.4" version: "1.0.5"
path: path:
dependency: transitive dependency: transitive
description: description:
@ -482,7 +489,21 @@ packages:
name: permission_handler name: permission_handler
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "8.3.0" version: "9.2.0"
permission_handler_android:
dependency: transitive
description:
name: permission_handler_android
url: "https://pub.dartlang.org"
source: hosted
version: "9.0.2+1"
permission_handler_apple:
dependency: transitive
description:
name: permission_handler_apple
url: "https://pub.dartlang.org"
source: hosted
version: "9.0.4"
permission_handler_platform_interface: permission_handler_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -490,6 +511,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.7.0" version: "3.7.0"
permission_handler_windows:
dependency: transitive
description:
name: permission_handler_windows
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0"
platform: platform:
dependency: transitive dependency: transitive
description: description:
@ -559,49 +587,49 @@ packages:
name: share_plus name: share_plus
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.0.4" version: "4.0.4"
share_plus_linux: share_plus_linux:
dependency: transitive dependency: transitive
description: description:
name: share_plus_linux name: share_plus_linux
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.4" version: "3.0.0"
share_plus_macos: share_plus_macos:
dependency: transitive dependency: transitive
description: description:
name: share_plus_macos name: share_plus_macos
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.2" version: "3.0.0"
share_plus_platform_interface: share_plus_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: share_plus_platform_interface name: share_plus_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.1" version: "3.0.2"
share_plus_web: share_plus_web:
dependency: transitive dependency: transitive
description: description:
name: share_plus_web name: share_plus_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.4" version: "3.0.0"
share_plus_windows: share_plus_windows:
dependency: transitive dependency: transitive
description: description:
name: share_plus_windows name: share_plus_windows
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.3" version: "3.0.0"
shared_preferences: shared_preferences:
dependency: "direct main" dependency: "direct main"
description: description:
name: shared_preferences name: shared_preferences
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.12" version: "2.0.13"
shared_preferences_android: shared_preferences_android:
dependency: transitive dependency: transitive
description: description:
@ -711,7 +739,7 @@ packages:
name: stacked name: stacked
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.2.8" version: "2.3.3"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
@ -746,7 +774,7 @@ packages:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.3" version: "0.4.8"
timing: timing:
dependency: transitive dependency: transitive
description: description:
@ -774,7 +802,7 @@ packages:
name: url_launcher name: url_launcher
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "6.0.18" version: "6.1.0"
url_launcher_android: url_launcher_android:
dependency: transitive dependency: transitive
description: description:
@ -858,7 +886,7 @@ packages:
name: win32 name: win32
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.3.8" version: "2.5.2"
xdg_directories: xdg_directories:
dependency: transitive dependency: transitive
description: description:
@ -874,5 +902,5 @@ packages:
source: hosted source: hosted
version: "3.1.0" version: "3.1.0"
sdks: sdks:
dart: ">=2.15.1 <3.0.0" dart: ">=2.16.2 <3.0.0"
flutter: ">=2.5.0" flutter: ">=2.8.0"

View file

@ -14,7 +14,7 @@ description: A mobile client for FileBin.
version: 1.4.2+15 version: 1.4.2+15
environment: environment:
sdk: '>=2.15.1 <3.0.0' sdk: '>=2.16.2 <3.0.0'
dependencies: dependencies:
flutter: flutter:
@ -24,30 +24,30 @@ dependencies:
sdk: flutter sdk: flutter
flutter_translate: 3.0.1 flutter_translate: 3.0.1
provider: 6.0.2 provider: 6.0.2
stacked: 2.2.8 stacked: 2.3.3
get_it: 7.2.0 get_it: 7.2.0
logger: 1.1.0 logger: 1.1.0
shared_preferences: 2.0.12 shared_preferences: 2.0.13
http: 0.13.4 http: 0.13.4
validators: 3.0.0 validators: 3.0.0
flutter_linkify: 5.0.2 flutter_linkify: 5.0.2
url_launcher: 6.0.18 url_launcher: 6.1.0
expandable: 5.0.1 expandable: 5.0.1
share_plus: 3.0.4 share_plus: 4.0.4
file_picker: 4.3.2 file_picker: 4.5.1
clipboard: 0.1.3 clipboard: 0.1.3
receive_sharing_intent: 1.4.5 receive_sharing_intent: 1.4.5
permission_handler: 8.3.0 permission_handler: 9.2.0
package_info_plus: 1.3.0 package_info_plus: 1.4.2
simple_gesture_detector: 0.2.0 simple_gesture_detector: 0.2.0
json_annotation: 4.4.0 json_annotation: 4.5.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
build_runner: 2.1.7 build_runner: 2.1.10
built_value_generator: 8.1.4 built_value_generator: 8.1.4
json_serializable: 6.1.4 json_serializable: 6.2.0
# For information on the generic Dart part of this file, see the # For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec # following page: https://www.dartlang.org/tools/pub/pubspec