Skip to content

Commit 7286dd5

Browse files
committed
Modernize Android generated files
1 parent 9d40542 commit 7286dd5

File tree

12 files changed

+106
-118
lines changed

12 files changed

+106
-118
lines changed

android/app/build.gradle

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

android/app/build.gradle.kts

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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 = "io.kbl.superduper"
19+
compileSdk = 36
20+
ndkVersion = "27.0.12077973"
21+
22+
compileOptions {
23+
sourceCompatibility = JavaVersion.VERSION_11
24+
targetCompatibility = JavaVersion.VERSION_11
25+
}
26+
27+
kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() }
28+
29+
defaultConfig {
30+
applicationId = "io.kbl.superduper"
31+
// You can update the following values to match your application needs.
32+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
33+
minSdk = 29
34+
targetSdk = 36
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 { source = "../.." }

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="io.kbl.superduper">
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.

android/app/src/main/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="io.kbl.superduper">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
32
<uses-permission android:name="android.permission.INTERNET"/>
43
<uses-permission android:name="android.permission.BLUETOOTH"
54
android:maxSdkVersion="30" />

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="io.kbl.superduper">
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.

android/build.gradle

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

android/build.gradle.kts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
allprojects {
2+
repositories {
3+
google()
4+
mavenCentral()
5+
}
6+
}
7+
8+
val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get()
9+
rootProject.layout.buildDirectory.value(newBuildDir)
10+
11+
subprojects {
12+
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
13+
project.layout.buildDirectory.value(newSubprojectBuildDir)
14+
}
15+
subprojects {
16+
project.evaluationDependsOn(":app")
17+
}
18+
19+
tasks.register<Delete>("clean") {
20+
delete(rootProject.layout.buildDirectory)
21+
}

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=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
33
android.enableJetifier=true

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

android/settings.gradle

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

0 commit comments

Comments
 (0)