feat: initialize Android build configuration with custom Gradle settings and Flutter integration

This commit is contained in:
Ümit Tunç
2026-04-29 22:21:09 +03:00
parent 34c5b44ddf
commit 3755a07c25
3 changed files with 22 additions and 13 deletions
+9 -3
View File
@@ -11,12 +11,12 @@ android {
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "17"
jvmTarget = "1.8"
}
@@ -26,6 +26,12 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.truncgil.fastwatcher"
+11 -8
View File
@@ -12,18 +12,21 @@ val newBuildDir: Directory =
rootProject.layout.buildDirectory.value(newBuildDir)
subprojects {
val rootPath = rootProject.projectDir.absolutePath
if (project.projectDir.absolutePath.startsWith(rootPath.substring(0, 3))) {
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
project.layout.buildDirectory.value(newSubprojectBuildDir)
}
}
subprojects {
project.evaluationDependsOn(":app")
}
// Java ve Kotlin'i 1.8'e zorla
tasks.withType<JavaCompile>().configureEach {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
subprojects {
plugins.withId("org.jetbrains.kotlin.android") {
configure<org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension> {
jvmToolchain(17)
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile>().configureEach {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8)
}
}
}
Binary file not shown.