diff --git a/analysis_options.yaml b/analysis_options.yaml index 544432675..285cf1fb5 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -27,7 +27,6 @@ linter: type_annotate_public_apis: true unnecessary_statements: true use_named_constants: true - use_super_parameters: true cast_nullable_to_non_nullable: true only_throw_errors: true sort_unnamed_constructors_first: true diff --git a/example/.metadata b/example/.metadata index bead5eefe..7b8b9e04e 100644 --- a/example/.metadata +++ b/example/.metadata @@ -4,8 +4,8 @@ # This file should be version controlled and should not be manually edited. version: - revision: "2524052335ec76bb03e04ede244b071f1b86d190" - channel: "stable" + revision: "0b591f2c82e9f59276ed68c7d4cbd63196f7c865" + channel: "beta" project_type: app @@ -13,11 +13,11 @@ project_type: app migration: platforms: - platform: root - create_revision: 2524052335ec76bb03e04ede244b071f1b86d190 - base_revision: 2524052335ec76bb03e04ede244b071f1b86d190 - - platform: windows - create_revision: 2524052335ec76bb03e04ede244b071f1b86d190 - base_revision: 2524052335ec76bb03e04ede244b071f1b86d190 + create_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865 + base_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865 + - platform: android + create_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865 + base_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865 # User provided section diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml index 71b37b60c..c659fe36c 100644 --- a/example/analysis_options.yaml +++ b/example/analysis_options.yaml @@ -1,30 +1,8 @@ -include: package:flutter_lints/flutter.yaml - -analyzer: - language: - strict-casts: true - strict-inference: true - strict-raw-types: true - errors: - missing_required_param: error - missing_return: error +# match the lint rules from flutter_map +include: ./../analysis_options.yaml +# only specify things that should be different from the package linter: rules: - library_private_types_in_public_api: false # Not relevant to the example - - always_declare_return_types: true - always_use_package_imports: true - avoid_dynamic_calls: true - cancel_subscriptions: true - close_sinks: false - package_api_docs: true - prefer_constructors_over_static_methods: true - prefer_final_in_for_each: true - prefer_final_locals: true - prefer_int_literals: true - test_types_in_equals: true - throw_in_finally: true - type_annotate_public_apis: true - unnecessary_statements: true - use_named_constants: true \ No newline at end of file + # using the default parameter values are used as explanation and for showcase + avoid_redundant_argument_values: false diff --git a/example/android/.gitignore b/example/android/.gitignore index 0a741cb43..6f568019d 100644 --- a/example/android/.gitignore +++ b/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/example/android/app/build.gradle b/example/android/app/build.gradle index a654ab681..de1ae64a5 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -1,3 +1,9 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) { } } -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 = '6' @@ -21,21 +22,27 @@ if (flutterVersionName == null) { flutterVersionName = '6.0.1' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { - compileSdkVersion 33 + namespace "dev.fleaflet.flutter_map.example" + 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' } defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "me.jpryan.flutter_map_example" - minSdkVersion 16 + applicationId "dev.fleaflet.flutter_map.example" + minSdkVersion flutter.minSdkVersion targetSdkVersion 31 versionCode flutterVersionCode.toInteger() versionName flutterVersionName @@ -48,13 +55,10 @@ android { signingConfig signingConfigs.debug } } - namespace 'me.jpryan.flutter_map_example' } flutter { source '../..' } -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} +dependencies {} diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml index f880684a6..399f6981d 100644 --- a/example/android/app/src/debug/AndroidManifest.xml +++ b/example/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,6 @@ - diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index d8b2374c9..5222e963c 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -1,22 +1,16 @@ - - - - - - - -