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 ndkVersion = flutter.ndkVersion
compileOptions { compileOptions {
sourceCompatibility = JavaVersion.VERSION_17 sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_1_8
} }
kotlinOptions { kotlinOptions {
jvmTarget = "17" jvmTarget = "1.8"
} }
@@ -26,6 +26,12 @@ android {
defaultConfig { defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.truncgil.fastwatcher" applicationId = "com.truncgil.fastwatcher"
+13 -10
View File
@@ -12,18 +12,21 @@ val newBuildDir: Directory =
rootProject.layout.buildDirectory.value(newBuildDir) rootProject.layout.buildDirectory.value(newBuildDir)
subprojects { subprojects {
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) val rootPath = rootProject.projectDir.absolutePath
project.layout.buildDirectory.value(newSubprojectBuildDir) if (project.projectDir.absolutePath.startsWith(rootPath.substring(0, 3))) {
} val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
project.layout.buildDirectory.value(newSubprojectBuildDir)
}
subprojects { // Java ve Kotlin'i 1.8'e zorla
project.evaluationDependsOn(":app") tasks.withType<JavaCompile>().configureEach {
} sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
subprojects { tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile>().configureEach {
plugins.withId("org.jetbrains.kotlin.android") { compilerOptions {
configure<org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension> { jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8)
jvmToolchain(17)
} }
} }
} }
Binary file not shown.