From d0b2bce8fa16a86c43ccfe64d4a5429911009df8 Mon Sep 17 00:00:00 2001 From: Konstantin Wachendorff Date: Tue, 8 Oct 2024 15:39:58 +0200 Subject: [PATCH] upgrades for android --- .metadata | 29 +++-------- android/app/build.gradle | 49 ++++++++----------- android/app/src/debug/AndroidManifest.xml | 3 +- android/app/src/main/AndroidManifest.xml | 15 +++++- .../example/skyle_calibration/MainActivity.kt | 6 --- .../kotlin/de/eyev/skyle_ik/MainActivity.kt | 5 ++ android/app/src/profile/AndroidManifest.xml | 3 +- android/build.gradle | 4 +- android/gradle.properties | 2 +- android/settings.gradle | 2 +- lib/app.dart | 5 ++ lib/main.dart | 20 +++++--- pubspec.lock | 8 ++- pubspec.yaml | 4 +- 14 files changed, 73 insertions(+), 82 deletions(-) delete mode 100644 android/app/src/main/kotlin/com/example/skyle_calibration/MainActivity.kt create mode 100644 android/app/src/main/kotlin/de/eyev/skyle_ik/MainActivity.kt diff --git a/.metadata b/.metadata index 31b763f..65a4a37 100644 --- a/.metadata +++ b/.metadata @@ -1,11 +1,11 @@ # This file tracks properties of this Flutter project. # Used by Flutter tool to assess capabilities and perform upgrades etc. # -# This file should be version controlled. +# This file should be version controlled and should not be manually edited. version: - revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 - channel: stable + revision: "5dcb86f68f239346676ceb1ed1ea385bd215fba1" + channel: "stable" project_type: app @@ -13,26 +13,11 @@ project_type: app migration: platforms: - platform: root - create_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 - base_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 - platform: android - create_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 - base_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 - - platform: ios - create_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 - base_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 - - platform: linux - create_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 - base_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 - - platform: macos - create_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 - base_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 - - platform: web - create_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 - base_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 - - platform: windows - create_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 - base_revision: ffccd96b62ee8cec7740dab303538c5fc26ac543 + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 # User provided section diff --git a/android/app/build.gradle b/android/app/build.gradle index 3f2ea17..13fc5f5 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,67 +1,58 @@ 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" } def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') +def localPropertiesFile = rootProject.file("local.properties") if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> + localPropertiesFile.withReader("UTF-8") { reader -> localProperties.load(reader) } } -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +def flutterVersionCode = localProperties.getProperty("flutter.versionCode") if (flutterVersionCode == null) { - flutterVersionCode = '1' + flutterVersionCode = "1" } -def flutterVersionName = localProperties.getProperty('flutter.versionName') +def flutterVersionName = localProperties.getProperty("flutter.versionName") if (flutterVersionName == null) { - flutterVersionName = '1.0' + flutterVersionName = "1.0" } android { - namespace "com.example.skyle_ik" - compileSdkVersion flutter.compileSdkVersion - ndkVersion flutter.ndkVersion + namespace = "de.eyev.skyle_ik" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.skyle_ik" + applicationId = "de.eyev.skyle_ik" // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutterVersionCode.toInteger() + versionName = flutterVersionName } buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug + signingConfig = signingConfigs.debug } } } flutter { - source '../..' + source = "../.." } - -dependencies { } diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index dff87af..399f698 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,4 @@ - + + + + + + + diff --git a/android/app/src/main/kotlin/com/example/skyle_calibration/MainActivity.kt b/android/app/src/main/kotlin/com/example/skyle_calibration/MainActivity.kt deleted file mode 100644 index 7152d43..0000000 --- a/android/app/src/main/kotlin/com/example/skyle_calibration/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.skyle_ik - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/android/app/src/main/kotlin/de/eyev/skyle_ik/MainActivity.kt b/android/app/src/main/kotlin/de/eyev/skyle_ik/MainActivity.kt new file mode 100644 index 0000000..666da99 --- /dev/null +++ b/android/app/src/main/kotlin/de/eyev/skyle_ik/MainActivity.kt @@ -0,0 +1,5 @@ +package de.eyev.skyle_ik + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml index dff87af..399f698 100644 --- a/android/app/src/profile/AndroidManifest.xml +++ b/android/app/src/profile/AndroidManifest.xml @@ -1,5 +1,4 @@ - +