Skip to content

Commit

Permalink
Redo: set until-build to undefined value (#2658)
Browse files Browse the repository at this point in the history
Previously we unset until-build in DSL.
However, Intellij SDK Gradle plugin DSL
does not support setting only since-build,
while omitting until-build.

So we effectively made the plugin
compatible with a single version of Intellij.

This change fixes that by disabling patching
since-build/until-build from DSL and setting
since-build version directly in plugin.xml
  • Loading branch information
AlexeyTsvetkov authored Jan 23, 2023
1 parent 7b9642a commit 08c93ce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 1 addition & 5 deletions idea-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ intellij {
type.set(projectProperties.platformType)
version.set(projectProperties.platformVersion)
downloadSources.set(projectProperties.platformDownloadSources)
updateSinceUntilBuild.set(false)

plugins.set(
listOf(
Expand Down Expand Up @@ -55,10 +56,6 @@ tasks {
channels.set(projectProperties.pluginChannels)
}

patchPluginXml {
sinceBuild.set(projectProperties.pluginSinceBuild)
}

runPluginVerifier {
ideVersions.set(projectProperties.pluginVerifierIdeVersions)
}
Expand All @@ -70,7 +67,6 @@ class ProjectProperties(private val project: Project) {
val platformVersion get() = stringProperty("platform.version")
val platformDownloadSources get() = stringProperty("platform.download.sources").toBoolean()
val pluginChannels get() = listProperty("plugin.channels")
val pluginSinceBuild get() = stringProperty("plugin.since.build")
val pluginVerifierIdeVersions get() = listProperty("plugin.verifier.ide.versions")

private fun stringProperty(key: String): String =
Expand Down
4 changes: 2 additions & 2 deletions idea-plugin/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ kotlin.stdlib.default.dependency=false
deploy.version=0.1-SNAPSHOT

plugin.channels=snapshots
plugin.since.build=213
## See https://jb.gg/intellij-platform-builds-list for available build versions.
# Intellij since-build should be updated directly in src/main/resources/META-INF/plugin.xml
# See https://jb.gg/intellij-platform-builds-list for available build versions.
plugin.verifier.ide.versions=2021.3, 2022.1, 2022.2

platform.type=IC
Expand Down
3 changes: 3 additions & 0 deletions idea-plugin/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

</description>

<!-- until-build is omitted, so we don't have to update it after each Intellij release -->
<idea-version since-build="213"/>

<!-- Product and plugin compatibility requirements -->
<!-- https://plugins.jetbrains.com/docs/intellij/plugin-compatibility.html -->
<depends>com.intellij.modules.platform</depends>
Expand Down

0 comments on commit 08c93ce

Please sign in to comment.