Skip to content

Commit 3e1cd51

Browse files
migrate gradle files to Kotlin (#416)
1 parent 4e93855 commit 3e1cd51

File tree

6 files changed

+87
-121
lines changed

6 files changed

+87
-121
lines changed

android/app/build.gradle

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

android/app/build.gradle.kts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
plugins {
2+
id("com.android.application")
3+
id("kotlin-android")
4+
id("dev.flutter.flutter-gradle-plugin")
5+
}
6+
7+
android {
8+
namespace = "com.esri.arcgis_maps_sdk_flutter_samples"
9+
compileSdk = 36
10+
ndkVersion = "27.0.12077973"
11+
12+
compileOptions {
13+
sourceCompatibility = JavaVersion.VERSION_17
14+
targetCompatibility = JavaVersion.VERSION_17
15+
}
16+
17+
kotlinOptions {
18+
jvmTarget = JavaVersion.VERSION_17.toString()
19+
}
20+
21+
defaultConfig {
22+
applicationId = "com.esri.arcgis_maps_sdk_flutter_samples"
23+
minSdk = 28
24+
targetSdk = flutter.targetSdkVersion
25+
versionCode = flutter.versionCode
26+
versionName = flutter.versionName
27+
ndk {
28+
abiFilters += listOf("x86_64", "arm64-v8a")
29+
}
30+
}
31+
32+
buildTypes {
33+
release {
34+
signingConfig = signingConfigs.getByName("debug")
35+
}
36+
}
37+
}
38+
39+
flutter {
40+
source = "../.."
41+
}

android/build.gradle

Lines changed: 0 additions & 26 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/settings.gradle

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

android/settings.gradle.kts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
pluginManagement {
2+
val flutterSdkPath = run {
3+
val properties = java.util.Properties()
4+
file("local.properties").inputStream().use { properties.load(it) }
5+
val flutterSdkPath = properties.getProperty("flutter.sdk")
6+
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
7+
flutterSdkPath
8+
}
9+
10+
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
11+
12+
repositories {
13+
google()
14+
mavenCentral()
15+
gradlePluginPortal()
16+
}
17+
}
18+
19+
plugins {
20+
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
21+
id("com.android.application") version "8.9.1" apply false
22+
id("org.jetbrains.kotlin.android") version "2.2.0" apply false
23+
}
24+
25+
include(":app")

0 commit comments

Comments
 (0)