Skip to content

Commit 7327102

Browse files
authored
Upgrade to flutter v2 (#26)
1 parent 9d86918 commit 7327102

File tree

25 files changed

+154
-89
lines changed

25 files changed

+154
-89
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,8 @@ app.*.symbols
3939

4040
# Obfuscation related
4141
app.*.map.json
42+
43+
# Android Studio will place build artifacts here
44+
/android/app/debug
45+
/android/app/profile
46+
/android/app/release

.metadata

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: 78910062997c3a836feee883712c241a5fd22983
7+
revision: c5a4b4029c0798f37c4a39b479d7cb75daa7b05c
88
channel: stable
99

1010
project_type: app

android/app/build.gradle

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,17 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
compileSdkVersion 29
29+
compileSdkVersion 30
3030

3131
sourceSets {
3232
main.java.srcDirs += 'src/main/kotlin'
3333
}
3434

35-
lintOptions {
36-
disable 'InvalidPackage'
37-
}
38-
3935
defaultConfig {
4036
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41-
applicationId "com.example.github_actions_flutter_workflow"
37+
applicationId "com.example.github_actions_flutter_workflows"
4238
minSdkVersion 16
43-
targetSdkVersion 29
39+
targetSdkVersion 30
4440
versionCode flutterVersionCode.toInteger()
4541
versionName flutterVersionName
4642
}

android/app/src/debug/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.github_actions_flutter_workflow">
2+
package="com.example.github_actions_flutter_workflows">
33
<!-- Flutter needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->

android/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.github_actions_flutter_workflow">
3-
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
4-
calls FlutterMain.startInitialization(this); in its onCreate method.
5-
In most cases you can leave this as-is, but you if you want to provide
6-
additional functionality it is fine to subclass or reimplement
7-
FlutterApplication and put your custom class here. -->
8-
<application
9-
android:name="io.flutter.app.FlutterApplication"
10-
android:label="github_actions_flutter_workflow"
2+
package="com.example.github_actions_flutter_workflows">
3+
<application
4+
android:label="github_actions_flutter_workflows"
115
android:icon="@mipmap/ic_launcher">
126
<activity
137
android:name=".MainActivity"

android/app/src/main/kotlin/com/example/github_actions_flutter_workflow/MainActivity.kt renamed to android/app/src/main/kotlin/com/example/github_actions_flutter_workflows/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example.github_actions_flutter_workflow
1+
package com.example.github_actions_flutter_workflows
22

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="?android:colorBackground" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
4+
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
5+
<!-- Show a splash screen on the activity. Automatically removed when
6+
Flutter draws its first frame -->
7+
<item name="android:windowBackground">@drawable/launch_background</item>
8+
</style>
9+
<!-- Theme applied to the Android Window as soon as the process has started.
10+
This theme determines the color of the Android Window while your
11+
Flutter UI initializes, as well as behind your Flutter UI while its
12+
running.
13+
14+
This Theme is only used starting with V2 of Flutter's Android embedding. -->
15+
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
16+
<item name="android:windowBackground">?android:colorBackground</item>
17+
</style>
18+
</resources>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<!-- Theme applied to the Android Window while the process is starting -->
4-
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
3+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
4+
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
55
<!-- Show a splash screen on the activity. Automatically removed when
66
Flutter draws its first frame -->
77
<item name="android:windowBackground">@drawable/launch_background</item>
@@ -12,7 +12,7 @@
1212
running.
1313
1414
This Theme is only used starting with V2 of Flutter's Android embedding. -->
15-
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
16-
<item name="android:windowBackground">@android:color/white</item>
15+
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
16+
<item name="android:windowBackground">?android:colorBackground</item>
1717
</style>
1818
</resources>

android/app/src/profile/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.github_actions_flutter_workflow">
2+
package="com.example.github_actions_flutter_workflows">
33
<!-- Flutter needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->

0 commit comments

Comments
 (0)