Skip to content

Commit 898aedc

Browse files
feat: update native example setups
1 parent bd2bb3a commit 898aedc

File tree

21 files changed

+394
-106
lines changed

21 files changed

+394
-106
lines changed

example/.metadata

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
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: f72efea43c3013323d1b95cff571f3c1caa37583
8-
channel: stable
7+
revision: "17025dd88227cd9532c33fa78f5250d548d87e9a"
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: f72efea43c3013323d1b95cff571f3c1caa37583
17-
base_revision: f72efea43c3013323d1b95cff571f3c1caa37583
16+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
17+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
1818
- platform: android
19-
create_revision: f72efea43c3013323d1b95cff571f3c1caa37583
20-
base_revision: f72efea43c3013323d1b95cff571f3c1caa37583
19+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
20+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
2121
- platform: ios
22-
create_revision: f72efea43c3013323d1b95cff571f3c1caa37583
23-
base_revision: f72efea43c3013323d1b95cff571f3c1caa37583
22+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
23+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
2424
- platform: linux
25-
create_revision: f72efea43c3013323d1b95cff571f3c1caa37583
26-
base_revision: f72efea43c3013323d1b95cff571f3c1caa37583
25+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
26+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
2727
- platform: macos
28-
create_revision: f72efea43c3013323d1b95cff571f3c1caa37583
29-
base_revision: f72efea43c3013323d1b95cff571f3c1caa37583
28+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
29+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
3030
- platform: web
31-
create_revision: f72efea43c3013323d1b95cff571f3c1caa37583
32-
base_revision: f72efea43c3013323d1b95cff571f3c1caa37583
31+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
32+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
3333
- platform: windows
34-
create_revision: f72efea43c3013323d1b95cff571f3c1caa37583
35-
base_revision: f72efea43c3013323d1b95cff571f3c1caa37583
34+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
35+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
3636

3737
# User provided section
3838

example/android/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +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
1212
**/*.keystore
1313
**/*.jks

example/android/app/build.gradle

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,44 @@
11
plugins {
22
id "com.android.application"
33
id "kotlin-android"
4+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
45
id "dev.flutter.flutter-gradle-plugin"
56
}
67

7-
def localProperties = new Properties()
8-
def localPropertiesFile = rootProject.file('local.properties')
9-
if (localPropertiesFile.exists()) {
10-
localPropertiesFile.withReader('UTF-8') { reader ->
11-
localProperties.load(reader)
12-
}
13-
}
14-
15-
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
16-
if (flutterVersionCode == null) {
17-
flutterVersionCode = '1'
18-
}
19-
20-
def flutterVersionName = localProperties.getProperty('flutter.versionName')
21-
if (flutterVersionName == null) {
22-
flutterVersionName = '1.0'
23-
}
24-
258
android {
26-
compileSdkVersion flutter.compileSdkVersion
27-
ndkVersion flutter.ndkVersion
9+
namespace = "com.example.example"
10+
compileSdk = flutter.compileSdkVersion
11+
ndkVersion = flutter.ndkVersion
2812

2913
compileOptions {
30-
sourceCompatibility JavaVersion.VERSION_1_8
31-
targetCompatibility JavaVersion.VERSION_1_8
14+
sourceCompatibility = JavaVersion.VERSION_1_8
15+
targetCompatibility = JavaVersion.VERSION_1_8
3216
}
3317

3418
kotlinOptions {
35-
jvmTarget = '1.8'
36-
}
37-
38-
sourceSets {
39-
main.java.srcDirs += 'src/main/kotlin'
19+
jvmTarget = JavaVersion.VERSION_1_8
4020
}
4121

4222
defaultConfig {
4323
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
44-
applicationId "com.example.example"
24+
applicationId = "com.example.example"
4525
// You can update the following values to match your application needs.
46-
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
47-
minSdkVersion flutter.minSdkVersion
48-
targetSdkVersion flutter.targetSdkVersion
49-
versionCode flutterVersionCode.toInteger()
50-
versionName flutterVersionName
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
5131
}
5232

5333
buildTypes {
5434
release {
5535
// TODO: Add your own signing config for the release build.
5636
// Signing with the debug keys for now, so `flutter run --release` works.
57-
signingConfig signingConfigs.debug
37+
signingConfig = signingConfigs.debug
5838
}
5939
}
6040
}
6141

6242
flutter {
63-
source '../..'
43+
source = "../.."
6444
}

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="com.example.example">
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: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.example">
3-
<application
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<application
43
android:label="example"
54
android:name="${applicationName}"
65
android:icon="@mipmap/ic_launcher">
76
<activity
87
android:name=".MainActivity"
98
android:exported="true"
109
android:launchMode="singleTop"
10+
android:taskAffinity=""
1111
android:theme="@style/LaunchTheme"
1212
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1313
android:hardwareAccelerated="true"
@@ -31,4 +31,15 @@
3131
android:name="flutterEmbedding"
3232
android:value="2" />
3333
</application>
34+
<!-- Required to query activities that can process text, see:
35+
https://developer.android.com/training/package-visibility and
36+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
37+
38+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
39+
<queries>
40+
<intent>
41+
<action android:name="android.intent.action.PROCESS_TEXT"/>
42+
<data android:mimeType="text/plain"/>
43+
</intent>
44+
</queries>
3445
</manifest>

example/android/app/src/main/kotlin/com/example/example/MainActivity.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ package com.example.example
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="com.example.example">
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/build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ allprojects {
55
}
66
}
77

8-
rootProject.buildDir = '../build'
8+
rootProject.buildDir = "../build"
99
subprojects {
1010
project.buildDir = "${rootProject.buildDir}/${project.name}"
11-
project.evaluationDependsOn(':app')
11+
}
12+
subprojects {
13+
project.evaluationDependsOn(":app")
1214
}
1315

1416
tasks.register("clean", Delete) {
1517
delete rootProject.buildDir
16-
}
18+
}

example/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
org.gradle.jvmargs=-Xmx1536M
1+
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
33
android.enableJetifier=true

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip

example/android/settings.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ pluginManagement {
1818

1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21-
id "com.android.application" version "7.3.0" apply false
22-
id "org.jetbrains.kotlin.android" version "1.9.0" apply false
21+
id "com.android.application" version "8.2.1" apply false
22+
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
2323
}
2424

25-
include ":app"
25+
include ":app"

example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>11.0</string>
24+
<string>12.0</string>
2525
</dict>
2626
</plist>

0 commit comments

Comments
 (0)