mirror of
https://github.com/jlengrand/detekt.git
synced 2026-03-10 08:11:23 +00:00
Properly populate versions.properties (#3730)
This commit is contained in:
@@ -70,18 +70,19 @@ pluginBundle {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.processResources {
|
||||
filter<org.apache.tools.ant.filters.ReplaceTokens>(
|
||||
"tokens" to mapOf(
|
||||
"detektVersion" to project.version as String
|
||||
)
|
||||
)
|
||||
}
|
||||
tasks {
|
||||
val writeDetektVersionProperties by registering(WriteProperties::class) {
|
||||
description = "Write the properties file with the Detekt version to be used by the plugin"
|
||||
encoding = "UTF-8"
|
||||
outputFile = file("$buildDir/versions.properties")
|
||||
property("detektVersion", project.version)
|
||||
}
|
||||
|
||||
tasks.processTestResources {
|
||||
filter<org.apache.tools.ant.filters.ReplaceTokens>(
|
||||
"tokens" to mapOf(
|
||||
"detektVersion" to project.version as String
|
||||
)
|
||||
)
|
||||
processResources {
|
||||
from(writeDetektVersionProperties)
|
||||
}
|
||||
|
||||
processTestResources {
|
||||
from(writeDetektVersionProperties)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
detektVersion=@detektVersion@
|
||||
@@ -1 +0,0 @@
|
||||
detektVersion=@detektVersion@
|
||||
Reference in New Issue
Block a user