-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle.kts
123 lines (102 loc) · 3.98 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
import java.net.URL
// Configure project's dependencies
repositories {
mavenCentral()
intellijPlatform {
defaultRepositories()
}
}
plugins {
// Java support
id("java")
// Kotlin support
id("org.jetbrains.kotlin.jvm") version "2.1.0"
// gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
id("org.jetbrains.intellij.platform") version "2.2.1"
// id("org.jetbrains.intellij.platform.migration") version "2.0.0-beta7"
}
group = "com.emberjs"
version = "2024.3.5"
dependencies {
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("org.assertj:assertj-core:3.26.3")
testImplementation("org.junit.platform:junit-platform-launcher:1.11.4")
implementation(kotlin("test"))
implementation("org.codehaus.jettison:jettison:1.5.4")
// see https://www.jetbrains.com/intellij-repository/releases/
// and https://www.jetbrains.com/intellij-repository/snapshots/
// https://plugins.jetbrains.com/plugin/6884-handlebars-mustache/versions/stable
intellijPlatform {
plugins(listOf("com.dmarcotte.handlebars:243.21565.122"))
bundledPlugins(listOf("JavaScript", "com.intellij.css", "org.jetbrains.plugins.yaml", "com.intellij.modules.json"))
pluginVerifier()
zipSigner()
instrumentationTools()
testFramework(TestFrameworkType.Platform)
create(IntelliJPlatformType.IntellijIdeaUltimate, "2024.3")
}
}
java {
sourceCompatibility = JavaVersion.VERSION_17
}
// Configure gradle-intellij-plugin plugin.
// Read more: https://github.com/JetBrains/gradle-intellij-plugin
intellijPlatform {
pluginConfiguration {
name.set("EmberExperimental.js")
}
// Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
// Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
//
// com.dmarcotte.handlebars: see https://plugins.jetbrains.com/plugin/6884-handlebars-mustache/versions
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "17"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "17"
}
publishPlugin {
token.set(System.getenv("ORG_GRADLE_PROJECT_intellijPublishToken"))
}
}
tasks.buildSearchableOptions {
enabled = false
}
tasks.register("printVersion") {
doLast { println(version) }
}
tasks.register("updateChangelog") {
doLast {
var input = generateSequence(::readLine).joinToString("\n")
input = input.replace(":rocket:", "🚀")
input = input.replace(":bug:", "🐛")
input = input.replace(":documentation:", "📝")
input = input.replace(":breaking:", "💥")
input += "\nsee <a href=\"https://github.com/patricklx/intellij-emberjs-experimental/blob/main/CHANGELOG.md\">https://github.com/patricklx/intellij-emberjs-experimental/</a> for more"
val f = File("./src/main/resources/META-INF/plugin.xml")
var content = f.readText()
content = content.replace("CHANGELOG_PLACEHOLDER", input)
f.writeText(content)
}
}
tasks.register("listRecentReleased") {
doLast {
val text = URL("https://plugins.jetbrains.com/api/plugins/15499/updates?channel=&size=8").readText()
val obj = groovy.json.JsonSlurper().parseText(text)
val versions = (obj as ArrayList<Map<*,*>>).map { it.get("version") }
println(groovy.json.JsonBuilder(versions).toPrettyString())
}
}
tasks.register("verifyAlreadyReleased") {
doLast {
var input = generateSequence(::readLine).joinToString("\n")
val text = URL("https://plugins.jetbrains.com/api/plugins/15499/updates?channel=&size=100").readText()
val obj = groovy.json.JsonSlurper().parseText(text)
val versions = (obj as ArrayList<Map<*,*>>).map { it.get("version") }
println(versions.contains(input))
}
}