2024-04-12 21:53:55 +03:00
|
|
|
import org.jetbrains.gradle.ext.settings
|
|
|
|
import org.jetbrains.gradle.ext.taskTriggers
|
|
|
|
|
|
|
|
plugins {
|
2024-06-30 17:58:56 +03:00
|
|
|
id("com.android.application") version "8.5.0" apply false
|
|
|
|
id("com.android.library") version "8.5.0" apply false
|
2024-04-19 11:36:21 +03:00
|
|
|
id("org.jetbrains.kotlin.android") version "1.9.10" apply false
|
2024-04-12 21:53:55 +03:00
|
|
|
id("org.ec4j.editorconfig") version "0.1.0" apply false
|
2024-06-30 17:58:56 +03:00
|
|
|
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.8" apply true
|
2024-04-12 21:53:55 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// External project configuration start
|
|
|
|
|
|
|
|
// Configure and automatically generate AAR of the below mentioned external
|
|
|
|
// projects using a custom task in order to let Android Studio work properly.
|
|
|
|
// MUST BE RUN MANUALLY ON CLI COMPILATION
|
|
|
|
val externalProjects = listOf(
|
|
|
|
project(":external:calendar"),
|
|
|
|
project(":external:chips"),
|
|
|
|
project(":external:colorpicker"),
|
|
|
|
project(":external:timezonepicker")
|
|
|
|
)
|
|
|
|
|
|
|
|
configure(externalProjects) {
|
|
|
|
apply {
|
|
|
|
from("../configuration/common.gradle")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-19 11:36:21 +03:00
|
|
|
tasks.register("aarGen") {
|
2024-04-12 21:53:55 +03:00
|
|
|
description = "Generates AAR from the external projects for Etar-Calendar"
|
|
|
|
val aarTasks = arrayOf(
|
|
|
|
":external:calendar:copyAAR",
|
|
|
|
":external:chips:copyAAR",
|
|
|
|
":external:colorpicker:copyAAR",
|
|
|
|
":external:timezonepicker:copyAAR"
|
|
|
|
)
|
|
|
|
dependsOn(*aarTasks)
|
|
|
|
}
|
|
|
|
|
|
|
|
idea.project.settings {
|
|
|
|
taskTriggers {
|
2024-04-19 11:36:21 +03:00
|
|
|
afterSync(tasks.named("aarGen"))
|
2024-04-12 21:53:55 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// External project configuration end
|
2024-04-19 11:36:21 +03:00
|
|
|
tasks.register<Delete>("clean") {
|
|
|
|
delete(rootProject.layout.buildDirectory)
|
2024-04-12 21:53:55 +03:00
|
|
|
delete("app/libs")
|
|
|
|
}
|