Skip to content

Commit 9e51b11

Browse files
authored
New flutter version improvements (#1974)
* Upgrade .gitignore, .metadata and analysis_options.yaml in example/ * Upgrade android/ directory (based on the new template) * Upgrade linux/ directory (based on the new template) * Upgrade macos/ files (based on the new template) * Upgrade web/ directory (based on the new template) * Upgrade ios/ directory (based on the new template) * Update .metadata * Fix analyze issues
1 parent 0b7e4bd commit 9e51b11

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+614
-275
lines changed

example/.gitignore

Lines changed: 15 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
# Miscellaneous
2+
.flutter-plugins
23
*.class
34
*.log
45
*.pyc
56
*.swp
67
.DS_Store
78
.atom/
9+
.build/
810
.buildlog/
911
.history
1012
.svn/
11-
12-
pubspec.lock
13+
.swiftpm/
14+
migrate_working_dir/
1315

1416
# IntelliJ related
1517
*.iml
@@ -24,53 +26,21 @@ pubspec.lock
2426

2527
# Flutter/Dart/Pub related
2628
**/doc/api/
29+
**/ios/Flutter/.last_build_id
2730
.dart_tool/
28-
.flutter-plugins
29-
.packages
31+
.flutter-plugins-dependencies
3032
.pub-cache/
3133
.pub/
3234
/build/
33-
.flutter-plugins-dependencies
35+
/coverage/
3436

35-
# Android related
36-
**/android/**/gradle-wrapper.jar
37-
**/android/.gradle
38-
**/android/captures/
39-
**/android/gradlew
40-
**/android/gradlew.bat
41-
**/android/local.properties
42-
**/android/**/GeneratedPluginRegistrant.java
37+
# Symbolication related
38+
app.*.symbols
4339

44-
# iOS/XCode related
45-
**/ios/**/*.mode1v3
46-
**/ios/**/*.mode2v3
47-
**/ios/**/*.moved-aside
48-
**/ios/**/*.pbxuser
49-
**/ios/**/*.perspectivev3
50-
**/ios/**/*sync/
51-
**/ios/**/.sconsign.dblite
52-
**/ios/**/.tags*
53-
**/ios/**/.vagrant/
54-
**/ios/**/DerivedData/
55-
**/ios/**/Icon?
56-
**/ios/**/Pods/
57-
**/ios/**/.symlinks/
58-
**/ios/**/profile
59-
**/ios/**/xcuserdata
60-
**/ios/.generated/
61-
**/ios/Flutter/App.framework
62-
**/ios/Flutter/Flutter.framework
63-
**/ios/Flutter/Generated.xcconfig
64-
**/ios/Flutter/app.flx
65-
**/ios/Flutter/app.zip
66-
**/ios/Flutter/flutter_assets/
67-
**/ios/ServiceDefinitions.json
68-
**/ios/Runner/GeneratedPluginRegistrant.*
69-
**/ios/Flutter/Flutter.podspec
40+
# Obfuscation related
41+
app.*.map.json
7042

71-
# Exceptions to above rules.
72-
!**/ios/**/default.mode1v3
73-
!**/ios/**/default.mode2v3
74-
!**/ios/**/default.pbxuser
75-
!**/ios/**/default.perspectivev3
76-
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
43+
# Android Studio will place build artifacts here
44+
/android/app/debug
45+
/android/app/profile
46+
/android/app/release

example/.metadata

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# This file tracks properties of this Flutter project.
22
# Used by Flutter tool to assess capabilities and perform upgrades etc.
33
#
4-
# This file should be version controlled.
4+
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
8-
channel: stable
7+
revision: "20f82749394e68bcfbbeee96bad384abaae09c13"
8+
channel: "stable"
99

1010
project_type: app
1111

1212
# Tracks metadata for the flutter migrate command
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
17-
base_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
18-
- platform: windows
19-
create_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
20-
base_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
16+
create_revision: 20f82749394e68bcfbbeee96bad384abaae09c13
17+
base_revision: 20f82749394e68bcfbbeee96bad384abaae09c13
18+
- platform: ios
19+
create_revision: 20f82749394e68bcfbbeee96bad384abaae09c13
20+
base_revision: 20f82749394e68bcfbbeee96bad384abaae09c13
2121

2222
# User provided section
2323

example/analysis_options.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ linter:
1313
# The lint rules applied to this project can be customized in the
1414
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
1515
# included above or to enable additional rules. A list of all available lints
16-
# and their documentation is published at
17-
# https://dart-lang.github.io/linter/lints/index.html.
16+
# and their documentation is published at https://dart.dev/lints.
1817
#
1918
# Instead of disabling a lint rule for the entire project in the
2019
# section below, it can also be suppressed for a single line of code

example/android/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
.cxx/
89

910
# Remember to never publicly share your keystore.
10-
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
# See https://flutter.dev/to/reference-keystore
1112
key.properties
1213
**/*.keystore
1314
**/*.jks

example/android/app/build.gradle

Lines changed: 0 additions & 55 deletions
This file was deleted.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import java.util.Properties
2+
import java.io.FileInputStream
3+
4+
plugins {
5+
id("com.android.application")
6+
id("kotlin-android")
7+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
8+
id("dev.flutter.flutter-gradle-plugin")
9+
}
10+
11+
val keystoreProperties = Properties()
12+
val keystorePropertiesFile = rootProject.file("key.properties")
13+
if (keystorePropertiesFile.exists()) {
14+
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
15+
}
16+
17+
android {
18+
namespace = "dev.flchart.app"
19+
compileSdk = flutter.compileSdkVersion
20+
ndkVersion = flutter.ndkVersion
21+
22+
compileOptions {
23+
sourceCompatibility = JavaVersion.VERSION_11
24+
targetCompatibility = JavaVersion.VERSION_11
25+
}
26+
27+
kotlinOptions {
28+
jvmTarget = JavaVersion.VERSION_11.toString()
29+
}
30+
31+
defaultConfig {
32+
applicationId = "dev.flchart.app"
33+
minSdk = flutter.minSdkVersion
34+
targetSdk = flutter.targetSdkVersion
35+
versionCode = flutter.versionCode
36+
versionName = flutter.versionName
37+
}
38+
39+
signingConfigs {
40+
create("release") {
41+
keyAlias = keystoreProperties["keyAlias"] as String
42+
keyPassword = keystoreProperties["keyPassword"] as String
43+
storeFile = keystoreProperties["storeFile"]?.let { file(it) }
44+
storePassword = keystoreProperties["storePassword"] as String
45+
}
46+
}
47+
48+
buildTypes {
49+
release {
50+
signingConfig = signingConfigs.getByName("release")
51+
}
52+
}
53+
}
54+
55+
flutter {
56+
source = "../.."
57+
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="dev.flchart.app">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32
<!-- The INTERNET permission is required for development. Specifically,
43
the Flutter tool needs it to communicate with the running application
54
to allow setting breakpoints, to provide hot reload, etc.

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="dev.flchart.app">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32
<uses-permission android:name="android.permission.INTERNET"/>
43
<queries>
54
<intent>
@@ -10,6 +9,16 @@
109
<action android:name="android.intent.action.VIEW" />
1110
<data android:scheme="https" />
1211
</intent>
12+
13+
<!-- Required to query activities that can process text, see:
14+
https://developer.android.com/training/package-visibility and
15+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
16+
17+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
18+
<intent>
19+
<action android:name="android.intent.action.PROCESS_TEXT"/>
20+
<data android:mimeType="text/plain"/>
21+
</intent>
1322
</queries>
1423
<application
1524
android:label="FL Chart App"
@@ -19,6 +28,7 @@
1928
android:name=".MainActivity"
2029
android:exported="true"
2130
android:launchMode="singleTop"
31+
android:taskAffinity=""
2232
android:theme="@style/LaunchTheme"
2333
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
2434
android:hardwareAccelerated="true"

example/android/app/src/main/kotlin/dev/flchart/app/MainActivity.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ package dev.flchart.app
22

33
import io.flutter.embedding.android.FlutterActivity
44

5-
class MainActivity: FlutterActivity() {
6-
}
5+
class MainActivity : FlutterActivity()

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="dev.flchart.app">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32
<!-- The INTERNET permission is required for development. Specifically,
43
the Flutter tool needs it to communicate with the running application
54
to allow setting breakpoints, to provide hot reload, etc.

0 commit comments

Comments
 (0)