Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ checks prevent dependencies between the two adapters.

The OpenIDE build has its own output directory (`build/openide`) and ZIP name. It is excluded from the Gradle
`phpApis` fan-out; `release.yml` publishes it separately to the OpenIDE plugin store with `OPENIDE_PUBLISH_TOKEN`.
Each variant's `clean` preserves the other variant's output; the OpenIDE distribution is retained because the
platform plugin unpacks it during configuration.
Each variant's `clean` preserves the other variant's output. `ru.openide.platform` unpacks the OpenIDE distribution
into Gradle's shared transforms cache, outside `build/`.

`verifyPlugin` stages the resolved PHP plugin in a local dependency repository and checks it in offline mode.
This verifies the same dependency artifact used for compilation, without looking for it in JetBrains Marketplace.
Expand Down
19 changes: 3 additions & 16 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ val isOpenIde = phpApi == "openide"

fun apiProperty(name: String) = providers.gradleProperty("$name.$phpApi")

/** Where ru.openide.platform unpacks the OpenIDE distribution `openide(...)` asks for. */
val openIdeDistribution: Provider<Directory> =
apiProperty("platformVersion").flatMap { layout.buildDirectory.dir("tmp/openide/openIDE/$it") }

// Both implementations compile into the same packages of the core, so the OpenIDE variant gets a build directory of its
// own: sharing build/ would mix one variant's classes into the other's jar.
if (isOpenIde) {
Expand Down Expand Up @@ -178,7 +174,7 @@ intellijPlatform {
if (isOpenIde) {
// The recommended IDEs are the ones the JetBrains Marketplace lists for this plugin, and OpenIDE is not
// among them; verify against the OpenIDE distribution the variant is built with instead.
local(openIdeDistribution)
openide(apiProperty("platformVersion"))
} else {
recommended()
}
Expand Down Expand Up @@ -233,19 +229,10 @@ tasks {
}
}
clean {
// Each variant cleans its own output: a PhpStorm variant leaves build/openide alone. The OpenIDE variant spares
// the distribution ru.openide.platform unpacks into its build/tmp/openide while CONFIGURING, before `clean`
// runs — deleting it in `clean compileKotlin` would take away the classpath the compilation is about to use,
// and it is gigabytes to download and unpack again.
// Each variant cleans its own output: a PhpStorm variant leaves build/openide alone.
val buildDirectory = layout.buildDirectory.get().asFile
setDelete(provider {
buildDirectory.listFiles().orEmpty().flatMap { child ->
when {
isOpenIde && child.name == "tmp" -> child.listFiles().orEmpty().filter { it.name != "openide" }
!isOpenIde && child.name == "openide" -> emptyList()
else -> listOf(child)
}
}
buildDirectory.listFiles().orEmpty().filter { isOpenIde || it.name != "openide" }
})
}
if (isOpenIde) {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ changelog = "2.5.0"
intelliJPlatform = "2.20.1"
kotlin = "2.4.21"
kover = "0.9.11"
openidePlatform = "1.2.2"
openidePlatform = "1.3.1"
qodana = "2026.3.1"

[libraries]
Expand Down
Loading