add 'Projects must be configuring' workaround script
This commit is contained in:
parent
b4f3fc87e5
commit
09b49ae21c
3 changed files with 37 additions and 3 deletions
31
kt52647.gradle.kts
Normal file
31
kt52647.gradle.kts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
|
||||
val projectsMustBeConfiguringBuster by tasks.registering {
|
||||
val buildFile = layout.projectDirectory.file("kt52647.gradle.kts").asFile
|
||||
doLast {
|
||||
logger.warn("Applying 'Projects must be configuring' workaround - https://youtrack.jetbrains.com/issue/KT-52647")
|
||||
|
||||
val newLines = buildFile.readText().lines().joinToString("\n") { line ->
|
||||
if (line.startsWith("// projects must be configuring buster")) {
|
||||
"// projects must be configuring buster ${System.currentTimeMillis()}"
|
||||
} else {
|
||||
line
|
||||
}
|
||||
}
|
||||
|
||||
buildFile.writeText(newLines)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
allprojects {
|
||||
tasks
|
||||
.matching { it.name != projectsMustBeConfiguringBuster.name }
|
||||
.configureEach {
|
||||
finalizedBy(projectsMustBeConfiguringBuster)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// projects must be configuring buster
|
||||
// ^ this line will be edited by projectsMustBeConfiguringBuster
|
||||
Loading…
Add table
Add a link
Reference in a new issue