-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
66 lines (52 loc) · 1.61 KB
/
build.gradle.kts
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
54
55
56
57
58
59
60
61
62
63
64
65
66
fun properties(key: String) = providers.gradleProperty(key)
fun environment(key: String) = providers.environmentVariable(key)
plugins {
// Kotlin support
kotlin("jvm") version "1.9.22"
// Gradle IntelliJ Plugin
id("org.jetbrains.intellij") version "1.17.0"
// Gradle Changelog Plugin
id("org.jetbrains.changelog") version "2.2.0"
}
group = properties("pluginGroup").get()
version = properties("pluginVersion").get()
repositories {
mavenCentral()
}
// Set the JVM language level used to build the project. Use Java 17 for 2022.2+.
kotlin {
jvmToolchain(17)
}
intellij {
pluginName.set(properties("pluginName"))
version.set(properties("platformVersion"))
type.set(properties("platformType"))
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
plugins.set(properties("platformPlugins").map { it.split(',').map(String::trim).filter(String::isNotEmpty) })
}
tasks {
wrapper {
gradleVersion = properties("gradleVersion").get()
}
patchPluginXml {
version.set(properties("pluginVersion"))
sinceBuild.set(properties("pluginSinceBuild"))
untilBuild.set(properties("pluginUntilBuild"))
}
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
}
}
}
dependencies {
compileOnly("org.apache.tuweni:tuweni-toml:2.3.1")
compileOnly(group = "org.ini4j", name = "ini4j", version = "0.5.4")
testImplementation(kotlin("test"))
}
sourceSets {
main {
java.srcDir("src")
resources.srcDir("resources")
}
}