2024-08-24 16:42:44 +00:00
|
|
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
2024-01-22 04:02:41 +00:00
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
|
`kotlin-dsl`
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-17 05:31:44 +00:00
|
|
|
group = "org.mifospay.buildlogic"
|
2024-01-22 04:02:41 +00:00
|
|
|
|
2024-08-24 16:42:44 +00:00
|
|
|
// Configure the build-logic plugins to target JDK 19
|
2024-01-22 04:02:41 +00:00
|
|
|
// This matches the JDK used to build the project, and is not related to what is running on device.
|
|
|
|
|
java {
|
2025-08-28 19:44:50 +00:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_21
|
|
|
|
|
targetCompatibility = JavaVersion.VERSION_21
|
2024-01-22 04:02:41 +00:00
|
|
|
}
|
2024-08-24 16:42:44 +00:00
|
|
|
|
|
|
|
|
kotlin {
|
|
|
|
|
compilerOptions {
|
|
|
|
|
jvmTarget = JvmTarget.JVM_17
|
2024-01-22 04:02:41 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
compileOnly(libs.android.gradlePlugin)
|
|
|
|
|
compileOnly(libs.android.tools.common)
|
2024-08-24 16:42:44 +00:00
|
|
|
compileOnly(libs.compose.gradlePlugin)
|
2024-01-22 04:02:41 +00:00
|
|
|
compileOnly(libs.kotlin.gradlePlugin)
|
|
|
|
|
compileOnly(libs.ksp.gradlePlugin)
|
2024-09-04 16:37:34 +00:00
|
|
|
compileOnly(libs.detekt.gradlePlugin)
|
|
|
|
|
compileOnly(libs.ktlint.gradlePlugin)
|
|
|
|
|
compileOnly(libs.spotless.gradle)
|
2024-01-22 04:02:41 +00:00
|
|
|
implementation(libs.truth)
|
2025-07-29 15:50:16 +00:00
|
|
|
compileOnly(libs.firebase.crashlytics.gradlePlugin)
|
|
|
|
|
compileOnly(libs.firebase.performance.gradlePlugin)
|
2024-01-22 04:02:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks {
|
|
|
|
|
validatePlugins {
|
|
|
|
|
enableStricterValidation = true
|
|
|
|
|
failOnWarning = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gradlePlugin {
|
|
|
|
|
plugins {
|
2024-11-06 15:22:46 +00:00
|
|
|
// Android Plugins
|
2024-01-22 04:02:41 +00:00
|
|
|
register("androidApplicationCompose") {
|
|
|
|
|
id = "mifospay.android.application.compose"
|
|
|
|
|
implementationClass = "AndroidApplicationComposeConventionPlugin"
|
|
|
|
|
}
|
|
|
|
|
register("androidApplication") {
|
|
|
|
|
id = "mifospay.android.application"
|
|
|
|
|
implementationClass = "AndroidApplicationConventionPlugin"
|
|
|
|
|
}
|
2024-11-06 15:22:46 +00:00
|
|
|
|
2024-03-18 01:46:11 +00:00
|
|
|
register("androidFlavors") {
|
|
|
|
|
id = "mifospay.android.application.flavors"
|
|
|
|
|
implementationClass = "AndroidApplicationFlavorsConventionPlugin"
|
|
|
|
|
}
|
2024-11-06 15:22:46 +00:00
|
|
|
|
2025-07-29 15:50:16 +00:00
|
|
|
register("androidFirebase") {
|
|
|
|
|
id = "org.convention.android.application.firebase"
|
|
|
|
|
implementationClass = "AndroidApplicationFirebaseConventionPlugin"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
register("androidLint") {
|
|
|
|
|
id = "org.convention.android.application.lint"
|
|
|
|
|
implementationClass = "AndroidLintConventionPlugin"
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-06 15:22:46 +00:00
|
|
|
// KMP & CMP Plugins
|
|
|
|
|
register("cmpFeature") {
|
2025-07-29 15:50:16 +00:00
|
|
|
id = "org.convention.cmp.feature"
|
2024-11-06 15:22:46 +00:00
|
|
|
implementationClass = "CMPFeatureConventionPlugin"
|
2024-09-23 17:27:50 +00:00
|
|
|
}
|
2024-11-06 15:22:46 +00:00
|
|
|
|
|
|
|
|
register("kmpKoin") {
|
2025-07-29 15:50:16 +00:00
|
|
|
id = "org.convention.kmp.koin"
|
2024-11-06 15:22:46 +00:00
|
|
|
implementationClass = "KMPKoinConventionPlugin"
|
|
|
|
|
}
|
2025-07-29 15:50:16 +00:00
|
|
|
|
2024-11-06 15:22:46 +00:00
|
|
|
register("kmpLibrary") {
|
2025-07-29 15:50:16 +00:00
|
|
|
id = "org.convention.kmp.library"
|
2024-11-06 15:22:46 +00:00
|
|
|
implementationClass = "KMPLibraryConventionPlugin"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Static Analysis & Formatting Plugins
|
2024-09-04 16:37:34 +00:00
|
|
|
register("detekt") {
|
|
|
|
|
id = "mifos.detekt.plugin"
|
|
|
|
|
implementationClass = "MifosDetektConventionPlugin"
|
|
|
|
|
description = "Configures detekt for the project"
|
|
|
|
|
}
|
|
|
|
|
register("spotless") {
|
|
|
|
|
id = "mifos.spotless.plugin"
|
|
|
|
|
implementationClass = "MifosSpotlessConventionPlugin"
|
|
|
|
|
description = "Configures spotless for the project"
|
|
|
|
|
}
|
|
|
|
|
register("ktlint") {
|
|
|
|
|
id = "mifos.ktlint.plugin"
|
|
|
|
|
implementationClass = "MifosKtlintConventionPlugin"
|
|
|
|
|
description = "Configures kotlinter for the project"
|
|
|
|
|
}
|
|
|
|
|
register("gitHooks") {
|
|
|
|
|
id = "mifos.git.hooks"
|
|
|
|
|
implementationClass = "MifosGitHooksConventionPlugin"
|
|
|
|
|
description = "Installs git hooks for the project"
|
|
|
|
|
}
|
2024-01-22 04:02:41 +00:00
|
|
|
}
|
|
|
|
|
}
|