We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0749d11 commit 91e3520Copy full SHA for 91e3520
gradle/templates/velocity/build.gradle.kts
@@ -47,12 +47,12 @@ tasks {
47
?.let { pluginFile ->
48
49
val fileContent = pluginFile.readLines().joinToString("\n")
50
- val pluginAnnotationRegex = Regex("@Plugin\\((.|\\s)*\\)", RegexOption.MULTILINE)
+ val pluginAnnotationRegex = Regex("@Plugin\\((.|\\s)*\\)\\s*class", RegexOption.MULTILINE)
51
52
pluginFile.writeText(
53
- fileContent.replace(
+ fileContent.replaceFirst(
54
pluginAnnotationRegex,
55
- "@Plugin(\n${pluginAnnotationContent()}\n)".trimMargin()
+ "@Plugin(\n${pluginAnnotationContent()}\n)\nclass".trimMargin()
56
)
57
58
}
0 commit comments