Get build properties from gradle.properties

This commit is contained in:
Matthias Gugel 2021-12-11 22:34:49 +01:00
parent 54731f658e
commit 379cf0ee16
2 changed files with 8 additions and 6 deletions

View File

@ -1,13 +1,12 @@
fun properties(key: String) = project.findProperty(key).toString()
plugins {
id("org.jetbrains.intellij") version "1.3.0"
id("org.jetbrains.kotlin.jvm") version "1.5.10"
}
val pluginVersion: String by project
val platformVersion: String by project
group = "de.idetools"
version = pluginVersion
group = properties("pluginGroup")
version = properties("pluginVersion")
repositories {
mavenCentral()
@ -19,7 +18,8 @@ dependencies {
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version.set(platformVersion)
pluginName.set(properties("pluginName"))
version.set(properties("platformVersion"))
}
tasks.getByName<org.jetbrains.intellij.tasks.PatchPluginXmlTask>("patchPluginXml") {
changeNotes.set("""

View File

@ -1,4 +1,6 @@
kotlin.code.style=official
pluginGroup = de.idetools
pluginName = filename_template
pluginVersion = 1.2.0-213
platformVersion = 2021.3