mirror of
https://github.com/openMF/mobile-wallet.git
synced 2026-02-06 09:37:24 +00:00
* Refactor: Applied Spotless & Detekt Compose Rules - :feature:accounts - :feature:auth - :feature:editpassword - :feature:finance * Refactor - [:feature:history] Applied Spotless & Detekt Compose Rules * Refactor - [:feature:home] Applied Spotless & Detekt Compose Rules * Refactor - [:feature:invoices] Applied Spotless & Detekt Compose Rules * Refactor - [:feature:kyc] Applied Spotless & Detekt Compose Rules * Refactor - [:feature:make-transfer] Applied Spotless & Detekt Compose Rules
100 lines
3.4 KiB
Plaintext
100 lines
3.4 KiB
Plaintext
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
buildscript {
|
|
dependencies {
|
|
classpath(libs.google.oss.licenses.plugin) {
|
|
exclude(group = "com.google.protobuf")
|
|
}
|
|
classpath(libs.spotless.gradle)
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
alias(libs.plugins.android.application) apply false
|
|
alias(libs.plugins.android.library) apply false
|
|
alias(libs.plugins.android.test) apply false
|
|
alias(libs.plugins.kotlin.jvm) apply false
|
|
alias(libs.plugins.kotlin.serialization) apply false
|
|
alias(libs.plugins.kotlin.parcelize) apply false
|
|
alias(libs.plugins.dependencyGuard) apply false
|
|
alias(libs.plugins.firebase.crashlytics) apply false
|
|
alias(libs.plugins.firebase.perf) apply false
|
|
alias(libs.plugins.gms) apply false
|
|
alias(libs.plugins.hilt) apply false
|
|
alias(libs.plugins.ksp) apply false
|
|
alias(libs.plugins.roborazzi) apply false
|
|
alias(libs.plugins.secrets) apply false
|
|
alias(libs.plugins.room) apply false
|
|
alias(libs.plugins.kotlin.android) apply false
|
|
alias(libs.plugins.detekt)
|
|
alias(libs.plugins.detekt.compiler)
|
|
// Plugin applied to allow module graph generation
|
|
alias(libs.plugins.module.graph) apply true
|
|
alias(libs.plugins.spotless)
|
|
}
|
|
|
|
val detektFormatting = libs.detekt.formatting
|
|
val twitterComposeRules = libs.twitter.detekt.compose
|
|
val ktlintVersion = "1.0.1"
|
|
|
|
val reportMerge by tasks.registering(io.gitlab.arturbosch.detekt.report.ReportMergeTask::class) {
|
|
output.set(rootProject.layout.buildDirectory.file("reports/detekt/merge.html")) // or "reports/detekt/merge.sarif"
|
|
}
|
|
|
|
subprojects {
|
|
apply {
|
|
plugin("io.gitlab.arturbosch.detekt")
|
|
plugin("com.diffplug.spotless")
|
|
}
|
|
|
|
tasks.withType<io.gitlab.arturbosch.detekt.Detekt>().configureEach {
|
|
config.from(rootProject.files("config/detekt/detekt.yml"))
|
|
reports.xml.required.set(true)
|
|
finalizedBy(reportMerge)
|
|
}
|
|
|
|
extensions.configure<com.diffplug.gradle.spotless.SpotlessExtension> {
|
|
kotlin {
|
|
target("**/*.kt")
|
|
targetExclude("**/build/**/*.kt")
|
|
ktlint(ktlintVersion).editorConfigOverride(
|
|
mapOf(
|
|
"android" to "true",
|
|
),
|
|
)
|
|
licenseHeaderFile(rootProject.file("spotless/copyright.kt"))
|
|
}
|
|
format("kts") {
|
|
target("**/*.kts")
|
|
targetExclude("**/build/**/*.kts")
|
|
// Look for the first line that doesn't have a block comment (assumed to be the license)
|
|
licenseHeaderFile(rootProject.file("spotless/copyright.kts"), "(^(?![\\/ ]\\*).*$)")
|
|
}
|
|
format("xml") {
|
|
target("**/*.xml")
|
|
targetExclude("**/build/**/*.xml")
|
|
// Look for the first XML tag that isn't a comment (<!--) or the xml declaration (<?xml)
|
|
licenseHeaderFile(rootProject.file("spotless/copyright.xml"), "(<[^!?])")
|
|
}
|
|
}
|
|
|
|
reportMerge {
|
|
input.from(tasks.withType<io.gitlab.arturbosch.detekt.Detekt>().map {
|
|
it.htmlReportFile }
|
|
)
|
|
}
|
|
|
|
dependencies {
|
|
detektPlugins(detektFormatting)
|
|
detektPlugins(twitterComposeRules)
|
|
}
|
|
}
|
|
|
|
// Task to print all the module paths in the project e.g. :core:data
|
|
// Used by module graph generator script
|
|
tasks.register("printModulePaths") {
|
|
subprojects {
|
|
if (subprojects.size == 0) {
|
|
println(this.path)
|
|
}
|
|
}
|
|
} |