diff --git a/android/app/build.gradle b/android/app/build.gradle index 93ce228eb943f7ce4a83bea52fff9267aeafe7d2..148eac42d6cdd4256a3201f31c294ca3b64a2759 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 78846664fbd1c31c26331b4ebff1e2f82bf7de81..bc157bd1a12b9084c8bb65ade59863a6b71818c8 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,19 +1,7 @@ -buildscript { - ext.kotlin_version = '1.3.72' - 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 91d05c86778fa34b39008c2c72b0291deca2778a..dfa1e9f24dd1c64da4088c407c3fe93277061b61 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=1.2.12 -app.versionCode=23 +app.versionName=1.2.13 +app.versionCode=24 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/pubspec.yaml b/pubspec.yaml index 1f6e51b00c0e7b8361e58ac17dff169c78e7c5cf..00a9529af8cfa51874cb8a1da260d1c723e61516 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: hangman description: Hangman game, have fun with words and letters! publish_to: 'none' -version: 1.2.12+23 +version: 1.2.13+24 environment: sdk: '^3.0.0'