-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
53 lines (42 loc) · 1.41 KB
/
build.gradle.kts
File metadata and controls
53 lines (42 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@file:Suppress("ConvertLambdaToReference")
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
fun properties(key: String) = project.findProperty(key).toString()
plugins {
id("org.jetbrains.intellij") version "1.6.0"
kotlin("jvm") version "1.7.0-RC2"
}
group = "com.github.lppedd"
repositories {
mavenCentral()
}
intellij {
type.set(properties("platformType"))
version.set(properties("platformVersion"))
downloadSources.set(true)
pluginName.set("idea-conventional-commit-commitlint")
plugins.set(listOf("com.github.lppedd.idea-conventional-commit:0.21.0"))
}
dependencies {
implementation("org.json", "json", "20220320")
compileOnly(kotlin("stdlib-jdk8", "1.7.0-RC2"))
}
tasks {
val kotlinOptions: KotlinCompile.() -> Unit = {
kotlinOptions.jvmTarget = "11"
kotlinOptions.apiVersion = "1.5"
kotlinOptions.freeCompilerArgs += listOf(
"-Xno-param-assertions",
"-Xjvm-default=enable"
)
}
compileKotlin(kotlinOptions)
compileTestKotlin(kotlinOptions)
patchPluginXml {
version.set(project.version.toString())
sinceBuild.set(properties("pluginSinceBuild"))
untilBuild.set(properties("pluginUntilBuild"))
val projectPath = projectDir.path
pluginDescription.set((File("$projectPath/plugin-description.html").readText(Charsets.UTF_8)))
changeNotes.set((File("$projectPath/change-notes/${version.get().replace('.', '_')}.html").readText(Charsets.UTF_8)))
}
}