From f51392e5fae166bc1440f7f32a73cc372a6c6f01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20ERDO=C4=9EAN?= Date: Sat, 26 Nov 2022 12:11:02 +0300 Subject: [PATCH] app upgraded to api 33 --- android/app/build.gradle | 96 +++++++++++++++++-- android/app/src/main/AndroidManifest.xml | 21 +--- android/build.gradle | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- lib/main.dart | 1 + pubspec.lock | 49 ++++------ 6 files changed, 121 insertions(+), 56 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 36fee475..86799ffe 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,3 +1,73 @@ +// 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 31 +// ndkVersion flutter.ndkVersion + +// kotlinOptions { +// jvmTarget = '1.8' +// } + +// sourceSets { +// main.java.srcDirs += 'src/main/kotlin' +// } + +// // lintOptions { +// // disable 'InvalidPackage' +// // } + +// defaultConfig { +// // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). +// applicationId "com.example.shop_app" +// minSdkVersion 16 +// targetSdkVersion 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 +// } +// } +// } + +// flutter { +// source '../..' +// } + +// dependencies { +// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" +// } + +////////////////// def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -26,21 +96,29 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 28 + compileSdkVersion 33 //flutter.compileSdkVersion + ndkVersion flutter.ndkVersion - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } - lintOptions { - disable 'InvalidPackage' + kotlinOptions { + jvmTarget = '1.8' + } + + 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.shop_app" + // 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 16 - targetSdkVersion 28 + targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName } @@ -59,5 +137,9 @@ flutter { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" } + + + + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 9405f80a..434b729d 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,16 +1,14 @@ + + - - - - diff --git a/android/build.gradle b/android/build.gradle index 3100ad2d..83ae2200 100644 --- a/android/build.gradle +++ b/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/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 296b146b..595fb867 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ 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.2-all.zip diff --git a/lib/main.dart b/lib/main.dart index 72434aee..f7400ec0 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -6,6 +6,7 @@ import 'package:shop_app/theme.dart'; void main() { runApp(MyApp()); + } class MyApp extends StatelessWidget { diff --git a/pubspec.lock b/pubspec.lock index d5b28927..5991388b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.9.0" boolean_selector: dependency: transitive description: @@ -21,28 +21,21 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" + version: "1.2.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" cupertino_icons: dependency: "direct main" description: @@ -56,7 +49,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" flutter: dependency: "direct main" description: flutter @@ -80,14 +73,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.12" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.8.0" nested: dependency: transitive description: @@ -101,7 +101,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.2" path_drawing: dependency: transitive description: @@ -141,7 +141,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -162,35 +162,28 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" + version: "0.4.12" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.2" xml: dependency: transitive description: @@ -199,5 +192,5 @@ packages: source: hosted version: "5.1.2" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=2.17.0-0 <3.0.0" flutter: ">=1.24.0-7.0"