Skip to content

Commit 55d308c

Browse files
Merge pull request #354 from berhili098/update/gradle-and-dependencies
chore: update SDK constraints, dependencies, and Gradle configuration…
2 parents 9527df4 + f55edbd commit 55d308c

32 files changed

+426
-160
lines changed

analysis_options.yaml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,34 @@
1-
include: package:pedantic/analysis_options.yaml
1+
include: package:lints/recommended.yaml
2+
analyzer:
3+
errors:
4+
missing_return: error
5+
must_be_immutable: error
6+
must_call_super: error
7+
invalid_use_of_protected_member: error
8+
parameter_assignments: error
9+
sort_unnamed_constructors_first: error
10+
sort_pub_dependencies: ignore
11+
always_use_package_imports: error
12+
invalid_annotation_target: ignore
13+
type_annotate_public_apis: false
14+
use_build_context_synchronously: warning
15+
16+
fix:
17+
data:
18+
- always_put_required_named_parameters_first
19+
- avoid_redundant_argument_values
20+
- prefer_const_constructors
21+
- use_key_in_widget_constructors
22+
23+
dart:
24+
code-actions-on-save:
25+
source:
26+
fix-all: true
27+
organize-imports: true
28+
fix-on-save:
29+
- implicit-casts: false
30+
fix:
31+
sort-members: true
32+
use-rational-asserts: true
33+
# plugins:
34+
# - custom_lint

example/.idea/runConfigurations/main_dart.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/.metadata

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,42 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: 1aafb3a8b9b0c36241c5f5b34ee914770f015818
8-
channel: stable
7+
revision: "17025dd88227cd9532c33fa78f5250d548d87e9a"
8+
channel: "stable"
99

1010
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
17+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
18+
- platform: android
19+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
20+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
21+
- platform: ios
22+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
23+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
24+
- platform: linux
25+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
26+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
27+
- platform: macos
28+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
29+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
30+
- platform: web
31+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
32+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
33+
- platform: windows
34+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
35+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
36+
37+
# User provided section
38+
39+
# List of Local paths (relative to this file) that should be
40+
# ignored by the migrate tool.
41+
#
42+
# Files that are not part of the templates will be ignored by default.
43+
unmanaged_files:
44+
- 'lib/main.dart'
45+
- 'ios/Runner.xcodeproj/project.pbxproj'

example/analysis_options.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
analyzer:
11+
errors:
12+
depend_on_referenced_packages: ignore
13+
include: package:lints/recommended.yaml
14+
linter:
15+
# The lint rules applied to this project can be customized in the
16+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
17+
# included above or to enable additional rules. A list of all available lints
18+
# and their documentation is published at https://dart.dev/lints.
19+
#
20+
# Instead of disabling a lint rule for the entire project in the
21+
# section below, it can also be suppressed for a single line of code
22+
# or a specific dart file by using the `// ignore: name_of_lint` and
23+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
24+
# producing the lint.
25+
rules:
26+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
27+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
28+
29+
# Additional information about this file can be found at
30+
# https://dart.dev/guides/language/analysis-options

example/android/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ gradle-wrapper.jar
77
GeneratedPluginRegistrant.java
88

99
# Remember to never publicly share your keystore.
10-
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
10+
# See https://flutter.dev/to/reference-keystore
1111
key.properties
12+
**/*.keystore
13+
**/*.jks

example/android/.idea/workspace.xml

Lines changed: 171 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/android/app/build.gradle

Lines changed: 22 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,44 @@
1-
def localProperties = new Properties()
2-
def localPropertiesFile = rootProject.file('local.properties')
3-
if (localPropertiesFile.exists()) {
4-
localPropertiesFile.withReader('UTF-8') { reader ->
5-
localProperties.load(reader)
6-
}
7-
}
8-
9-
def flutterRoot = localProperties.getProperty('flutter.sdk')
10-
if (flutterRoot == null) {
11-
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12-
}
13-
14-
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15-
if (flutterVersionCode == null) {
16-
flutterVersionCode = '1'
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5+
id "dev.flutter.flutter-gradle-plugin"
176
}
187

19-
def flutterVersionName = localProperties.getProperty('flutter.versionName')
20-
if (flutterVersionName == null) {
21-
flutterVersionName = '1.0'
22-
}
23-
24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27-
288
android {
29-
compileSdkVersion 29
9+
namespace = "com.example.example"
10+
compileSdk = 35
11+
ndkVersion = flutter.ndkVersion
3012

31-
sourceSets {
32-
main.java.srcDirs += 'src/main/kotlin'
13+
compileOptions {
14+
sourceCompatibility = JavaVersion.VERSION_1_8
15+
targetCompatibility = JavaVersion.VERSION_1_8
3316
}
3417

35-
lintOptions {
36-
disable 'InvalidPackage'
18+
kotlinOptions {
19+
jvmTarget = JavaVersion.VERSION_1_8
3720
}
3821

3922
defaultConfig {
4023
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41-
applicationId "com.example.example"
42-
minSdkVersion 16
43-
targetSdkVersion 29
44-
versionCode flutterVersionCode.toInteger()
45-
versionName flutterVersionName
24+
applicationId = "com.example.example"
25+
// You can update the following values to match your application needs.
26+
// For more information, see: https://flutter.dev/to/review-gradle-config.
27+
minSdk = flutter.minSdkVersion
28+
targetSdk = flutter.targetSdkVersion
29+
versionCode = flutter.versionCode
30+
versionName = flutter.versionName
4631
}
4732

4833
buildTypes {
4934
release {
5035
// TODO: Add your own signing config for the release build.
5136
// Signing with the debug keys for now, so `flutter run --release` works.
52-
signingConfig signingConfigs.debug
37+
signingConfig = signingConfigs.debug
5338
}
5439
}
5540
}
5641

5742
flutter {
58-
source '../..'
59-
}
60-
61-
dependencies {
62-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
43+
source = "../.."
6344
}

example/android/app/src/debug/AndroidManifest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.example">
3-
<!-- Flutter needs it to communicate with the running application
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->
66
<uses-permission android:name="android.permission.INTERNET"/>

0 commit comments

Comments
 (0)