diff --git a/example_nav2/.metadata b/example_nav2/.metadata index 90eabcfff..78e314ad5 100644 --- a/example_nav2/.metadata +++ b/example_nav2/.metadata @@ -4,8 +4,8 @@ # This file should be version controlled and should not be manually edited. version: - revision: "80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819" - channel: "stable" + revision: "5f77df9269acb57aea28082203b62b7e16d38c29" + channel: "master" project_type: app @@ -13,26 +13,11 @@ project_type: app migration: platforms: - platform: root - create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 - base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + create_revision: 5f77df9269acb57aea28082203b62b7e16d38c29 + base_revision: 5f77df9269acb57aea28082203b62b7e16d38c29 - platform: android - create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 - base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 - - platform: ios - create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 - base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 - - platform: linux - create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 - base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 - - platform: macos - create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 - base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 - - platform: web - create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 - base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 - - platform: windows - create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 - base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819 + create_revision: 5f77df9269acb57aea28082203b62b7e16d38c29 + base_revision: 5f77df9269acb57aea28082203b62b7e16d38c29 # User provided section diff --git a/example_nav2/android/.gitignore b/example_nav2/android/.gitignore index 0a741cb43..be3943c96 100644 --- a/example_nav2/android/.gitignore +++ b/example_nav2/android/.gitignore @@ -5,7 +5,10 @@ gradle-wrapper.jar /gradlew.bat /local.properties GeneratedPluginRegistrant.java +.cxx/ # Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +# See https://flutter.dev/to/reference-keystore key.properties +**/*.keystore +**/*.jks diff --git a/example_nav2/android/app/build.gradle b/example_nav2/android/app/build.gradle deleted file mode 100644 index b07a8f9b6..000000000 --- a/example_nav2/android/app/build.gradle +++ /dev/null @@ -1,59 +0,0 @@ -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 = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 30 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.get.example_nav2" - minSdkVersion 16 - targetSdkVersion 30 - 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 - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/example_nav2/android/app/build.gradle.kts b/example_nav2/android/app/build.gradle.kts new file mode 100644 index 000000000..8e445e061 --- /dev/null +++ b/example_nav2/android/app/build.gradle.kts @@ -0,0 +1,44 @@ +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") +} + +android { + namespace = "com.example.example_nav2" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.example.example_nav2" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + 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.getByName("debug") + } + } +} + +flutter { + source = "../.." +} diff --git a/example_nav2/android/app/src/debug/AndroidManifest.xml b/example_nav2/android/app/src/debug/AndroidManifest.xml index a508b49d7..399f6981d 100644 --- a/example_nav2/android/app/src/debug/AndroidManifest.xml +++ b/example_nav2/android/app/src/debug/AndroidManifest.xml @@ -1,6 +1,6 @@ - - diff --git a/example_nav2/android/app/src/main/AndroidManifest.xml b/example_nav2/android/app/src/main/AndroidManifest.xml index d4e7bbe02..9f51ebdfa 100644 --- a/example_nav2/android/app/src/main/AndroidManifest.xml +++ b/example_nav2/android/app/src/main/AndroidManifest.xml @@ -1,11 +1,13 @@ - - + - - @@ -38,4 +31,15 @@ android:name="flutterEmbedding" android:value="2" /> + + + + + + + diff --git a/example_nav2/android/app/src/main/kotlin/com/example/example_nav2/MainActivity.kt b/example_nav2/android/app/src/main/kotlin/com/example/example_nav2/MainActivity.kt new file mode 100644 index 000000000..f0d504922 --- /dev/null +++ b/example_nav2/android/app/src/main/kotlin/com/example/example_nav2/MainActivity.kt @@ -0,0 +1,5 @@ +package com.example.example_nav2 + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity : FlutterActivity() diff --git a/example_nav2/android/app/src/main/kotlin/com/get/example_nav2/MainActivity.kt b/example_nav2/android/app/src/main/kotlin/com/get/example_nav2/MainActivity.kt deleted file mode 100644 index 4b1c5d03a..000000000 --- a/example_nav2/android/app/src/main/kotlin/com/get/example_nav2/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.get.example_nav2 - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/example_nav2/android/app/src/main/res/values-night/styles.xml b/example_nav2/android/app/src/main/res/values-night/styles.xml index 449a9f930..06952be74 100644 --- a/example_nav2/android/app/src/main/res/values-night/styles.xml +++ b/example_nav2/android/app/src/main/res/values-night/styles.xml @@ -3,14 +3,14 @@