forked from WhiteVermouth/XcodeTheme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
76 lines (63 loc) · 2.16 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
67
68
69
70
71
72
73
74
75
76
import org.jetbrains.changelog.Changelog
import org.jetbrains.intellij.tasks.RunPluginVerifierTask
fun properties(key: String) = project.findProperty(key).toString()
plugins {
// Java support
id("java")
// Kotlin support
id("org.jetbrains.kotlin.jvm") version "1.8.21"
// Gradle IntelliJ Plugin
id("org.jetbrains.intellij") version "1.13.3"
// Gradle Changelog Plugin
id("org.jetbrains.changelog") version "2.0.0"
}
group = properties("pluginGroup")
version = properties("pluginVersion")
repositories {
mavenCentral()
}
kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(18))
}
}
intellij {
pluginName.set(properties("pluginName"))
version.set(properties("platformVersion"))
type.set(properties("platformType"))
updateSinceUntilBuild.set(false)
}
changelog {
version.set(properties("pluginVersion"))
path.set("${project.projectDir}/CHANGELOG.md")
groups.set(emptyList())
}
tasks {
buildSearchableOptions {
enabled = false
}
patchPluginXml {
version.set(properties("pluginVersion"))
val description = """
<div>
<p>Xcode Light & Dark themes for JetBrains</p>
<h2>Licence</h2>
<p>
<a href="https://raw.githubusercontent.com/WhiteVermouth/XcodeTheme/master/LICENSE">Apache-2.0 Licence</a>
</p>
<h2>Donation</h2>
<p>If you like this plugin, you can <a href="https://www.buymeacoffee.com/nszihan">buy me a cup of coffee</a>. Thank you!</p>
</div>
""".trimIndent()
pluginDescription.set(description)
changeNotes.set(provider { changelog.renderItem(changelog.getLatest(), Changelog.OutputType.HTML) })
}
runPluginVerifier {
ideVersions.set(properties("pluginVerifierIdeVersions").split(",").map(String::trim).filter(String::isNotEmpty))
failureLevel.set(listOf(RunPluginVerifierTask.FailureLevel.COMPATIBILITY_PROBLEMS, RunPluginVerifierTask.FailureLevel.INVALID_PLUGIN))
}
publishPlugin {
dependsOn("patchChangelog")
token.set(System.getProperty("jetbrains.token"))
}
}