Skip to content

Commit ec4e38a

Browse files
build: update android config
1 parent a84dd2e commit ec4e38a

File tree

5 files changed

+15
-28
lines changed

5 files changed

+15
-28
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: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,8 @@ plugins {
55
id "dev.flutter.flutter-gradle-plugin"
66
}
77

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

@@ -33,14 +15,19 @@ android {
3315
targetCompatibility = JavaVersion.VERSION_1_8
3416
}
3517

18+
kotlinOptions {
19+
jvmTarget = JavaVersion.VERSION_1_8
20+
}
21+
3622
defaultConfig {
37-
applicationId = "dev.danvickmiller.formbuildervalidators.example"
23+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
24+
applicationId = "com.example.example"
3825
// You can update the following values to match your application needs.
39-
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
26+
// For more information, see: https://flutter.dev/to/review-gradle-config.
4027
minSdk = flutter.minSdkVersion
4128
targetSdk = flutter.targetSdkVersion
42-
versionCode = flutterVersionCode.toInteger()
43-
versionName = flutterVersionName
29+
versionCode = flutter.versionCode
30+
versionName = flutter.versionName
4431
}
4532

4633
buildTypes {

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=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
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.6.3-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip

example/android/settings.gradle

Lines changed: 2 additions & 2 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.7.10" apply false
21+
id "com.android.application" version "8.1.0" apply false
22+
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
2323
}
2424

2525
include ":app"

0 commit comments

Comments
 (0)