diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 675d262..1615020 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: - uses: subosito/flutter-action@v1 with: - flutter-version: '3.24.4' + flutter-version: '3.22.2' - run: flutter pub get diff --git a/android/app/build.gradle b/android/app/build.gradle index 65a2522..156a277 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -18,6 +18,16 @@ if (keystorePropertiesFile.exists()) { keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) } +def flutterVersionCode = localProperties.getProperty("flutter.versionCode") +if (flutterVersionCode == null) { + flutterVersionCode = "1" +} + +def flutterVersionName = localProperties.getProperty("flutter.versionName") +if (flutterVersionName == null) { + flutterVersionName = "1.0" +} + android { namespace = "com.ghosten.player" compileSdk = flutter.compileSdkVersion @@ -28,19 +38,14 @@ android { targetCompatibility = JavaVersion.VERSION_1_8 } - kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8 - } - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId = "com.ghosten.player" // You can update the following values to match your application needs. - // For more information, see: https://flutter.dev/to/review-gradle-config. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdk = flutter.minSdkVersion targetSdk = flutter.targetSdkVersion - versionCode = flutter.versionCode - versionName = flutter.versionName + versionCode = flutterVersionCode.toInteger() + versionName = flutterVersionName } signingConfigs { diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 8ee3e05..5e5dd0d 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -17,7 +17,6 @@ android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" - android:taskAffinity="" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" diff --git a/android/build.gradle b/android/build.gradle index 99d71cc..d2ffbff 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -9,23 +9,6 @@ rootProject.buildDir = "../build" subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } - -// FIX flutter plugin install_plugin for Flutter 3.24 -subprojects { - afterEvaluate { project -> - if (project.group == "com.example.installplugin") { - project.android { - compileSdkVersion = 34 - namespace = project.group - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - } - } - } -} - subprojects { project.evaluationDependsOn(":app") } diff --git a/android/gradle.properties b/android/gradle.properties index 2597170..3b5b324 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError +org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 7bb2df6..e1ca574 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip diff --git a/android/settings.gradle b/android/settings.gradle index b9e43bd..536165d 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -18,8 +18,8 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "8.1.0" apply false - id "org.jetbrains.kotlin.android" version "1.8.22" apply false + id "com.android.application" version "7.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.7.10" apply false } include ":app" diff --git a/lib/components/pop_to_top.dart b/lib/components/pop_to_top.dart index ae7d056..aeba415 100644 --- a/lib/components/pop_to_top.dart +++ b/lib/components/pop_to_top.dart @@ -18,7 +18,7 @@ class PopToTop extends StatelessWidget { Widget build(BuildContext context) { return PopScope( canPop: false, - onPopInvokedWithResult: (didPop, _) { + onPopInvoked: (didPop) { if (!didPop) { if (PlatformApi.isAndroidTV() && controller.offset > 1000) { controller.animateTo( diff --git a/lib/main.dart b/lib/main.dart index 757681c..9866da9 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -128,7 +128,7 @@ class _QuitConfirmState extends State { ? widget.child : PopScope( canPop: false, - onPopInvokedWithResult: (didPop, _) { + onPopInvoked: (didPop) { if (didPop) { return; } diff --git a/lib/pages/library.dart b/lib/pages/library.dart index 4e6216b..3a17c1b 100644 --- a/lib/pages/library.dart +++ b/lib/pages/library.dart @@ -36,7 +36,7 @@ class _LibraryManageState extends State { Widget build(BuildContext context) { return PopScope( canPop: false, - onPopInvokedWithResult: (didPop, _) { + onPopInvoked: (didPop) { if (!didPop) Navigator.of(context).pop(refresh); }, child: Scaffold( diff --git a/lib/pages/player/live_player.dart b/lib/pages/player/live_player.dart index b139d0e..1cb120d 100644 --- a/lib/pages/player/live_player.dart +++ b/lib/pages/player/live_player.dart @@ -68,7 +68,7 @@ class _LivePlayerPageState extends State { ), PopScope( canPop: false, - onPopInvokedWithResult: (didPop, _) async { + onPopInvoked: (didPop) async { if (didPop) { return; } diff --git a/lib/utils/notification.dart b/lib/utils/notification.dart index e902fb0..c1d905f 100644 --- a/lib/utils/notification.dart +++ b/lib/utils/notification.dart @@ -106,7 +106,7 @@ Future?> showNotification( future: future, builder: (context, snapshot) => PopScope( canPop: false, - onPopInvokedWithResult: (didPop, _) { + onPopInvoked: (didPop) { if (!didPop && !snapshot.connectionState.isLoading()) { Navigator.of(context).pop(NotificationResponse(data: snapshot.data, error: snapshot.error)); } diff --git a/packages/api/pubspec.yaml b/packages/api/pubspec.yaml index 62b0c29..63895ba 100644 --- a/packages/api/pubspec.yaml +++ b/packages/api/pubspec.yaml @@ -3,7 +3,7 @@ description: "Api Plugin for Ghosten Player" version: 1.2.0 environment: - sdk: ^3.5.4 + sdk: '>=3.4.3 <4.0.0' flutter: '>=3.3.0' dependencies: diff --git a/packages/bluetooth/pubspec.yaml b/packages/bluetooth/pubspec.yaml index 8eb0be2..f3dc809 100644 --- a/packages/bluetooth/pubspec.yaml +++ b/packages/bluetooth/pubspec.yaml @@ -3,7 +3,7 @@ description: "Bluetooth Plugin for Ghosten Player" version: 1.2.0 environment: - sdk: ^3.5.4 + sdk: '>=3.4.3 <4.0.0' flutter: '>=3.3.0' dependencies: diff --git a/packages/file_picker/lib/src/file_picker_dialog.dart b/packages/file_picker/lib/src/file_picker_dialog.dart index 5264341..fe6f83a 100644 --- a/packages/file_picker/lib/src/file_picker_dialog.dart +++ b/packages/file_picker/lib/src/file_picker_dialog.dart @@ -57,7 +57,7 @@ class _FilePickerDialogState extends State> { ), body: PopScope( canPop: false, - onPopInvokedWithResult: (didPop, _) { + onPopInvoked: (didPop) { if (!didPop) _pageBack(); }, child: RefreshIndicator( diff --git a/packages/file_picker/pubspec.yaml b/packages/file_picker/pubspec.yaml index e7dbf58..2d74e9f 100644 --- a/packages/file_picker/pubspec.yaml +++ b/packages/file_picker/pubspec.yaml @@ -3,7 +3,7 @@ description: "File Picker Plugin for Ghosten Player" version: 1.2.0 environment: - sdk: ^3.5.4 + sdk: '>=3.4.3 <4.0.0' flutter: '>=3.3.0' dependencies: diff --git a/packages/player_view/lib/src/player_controls.dart b/packages/player_view/lib/src/player_controls.dart index d8c30a7..b0c2986 100644 --- a/packages/player_view/lib/src/player_controls.dart +++ b/packages/player_view/lib/src/player_controls.dart @@ -333,7 +333,7 @@ class _PlayerControlsState extends State { floatingActionButtonLocation: FloatingActionButtonLocation.startTop, body: PopScope( canPop: false, - onPopInvokedWithResult: (didPop, _) async { + onPopInvoked: (didPop) async { if (didPop) { return; } else if (_scaffoldKey.currentState!.isEndDrawerOpen) { diff --git a/packages/player_view/pubspec.yaml b/packages/player_view/pubspec.yaml index 4070bef..4814aaf 100644 --- a/packages/player_view/pubspec.yaml +++ b/packages/player_view/pubspec.yaml @@ -3,7 +3,7 @@ description: "Video Player Plugin for Ghosten Player" version: 1.2.0 environment: - sdk: ^3.5.4 + sdk: '>=3.4.3 <4.0.0' flutter: '>=3.3.0' dependencies: diff --git a/pubspec.lock b/pubspec.lock index 65aa5e9..0f83d26 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -170,8 +170,8 @@ packages: dependency: "direct main" description: path: "packages/flutter" - ref: "release-3.24.4" - resolved-ref: "0d2137ef258b81a1fb3e277d20a434fec8916e61" + ref: "release-3.22.2" + resolved-ref: bfac8e2852d55cc875acd3a4b4395ebfaabcc480 url: "https://github.com/GhostenEditor/flutter" source: git version: "0.0.0" @@ -195,8 +195,8 @@ packages: dependency: "direct main" description: path: "packages/flutter_localizations" - ref: "release-3.24.4" - resolved-ref: "0d2137ef258b81a1fb3e277d20a434fec8916e61" + ref: "release-3.22.2" + resolved-ref: bfac8e2852d55cc875acd3a4b4395ebfaabcc480 url: "https://github.com/GhostenEditor/flutter" source: git version: "0.0.0" @@ -278,18 +278,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.4" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.3" leak_tracker_testing: dependency: transitive description: @@ -326,18 +326,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.11.1" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.12.0" nested: dependency: transitive description: @@ -374,10 +374,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: c464428172cb986b758c6d1724c603097febb8fb855aa265aeecc9280c294d4a + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" url: "https://pub.dev" source: hosted - version: "2.2.12" + version: "2.2.10" path_provider_foundation: dependency: transitive description: @@ -485,10 +485,10 @@ packages: dependency: transitive description: name: shared_preferences_android - sha256: "3b9febd815c9ca29c9e3520d50ec32f49157711e143b7a4ca039eb87e8ade5ab" + sha256: "480ba4345773f56acda9abf5f50bd966f581dac5d514e5fc4a18c62976bbba7e" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.3.2" shared_preferences_foundation: dependency: transitive description: @@ -562,42 +562,18 @@ packages: dependency: transitive description: name: sqflite - sha256: "2d7299468485dca85efeeadf5d38986909c5eb0cd71fd3db2c2f000e6c9454bb" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - sqflite_android: - dependency: transitive - description: - name: sqflite_android - sha256: "78f489aab276260cdd26676d2169446c7ecd3484bbd5fead4ca14f3ed4dd9ee3" + sha256: a43e5a27235518c03ca238e7b4732cf35eabe863a369ceba6cbefa537a66f16d url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.3.3+1" sqflite_common: dependency: transitive description: name: sqflite_common - sha256: "4468b24876d673418a7b7147e5a08a715b4998a7ae69227acafaab762e0e5490" + sha256: "3da423ce7baf868be70e2c0976c28a1bb2f73644268b7ffa7d2e08eab71f16a4" url: "https://pub.dev" source: hosted - version: "2.5.4+5" - sqflite_darwin: - dependency: transitive - description: - name: sqflite_darwin - sha256: "96a698e2bc82bd770a4d6aab00b42396a7c63d9e33513a56945cbccb594c2474" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - sqflite_platform_interface: - dependency: transitive - description: - name: sqflite_platform_interface - sha256: "8dd4515c7bdcae0a785b0062859336de775e8c65db81ae33dd5445f35be61920" - url: "https://pub.dev" - source: hosted - version: "2.4.0" + version: "2.5.4" stack_trace: dependency: transitive description: @@ -626,10 +602,10 @@ packages: dependency: transitive description: name: synchronized - sha256: "69fe30f3a8b04a0be0c15ae6490fc859a78ef4c43ae2dd5e8a623d45bfcf9225" + sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558" url: "https://pub.dev" source: hosted - version: "3.3.0+3" + version: "3.1.0+1" term_glyph: dependency: transitive description: @@ -642,18 +618,18 @@ packages: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.0" typed_data: dependency: transitive description: name: typed_data - sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.3.2" url_launcher: dependency: "direct main" description: @@ -666,10 +642,10 @@ packages: dependency: transitive description: name: url_launcher_android - sha256: "6fc2f56536ee873eeb867ad176ae15f304ccccc357848b351f6f0d8d4a40d193" + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 url: "https://pub.dev" source: hosted - version: "6.3.14" + version: "6.3.9" url_launcher_ios: dependency: transitive description: @@ -738,10 +714,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.2.1" web: dependency: transitive description: @@ -759,5 +735,5 @@ packages: source: hosted version: "1.1.0" sdks: - dart: ">=3.5.4 <4.0.0" - flutter: ">=3.24.0" + dart: ">=3.4.3 <4.0.0" + flutter: ">=3.22.0" diff --git a/pubspec.yaml b/pubspec.yaml index 4b10baf..d789915 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -43,12 +43,12 @@ dependency_overrides: git: url: https://github.com/GhostenEditor/flutter path: packages/flutter - ref: release-3.24.4 + ref: release-3.22.2 flutter_localizations: git: url: https://github.com/GhostenEditor/flutter path: packages/flutter_localizations - ref: release-3.24.4 + ref: release-3.22.2 flutter: uses-material-design: true