Relocate toml lint task to buildSrc and extend against default task
Fixes build errors after Gradle 9.x upgrade Ref: https://docs.gradle.org/current/userguide/implementing_custom_tasks.html Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
parent
0a0f28e801
commit
b06b7c35ca
3 changed files with 35 additions and 12 deletions
|
|
@ -13,8 +13,6 @@ plugins {
|
|||
checkstyle
|
||||
}
|
||||
|
||||
apply(from = "check-dependencies.gradle.kts")
|
||||
|
||||
val gitWorkingBranch = providers.exec {
|
||||
commandLine("git", "rev-parse", "--abbrev-ref", "HEAD")
|
||||
}.standardOutput.asText.map { it.trim() }
|
||||
|
|
@ -173,6 +171,10 @@ tasks.register<JavaExec>("formatKtlint") {
|
|||
jvmArgs = listOf("--add-opens", "java.base/java.lang=ALL-UNNAMED")
|
||||
}
|
||||
|
||||
tasks.register<CheckDependenciesOrder>("checkDependenciesOrder") {
|
||||
tomlFile = layout.projectDirectory.file("../gradle/libs.versions.toml")
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
tasks.named("preDebugBuild").configure {
|
||||
if (!System.getProperties().containsKey("skipFormatKtlint")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue