diff --git a/.metadata b/.metadata index b603e3b..706ff77 100644 --- a/.metadata +++ b/.metadata @@ -15,7 +15,7 @@ migration: - platform: root create_revision: 603104015dd692ea3403755b55d07813d5cf8965 base_revision: 603104015dd692ea3403755b55d07813d5cf8965 - - platform: web + - platform: android create_revision: 603104015dd692ea3403755b55d07813d5cf8965 base_revision: 603104015dd692ea3403755b55d07813d5cf8965 diff --git a/android/app/build.gradle b/android/app/build.gradle index fa57675..2a15a0d 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,30 +1,10 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -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 flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '2' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '2.0.1' +plugins { + id "com.android.application" + id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id "dev.flutter.flutter-gradle-plugin" } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - def keystoreProperties = new Properties() def keystorePropertiesFile = rootProject.file('key.properties') if (keystorePropertiesFile.exists()) { @@ -32,23 +12,29 @@ if (keystorePropertiesFile.exists()) { } android { - compileSdkVersion 30 + namespace = "com.onemdev.gandalf" + compileSdk = 35 + ndkVersion = "27.0.12077973" - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } - lintOptions { - disable 'InvalidPackage' + kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8 } + defaultConfig { applicationId "com.onemdev.gandalf" - minSdkVersion 16 - targetSdkVersion 30 multiDexEnabled true - versionName flutterVersionName - versionCode flutterVersionCode.toInteger() + minSdk 21 + targetSdk 35 + buildToolsVersion '35.0.0' + versionCode = 10 + versionName = "1.0.0" + multiDexEnabled true } signingConfigs { release { @@ -63,7 +49,7 @@ android { release { signingConfig signingConfigs.release minifyEnabled true - useProguard true + shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } @@ -74,10 +60,5 @@ flutter { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} - -apply plugin: 'io.fabric' -apply plugin: 'com.google.gms.google-services' -apply plugin: 'com.google.firebase.firebase-perf' -apply plugin: 'com.google.firebase.crashlytics' + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2' +} \ No newline at end of file diff --git a/android/app/key.jks b/android/app/key.jks deleted file mode 100644 index 1a7a831..0000000 Binary files a/android/app/key.jks and /dev/null differ diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index a65ef2f..7621ec2 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,6 +1,7 @@ - diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 14ecd09..2b7f952 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,25 +1,20 @@ - - - - + + + + + + + + + + + diff --git a/android/app/src/main/kotlin/com/conemdev/gandlaf/MainActivity.kt b/android/app/src/main/kotlin/com/conemdev/gandlaf/MainActivity.kt deleted file mode 100644 index 7f89a17..0000000 --- a/android/app/src/main/kotlin/com/conemdev/gandlaf/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.conemdev.gandlaf - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/android/app/src/main/kotlin/com/example/gandalf/MainActivity.kt b/android/app/src/main/kotlin/com/example/gandalf/MainActivity.kt deleted file mode 100644 index 3a5eb98..0000000 --- a/android/app/src/main/kotlin/com/example/gandalf/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.onemdev.gandalf - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/android/app/src/main/kotlin/com/onemdev/gandlaf/MainActivity.kt b/android/app/src/main/kotlin/com/onemdev/gandlaf/MainActivity.kt new file mode 100644 index 0000000..ec3b603 --- /dev/null +++ b/android/app/src/main/kotlin/com/onemdev/gandlaf/MainActivity.kt @@ -0,0 +1,5 @@ +package com.onemdev.gandlaf + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..0944b4d --- /dev/null +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 1f83a33..cb1ef88 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -1,18 +1,18 @@ - - - diff --git a/android/build.gradle b/android/build.gradle index 768fec7..84f2dda 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,25 +1,20 @@ buildscript { - ext.kotlin_version = '1.3.50' repositories { google() - jcenter() - maven { url 'https://maven.fabric.io/public' } + mavenCentral() } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath 'com.android.tools.build:gradle:3.5.0' - classpath 'com.google.gms:google-services:4.3.0' - classpath 'com.google.firebase:perf-plugin:1.4.1' - classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1' - classpath 'io.fabric.tools:gradle:1.31.0' + classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2' + classpath 'com.android.tools.build:gradle:8.7.2' + classpath 'com.google.firebase:perf-plugin:1.4.2' + classpath 'com.google.gms:google-services:4.4.0' } } allprojects { repositories { google() - jcenter() + mavenCentral() } } @@ -31,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/android/gradle.properties b/android/gradle.properties index dd75033..3d51ef1 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,7 +1,7 @@ -org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -org.gradle.daemon=true -org.gradle.parallel=true - -android.enableJetifier=true +org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true -android.enableR8=true \ No newline at end of file +android.enableJetifier=true +android.enableR8=true + +org.gradle.daemon=true +org.gradle.parallel=true \ No newline at end of file diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 296b146..b30c991 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ -#Fri Jun 23 08:50:38 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +networkTimeout=10000 +validateDistributionUrl=true diff --git a/android/settings.gradle b/android/settings.gradle index d3b6a40..39e33c8 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,15 +1,26 @@ -// Copyright 2014 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. +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 + }() -include ':app' + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.7.2" apply false + id "com.google.gms.google-services" version "4.4.2" apply false + id "org.jetbrains.kotlin.android" version "1.8.22" apply false +} -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" +include ":app" diff --git a/android/settings_aar.gradle b/android/settings_aar.gradle deleted file mode 100644 index e7b4def..0000000 --- a/android/settings_aar.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app'