filename_template/build.gradle.kts

72 lines
1.6 KiB
Plaintext

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
fun properties(key: String) = project.findProperty(key).toString()
plugins {
id("org.jetbrains.intellij") version "1.17.3"
id("org.jetbrains.kotlin.jvm") version "1.9.21"
}
group = properties("pluginGroup")
version = properties("pluginVersion")
repositories {
mavenCentral()
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
pluginName.set(properties("pluginName"))
version.set(properties("platformVersion"))
}
tasks {
// Set the JVM compatibility versions
properties("javaVersion").let {
withType<JavaCompile> {
sourceCompatibility = it
targetCompatibility = it
}
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = it
}
}
}
wrapper {
gradleVersion = properties("gradleVersion")
}
patchPluginXml {
changeNotes.set(
"""
<h3>[1.2]</h3>
<ul>
<li>Single New menu action to access filename template configurations</li>
<li>Simplify template configuration with placeholder auto completion</li>
<li>New templates are active by default</li>
<li>Combine name and description into title</li>
</ul>
<h3>[1.1]</h3>
<ul>
<li>Placeholders for: date, hostname, project name, username, sequential numbers, and caret position</li>
</ul>
<h3>[1.0]</h3>
<ul>
<li>Initial release</li>
</ul>
"""
)
}
publishPlugin {
token.set(System.getenv("PUBLISH_TOKEN"))
}
}