From 526af223bc363306bbde2200fe989845a6f5ad56 Mon Sep 17 00:00:00 2001 From: "Mateus Felipe C. C. Pinto" Date: Thu, 9 Feb 2023 16:17:36 -0300 Subject: [PATCH] Recreate example, as it was not building --- update_available/example/.metadata | 24 +++++++++++++++++-- update_available/example/android/.gitignore | 2 ++ .../example/android/app/build.gradle | 20 +++++++++++----- .../android/app/src/debug/AndroidManifest.xml | 3 ++- .../android/app/src/main/AndroidManifest.xml | 21 ++++------------ .../com/example/example/MainActivity.kt | 6 +++++ .../res/drawable-v21/launch_background.xml | 12 ++++++++++ .../app/src/main/res/values-night/styles.xml | 18 ++++++++++++++ .../app/src/main/res/values/styles.xml | 12 +++++----- .../app/src/profile/AndroidManifest.xml | 3 ++- update_available/example/android/build.gradle | 8 +++---- .../example/android/gradle.properties | 1 - .../gradle/wrapper/gradle-wrapper.properties | 3 +-- 13 files changed, 93 insertions(+), 40 deletions(-) create mode 100644 update_available/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt create mode 100644 update_available/example/android/app/src/main/res/drawable-v21/launch_background.xml create mode 100644 update_available/example/android/app/src/main/res/values-night/styles.xml diff --git a/update_available/example/.metadata b/update_available/example/.metadata index f0274b3..1e2a170 100644 --- a/update_available/example/.metadata +++ b/update_available/example/.metadata @@ -1,10 +1,30 @@ # 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 and should not be manually edited. +# This file should be version controlled. version: - revision: 1aafb3a8b9b0c36241c5f5b34ee914770f015818 + revision: 135454af32477f815a7525073027a3ff9eff1bfd channel: stable project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 135454af32477f815a7525073027a3ff9eff1bfd + base_revision: 135454af32477f815a7525073027a3ff9eff1bfd + - platform: android + create_revision: 135454af32477f815a7525073027a3ff9eff1bfd + base_revision: 135454af32477f815a7525073027a3ff9eff1bfd + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/update_available/example/android/.gitignore b/update_available/example/android/.gitignore index 0a741cb..6f56801 100644 --- a/update_available/example/android/.gitignore +++ b/update_available/example/android/.gitignore @@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app key.properties +**/*.keystore +**/*.jks diff --git a/update_available/example/android/app/build.gradle b/update_available/example/android/app/build.gradle index 5a4d759..c9b0773 100644 --- a/update_available/example/android/app/build.gradle +++ b/update_available/example/android/app/build.gradle @@ -26,21 +26,29 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 29 + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' } - lintOptions { - disable 'InvalidPackage' + 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.example.example" + // 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 21 - targetSdkVersion 29 + targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/update_available/example/android/app/src/debug/AndroidManifest.xml b/update_available/example/android/app/src/debug/AndroidManifest.xml index c208884..45d523a 100644 --- a/update_available/example/android/app/src/debug/AndroidManifest.xml +++ b/update_available/example/android/app/src/debug/AndroidManifest.xml @@ -1,6 +1,7 @@ - diff --git a/update_available/example/android/app/src/main/AndroidManifest.xml b/update_available/example/android/app/src/main/AndroidManifest.xml index 14b4d48..3f41384 100644 --- a/update_available/example/android/app/src/main/AndroidManifest.xml +++ b/update_available/example/android/app/src/main/AndroidManifest.xml @@ -1,16 +1,12 @@ - - - - diff --git a/update_available/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt b/update_available/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt new file mode 100644 index 0000000..e793a00 --- /dev/null +++ b/update_available/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/update_available/example/android/app/src/main/res/drawable-v21/launch_background.xml b/update_available/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/update_available/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/update_available/example/android/app/src/main/res/values-night/styles.xml b/update_available/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/update_available/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/update_available/example/android/app/src/main/res/values/styles.xml b/update_available/example/android/app/src/main/res/values/styles.xml index 1f83a33..cb1ef88 100644 --- a/update_available/example/android/app/src/main/res/values/styles.xml +++ b/update_available/example/android/app/src/main/res/values/styles.xml @@ -1,18 +1,18 @@ - - - diff --git a/update_available/example/android/app/src/profile/AndroidManifest.xml b/update_available/example/android/app/src/profile/AndroidManifest.xml index c208884..45d523a 100644 --- a/update_available/example/android/app/src/profile/AndroidManifest.xml +++ b/update_available/example/android/app/src/profile/AndroidManifest.xml @@ -1,6 +1,7 @@ - diff --git a/update_available/example/android/build.gradle b/update_available/example/android/build.gradle index 3100ad2..83ae220 100644 --- a/update_available/example/android/build.gradle +++ b/update_available/example/android/build.gradle @@ -1,12 +1,12 @@ buildscript { - ext.kotlin_version = '1.3.50' + ext.kotlin_version = '1.6.10' repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' + classpath 'com.android.tools.build:gradle:7.1.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -14,7 +14,7 @@ buildscript { allprojects { repositories { google() - jcenter() + mavenCentral() } } diff --git a/update_available/example/android/gradle.properties b/update_available/example/android/gradle.properties index a673820..94adc3a 100644 --- a/update_available/example/android/gradle.properties +++ b/update_available/example/android/gradle.properties @@ -1,4 +1,3 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true -android.enableR8=true diff --git a/update_available/example/android/gradle/wrapper/gradle-wrapper.properties b/update_available/example/android/gradle/wrapper/gradle-wrapper.properties index 296b146..cb24abd 100644 --- a/update_available/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/update_available/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#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-7.4-all.zip