diff --git a/android/app/build.gradle b/android/app/build.gradle index dcc4b339701fdf64773687f946609f2cbb7d7358..056d00345b859a6e975601b888c8c22879ca30b0 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,3 +1,9 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -14,11 +20,6 @@ if (gradlePropertiesFile.exists()) { } } -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - def appVersionCode = gradleProperties.getProperty('app.versionCode') if (appVersionCode == null) { appVersionCode = '1' @@ -29,9 +30,6 @@ if (appVersionName == null) { appVersionName = '1.0' } -apply plugin: 'com.android.application' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - def keystoreProperties = new Properties() def keystorePropertiesFile = rootProject.file('key.properties') if (keystorePropertiesFile.exists()) { diff --git a/android/build.gradle b/android/build.gradle index 942b40b8f46f8de9c9228be2e865eaf41fff34c6..bc157bd1a12b9084c8bb65ade59863a6b71818c8 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,18 +1,7 @@ -buildscript { - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.2.2' - } -} - allprojects { repositories { google() - jcenter() + mavenCentral() } } diff --git a/android/gradle.properties b/android/gradle.properties index 818e87b23b224ced309ae5c147e5ed827826e237..db7a1ee2908d6e94aeb319e1c1b548a8bb245891 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true -app.versionName=0.0.2 -app.versionCode=2 +app.versionName=0.0.3 +app.versionCode=3 diff --git a/android/settings.gradle b/android/settings.gradle index 44e62bcf06ae649ea809590f8a861059886502e8..8cc46c09d77d48509d53e4f5d0825a2b14444403 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,11 +1,26 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.2.2" apply false + id "org.jetbrains.kotlin.android" version "1.9.22" apply false +} + +include ":app" diff --git a/fastlane/metadata/android/en-US/changelogs/3.txt b/fastlane/metadata/android/en-US/changelogs/3.txt new file mode 100644 index 0000000000000000000000000000000000000000..93da4f9ab3e425ba9cd20382460524f012f12af5 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/3.txt @@ -0,0 +1 @@ +Update flutter gradle plugin. diff --git a/fastlane/metadata/android/fr-FR/changelogs/3.txt b/fastlane/metadata/android/fr-FR/changelogs/3.txt new file mode 100644 index 0000000000000000000000000000000000000000..6ae0c1e8a42c5030e89eafeb2e0d2c4c0e7811a8 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/3.txt @@ -0,0 +1 @@ +Mise à jour du plugin gradle pour flutter. diff --git a/pubspec.lock b/pubspec.lock index 17fc440ac716f54c51e39d6eb963966f3365d549..1f9fa04bfb0c9c60197565cb67252500eb7f6beb 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -236,10 +236,10 @@ packages: dependency: transitive description: name: shared_preferences_web - sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf + sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.0" shared_preferences_windows: dependency: transitive description: @@ -327,4 +327,4 @@ packages: version: "1.0.4" sdks: dart: ">=3.3.0 <4.0.0" - flutter: ">=3.10.0" + flutter: ">=3.19.0" diff --git a/pubspec.yaml b/pubspec.yaml index 3b0ea60961ec2341e560921f52f0fff8a37bff01..726d80e7bb4db8ce0d02d598f0a5b1a8fb111fd7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: Create and manage Spotify playlists publish_to: 'none' -version: 0.0.2+2 +version: 0.0.3+3 environment: sdk: '^3.0.0'