diff --git a/build.gradle.kts b/build.gradle.kts index ba584be..b422de2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,15 +1,5 @@ plugins { alias(libs.plugins.kotlin.multiplatform) apply false - // 0.3.4-ONLY WORKAROUND (#194) — DELETE THIS LINE with the pluginManagement bump to 0.3.5. - // Declared here (never applied) purely to put the kplusplus plugin on the ROOT buildscript - // classpath next to the Kotlin plugin, so both resolve as ONE classpath. 0.3.4's plugin - // carried its ksrpc/ktor/coroutines runtime as ordinary dependencies, which a multi-project - // consumer resolves into a CHILD classloader while parent-first loading keeps serving the - // ROOT's older kotlinx-coroutines — `NoSuchMethodError: Job.invokeOnCompletion$default` - // before krapper is even started. 0.3.5 SHADES that runtime into the plugin jar (see - // compiler/gradle/build.gradle.kts), which is the actual fix; this line is only what keeps - // THIS repo building while it self-hosts one release behind, on 0.3.4. - id("com.monkopedia.kplusplus.compiler") apply false alias(libs.plugins.ktlint) } diff --git a/docs/getting-started.md b/docs/getting-started.md index dda101b..2d9930b 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -38,7 +38,7 @@ pluginManagement { ```kotlin plugins { kotlin("multiplatform") version "2.4.0" - id("com.monkopedia.kplusplus.compiler") version "0.3.4" + id("com.monkopedia.kplusplus.compiler") version "0.3.5" } repositories { @@ -47,13 +47,13 @@ repositories { ``` In a **multi-project** build, apply this in whichever project owns the bindings; the plugin -does not need to be declared at the root alongside the Kotlin plugin. (Under **0.3.4 only** it -did — the plugin's own runtime classes were shadowed by whatever the root buildscript +does not need to be declared at the root alongside the Kotlin plugin. (It did under **0.3.4 +only** — the plugin's own runtime classes were shadowed by whatever the root buildscript classloader owned, and the first `kplusplusSync` failed with -`NoSuchMethodError: Job.invokeOnCompletion$default`. Adding +`NoSuchMethodError: Job.invokeOnCompletion$default`. 0.3.5 shades that runtime into the plugin +jar, which is the real fix; if you are stuck on 0.3.4, adding `id("com.monkopedia.kplusplus.compiler") apply false` to the root `plugins { }` block works -around it on 0.3.4; upgrading is the real fix. See -[#194](https://github.com/Monkopedia/kplusplus/issues/194).) +around it. See [#194](https://github.com/Monkopedia/kplusplus/issues/194).) ## 2. Configure the binding diff --git a/samples/minimal/build.gradle.kts b/samples/minimal/build.gradle.kts index 584a3d4..44c97e0 100644 --- a/samples/minimal/build.gradle.kts +++ b/samples/minimal/build.gradle.kts @@ -26,7 +26,7 @@ plugins { // The kplusplus compiler subplugin, resolved from its published mavenLocal marker // (R2, #128) — no includeBuild. Everything kplusplus-specific lives in the narrow // `kplusplus { ... }` block at the bottom of this file. - id("com.monkopedia.kplusplus.compiler") version "0.3.4" + id("com.monkopedia.kplusplus.compiler") version "0.3.5" id("com.monkopedia.klinker.plugin") version "0.2.0" } diff --git a/samples/multiproject/README.md b/samples/multiproject/README.md index 0bf76a4..18e68a1 100644 --- a/samples/multiproject/README.md +++ b/samples/multiproject/README.md @@ -28,7 +28,9 @@ That is the entire test. What it binds does not matter. ## Run it -The plugin is resolved by coordinate (`mavenLocal()` first), so publish the build under test +The plugin is resolved by coordinate, `mavenLocal()` first. With an empty `mavenLocal` the pin +resolves the last **released** plugin, which is a useful post-release check that #194 is still +fixed in what actually shipped. To exercise the build *under test* instead, publish it locally first — the release local dry run, from the repo root: ```sh @@ -49,6 +51,4 @@ service channel to krapper, before any binding is generated. Compiling the gener (`../../gradlew :bindings:build`) exercises the rest, but is not what this sample is for. `:bindings:build` is step 4 of the release **local dry run** ([docs/releasing.md](../../docs/releasing.md)), -which is where this sample is exercised. It has no CI workflow of its own — unlike -`samples/minimal` it cannot run against the *released* plugin, since the plugin under test is -the point. +which is where this sample is exercised. It has no CI workflow of its own. diff --git a/samples/multiproject/bindings/build.gradle.kts b/samples/multiproject/bindings/build.gradle.kts index 15bb179..1e213f0 100644 --- a/samples/multiproject/bindings/build.gradle.kts +++ b/samples/multiproject/bindings/build.gradle.kts @@ -20,7 +20,7 @@ // this is a from-published consumer. plugins { kotlin("multiplatform") - id("com.monkopedia.kplusplus.compiler") version "0.3.4" + id("com.monkopedia.kplusplus.compiler") version "0.3.5" } repositories { diff --git a/settings.gradle.kts b/settings.gradle.kts index 6968cc0..adc8324 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -14,7 +14,7 @@ pluginManagement { // PLUGIN development happens in an example (samples/*) that includeBuilds compiler. Bump // this version on each release. plugins { - id("com.monkopedia.kplusplus.compiler") version "0.3.4" + id("com.monkopedia.kplusplus.compiler") version "0.3.5" } }