Skip to content

Commit 45ac297

Browse files
committed
Regenerate Example Build Files Flutter v3.24.0
1 parent 0304ba6 commit 45ac297

File tree

20 files changed

+210
-168
lines changed

20 files changed

+210
-168
lines changed

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: 19 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +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'
17-
}
18-
19-
def flutterVersionName = localProperties.getProperty('flutter.versionName')
20-
if (flutterVersionName == null) {
21-
flutterVersionName = '1.0'
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"
226
}
237

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 flutter.compileSdkVersion
30-
ndkVersion flutter.ndkVersion
9+
namespace = "com.codelessly.sdk.example"
10+
compileSdk = flutter.compileSdkVersion
11+
ndkVersion = flutter.ndkVersion
3112

3213
compileOptions {
33-
sourceCompatibility JavaVersion.VERSION_1_8
34-
targetCompatibility JavaVersion.VERSION_1_8
14+
sourceCompatibility = JavaVersion.VERSION_1_8
15+
targetCompatibility = JavaVersion.VERSION_1_8
3516
}
3617

3718
kotlinOptions {
38-
jvmTarget = '1.8'
39-
}
40-
41-
sourceSets {
42-
main.java.srcDirs += 'src/main/kotlin'
19+
jvmTarget = JavaVersion.VERSION_1_8
4320
}
4421

4522
defaultConfig {
4623
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
47-
applicationId "com.codelessly.sdk.example"
24+
applicationId = "com.codelessly.sdk.example"
4825
// You can update the following values to match your application needs.
49-
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
50-
minSdkVersion 19
51-
targetSdkVersion flutter.targetSdkVersion
52-
versionCode flutterVersionCode.toInteger()
53-
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
5431
}
5532

5633
buildTypes {
5734
release {
5835
// TODO: Add your own signing config for the release build.
5936
// Signing with the debug keys for now, so `flutter run --release` works.
60-
signingConfig signingConfigs.debug
37+
signingConfig = signingConfigs.debug
6138
}
6239
}
6340
}
6441

6542
flutter {
66-
source '../..'
67-
}
68-
69-
dependencies {
70-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
43+
source = "../.."
7144
}

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.
Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.example">
3-
4-
<uses-permission android:name="android.permission.INTERNET"/>
5-
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
62
<application
7-
android:label="example"
8-
android:name="${applicationName}"
9-
android:icon="@mipmap/ic_launcher">
3+
android:label="example"
4+
android:name="${applicationName}"
5+
android:icon="@mipmap/ic_launcher">
106
<activity
11-
android:name=".MainActivity"
12-
android:exported="true"
13-
android:launchMode="singleTop"
14-
android:theme="@style/LaunchTheme"
15-
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
16-
android:hardwareAccelerated="true"
17-
android:windowSoftInputMode="adjustResize">
7+
android:name=".MainActivity"
8+
android:exported="true"
9+
android:launchMode="singleTop"
10+
android:taskAffinity=""
11+
android:theme="@style/LaunchTheme"
12+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
13+
android:hardwareAccelerated="true"
14+
android:windowSoftInputMode="adjustResize">
1815
<!-- Specifies an Android theme to apply to this Activity as soon as
1916
the Android process has started. This theme is visible to the user
2017
while the Flutter UI initializes. After that, this theme continues
2118
to determine the Window background behind the Flutter UI. -->
2219
<meta-data
23-
android:name="io.flutter.embedding.android.NormalTheme"
24-
android:resource="@style/NormalTheme"
25-
/>
20+
android:name="io.flutter.embedding.android.NormalTheme"
21+
android:resource="@style/NormalTheme"
22+
/>
2623
<intent-filter>
2724
<action android:name="android.intent.action.MAIN"/>
2825
<category android:name="android.intent.category.LAUNCHER"/>
@@ -31,7 +28,18 @@
3128
<!-- Don't delete the meta-data below.
3229
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
3330
<meta-data
34-
android:name="flutterEmbedding"
35-
android:value="2"/>
31+
android:name="flutterEmbedding"
32+
android:value="2" />
3633
</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>
3745
</manifest>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.codelessly.sdk.example
2+
3+
import io.flutter.embedding.android.FlutterActivity
4+
5+
class MainActivity: FlutterActivity()

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

Lines changed: 0 additions & 6 deletions
This file was deleted.

example/android/app/src/main/res/drawable-v21/launch_background.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- Modify this file to customize your launch splash screen -->
33
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4-
<item android:drawable="?android:colorBackground"/>
4+
<item android:drawable="?android:colorBackground" />
55

66
<!-- You can insert your own image assets here -->
77
<!-- <item>

example/android/app/src/main/res/drawable/launch_background.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- Modify this file to customize your launch splash screen -->
33
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4-
<item android:drawable="@android:color/white"/>
4+
<item android:drawable="@android:color/white" />
55

66
<!-- You can insert your own image assets here -->
77
<!-- <item>

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: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,18 @@
1-
buildscript {
2-
ext.kotlin_version = '1.7.10'
3-
repositories {
4-
google()
5-
mavenCentral()
6-
}
7-
8-
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.2.0'
10-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11-
}
12-
}
13-
141
allprojects {
152
repositories {
163
google()
174
mavenCentral()
185
}
196
}
207

21-
rootProject.buildDir = '../build'
8+
rootProject.buildDir = "../build"
229
subprojects {
2310
project.buildDir = "${rootProject.buildDir}/${project.name}"
2411
}
2512
subprojects {
26-
project.evaluationDependsOn(':app')
13+
project.evaluationDependsOn(":app")
2714
}
2815

29-
task clean(type: Delete) {
16+
tasks.register("clean", Delete) {
3017
delete rootProject.buildDir
3118
}

0 commit comments

Comments
 (0)