如何解决Gradle Kotlin 插件 - 如何设置标签初始版本?
我知道这适用于不同项目的 build.gradle 文件:
scmVersion {
versionIncrementer 'incrementPatch'
tag {
initialVersion = { config,position -> '3.0.0' }
}
checks {
aheadOfRemote = false
uncommittedChanges = false
}
}
我现在正尝试用 Kotlin Axion 插件做同样的事情:
tasks {
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions {
languageVersion = "1.4"
}
}
test {
useJUnitPlatform()
// Always run tests,even when nothing changed.
setDependsOn(listOf("cleanTest"))
// Generate HTML reports.
reports {
html.isEnabled = true
}
// Show test results.
testLogging {
events = setOf(TestLogEvent.PASSED,TestLogEvent.SKIPPED,TestLogEvent.FAILED)
}
}
scmVersion {
versionIncrementer("incrementPrerelease")
checks(delegateClosureOf<ChecksConfig> {
aheadOfRemote = false
uncommittedChanges = false
})
}
...
我在将 XML 转换为 kotlinised 版本时遇到了一些问题,这是我尝试过的:
scmVersion {
versionIncrementer("incrementPrerelease")
tag(delegateClosureOf<> { initialVersion = '3.0.0' })
checks(delegateClosureOf<ChecksConfig> {
aheadOfRemote = false
uncommittedChanges = false
})
}
插件文档链接:https://axion-release-plugin.readthedocs.io/en/development/configuration/version.html
我的插件版本是'1.9.3'
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。