Elffuss BraidHub

kikocis/continue public

build: Add *-eap postfix to JetBrains Early Access releases (#6728)

Extra cleanup:
* Remove unused log4j dependency
  We don't have any dependency that uses it, so this dependency was unnecessarily added to the release.
* Remove explicit version in patchPluginXml
  The version is already retrieved from the project-level version / it was redundant.
* Remove commented-out publishPlugin.hidden + some noisy/redundant comments
  I removed the commented-out code which doesn't work anyway (the hidden field is not available in this version of the JetBrains Gradle plugin).

### Test

> ./gradlew buildPlugin
Outputs distributions/continue-intellij-extension-1.0.28.zip

> export RELEASE_CHANNEL=eap
> ./gradlew buildPlugin
Outputs distributions/continue-intellij-extension-1.0.28-eap.zip
Changeset2a19f9e1d9eaf8ca73e4a5a25432aedbafadfefec285dc378cc1e2d08349e928
AuthorJakub Błach <jakubblach@gmail.com> · 2025-07-21 23:12 +02:00
CommitterGitHub <noreply@github.com> · 2025-07-21 14:12 -07:00
Parents014c67783591

Browse the files at this changeset

1 file changed

modified extensions/intellij/build.gradle.kts +14 −39
@@ -9,6 +9,8 @@
99 }
1010
1111 val remoteRobotVersion = "0.11.23"
12+val isEap get() = environment("RELEASE_CHANNEL").orNull == "eap"
13+val pluginVersion = properties("pluginVersion").get()
1214
1315 plugins {
1416 id("java")
@@ -22,17 +24,13 @@
2224 }
2325
2426 group = properties("pluginGroup").get()
27+version = if (isEap) "$pluginVersion-eap" else pluginVersion
2528
26-version = properties("pluginVersion").get()
27-
28-// Configure project's dependencies
2929 repositories {
3030 mavenCentral()
3131 maven { url = uri("https://packages.jetbrains.team/maven/p/ij/intellij-dependencies") }
3232 }
3333
34-// Dependencies are managed with Gradle version catalog - read more:
35-// https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
3634 dependencies {
3735 implementation("com.squareup.okhttp3:okhttp:4.12.0") {
3836 exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib")
@@ -48,22 +46,6 @@
4846 testImplementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
4947 testImplementation("com.automation-remarks:video-recorder-junit5:2.0")
5048 testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")
51-
52-
53- // Exclude vulnerable Log4j from all dependencies
54- configurations.all {
55- resolutionStrategy {
56- eachDependency {
57- if (requested.group == "log4j" && requested.name == "log4j") {
58- useTarget("org.slf4j:log4j-over-slf4j:1.7.36")
59- }
60- }
61- }
62- }
63-
64- // Add Log4j 2.x explicitly
65- implementation("org.apache.logging.log4j:log4j-core:2.20.0")
66- implementation("org.apache.logging.log4j:log4j-api:2.20.0")
6749 testImplementation(kotlin("test"))
6850 }
6951
@@ -105,7 +87,7 @@
10587
10688 tasks {
10789 downloadRobotServerPlugin {
108- version.set(remoteRobotVersion)
90+ version = remoteRobotVersion
10991 }
11092
11193 prepareSandbox {
@@ -120,13 +102,14 @@
120102 prepareSandbox()
121103 }
122104
123- wrapper { gradleVersion = properties("gradleVersion").get() }
105+ wrapper {
106+ gradleVersion = properties("gradleVersion").get()
107+ }
124108
125109 patchPluginXml {
126- version.set(properties("pluginVersion"))
127- sinceBuild.set(properties("pluginSinceBuild"))
128- untilBuild.set(properties("pluginUntilBuild"))
129- pluginDescription.set(
110+ sinceBuild = properties("pluginSinceBuild")
111+ untilBuild = properties("pluginUntilBuild")
112+ pluginDescription =
130113 providers.fileContents(layout.projectDirectory.file("README.md")).asText.map {
131114 val start = "<!-- Plugin description -->"
132115 val end = "<!-- Plugin description end -->"
@@ -140,7 +123,6 @@
140123 subList(indexOf(start) + 1, indexOf(end)).joinToString("\n").let(::markdownToHTML)
141124 }
142125 }
143- )
144126 }
145127
146128 // Configure UI tests plugin
@@ -167,7 +149,7 @@
167149 // See ContinueExtensionSettingsService.kt for more info.
168150 // Currently commented out however since test fail in CI with this version
169151 // intellij {
170-// version.set("2024.1")
152+// version = "2024.1"
171153 // }
172154 }
173155
@@ -178,17 +160,10 @@
178160 }
179161
180162 publishPlugin {
181- // dependsOn("patchChangelog")
182163 token = environment("PUBLISH_TOKEN")
183- // The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release
184- // labels, like 2.1.7-alpha.3
185- // Specify pre-release label to publish the plugin in a custom Release Channel automatically.
186- // Read more:
187- // https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
188- channels.set(listOf(environment("RELEASE_CHANNEL").getOrElse("eap")))
189-
190- // We always hide the stable releases until a few days of EAP have proven them stable
191- // hidden = environment("RELEASE_CHANNEL").map { it == "stable" }.getOrElse(false)
164+
165+ val channel = if (isEap) "eap" else "default"
166+ channels = listOf(channel)
192167 }
193168
194169 runIde {