GeezerVison is showing github.com — Load the publish, shadow and protobuf plugins in the root build script · jonoffcpu/jonoffcpu@48430cb
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: AGENTS.md +4Lines changed: 4 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -159,6 +159,10 @@ and exact-cookie matches rather than only checking process exit status. |
159 | 159 | correlator's names are the `OutputFiles` constants, and the agent derives |
160 | 160 | its manifest and default JFR from the stem of `correlationOutput` via |
161 | 161 | `ManifestStore.sibling`. Never spell an output name inline. |
| 162 | +- Declare every plugin version once, in the root build script, with |
| 163 | + `apply false` for the ones the subprojects apply. Gradle gives a subproject |
| 164 | + whose plugin set differs from its siblings' its own class loader, and the |
| 165 | + publish plugin's shared build service then cannot cross that boundary. |
162 | 166 | - Keep public configuration, manifest, capture stream, report, and CLI changes backward |
163 | 167 | compatible unless a format/version migration is designed and documented. |
164 | 168 | - Use supported public JDK JFR APIs in the correlator. Do not depend on |
|
Collapse file
Copy file name to clipboardExpand all lines: build.gradle.kts +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import com.diffplug.gradle.spotless.SpotlessExtension |
2 | 2 |
|
| 3 | +// Plugin versions live here, and the publish, shadow and protobuf plugins are loaded in the root |
| 4 | +// scope with `apply false` so that every subproject shares one instance of each. Declaring them in |
| 5 | +// the subprojects instead gives a module whose plugin set differs from its siblings' a class loader |
| 6 | +// of its own, and the publish plugin's shared build service then fails to cross that boundary. |
3 | 7 | plugins { |
4 | 8 | id("com.diffplug.spotless") version "8.10.2" |
| 9 | + id("com.vanniktech.maven.publish.base") version "0.37.0" apply false |
| 10 | + id("com.gradleup.shadow") version "9.6.1" apply false |
| 11 | + id("com.google.protobuf") version "0.10.0" apply false |
5 | 12 | } |
6 | 13 |
|
7 | 14 | repositories { |
|
Collapse file
Copy file name to clipboardExpand all lines: jonoffcpu-agent/build.gradle.kts +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,9 +12,9 @@ import org.gradle.jvm.toolchain.JvmVendorSpec |
12 | 12 | plugins { |
13 | 13 | `java-library` |
14 | 14 | // The base plugin: the full plugin would publish components["java"], but only the shaded JAR is published. |
15 | | - id("com.vanniktech.maven.publish.base") version "0.37.0" |
16 | | - id("com.gradleup.shadow") version "9.6.1" |
17 | | - id("com.google.protobuf") version "0.10.0" |
| 15 | + id("com.vanniktech.maven.publish.base") |
| 16 | + id("com.gradleup.shadow") |
| 17 | + id("com.google.protobuf") |
18 | 18 | } |
19 | 19 |
|
20 | 20 | group = "io.github.lhotari" |
|
Collapse file
Copy file name to clipboardExpand all lines: jonoffcpu-correlator/build.gradle.kts +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,9 +12,9 @@ import org.gradle.jvm.toolchain.JvmVendorSpec |
12 | 12 | plugins { |
13 | 13 | `java-library` |
14 | 14 | // The base plugin: the full plugin would publish components["java"], but only the shaded JAR is published. |
15 | | - id("com.vanniktech.maven.publish.base") version "0.37.0" |
16 | | - id("com.gradleup.shadow") version "9.6.1" |
17 | | - id("com.google.protobuf") version "0.10.0" |
| 15 | + id("com.vanniktech.maven.publish.base") |
| 16 | + id("com.gradleup.shadow") |
| 17 | + id("com.google.protobuf") |
18 | 18 | } |
19 | 19 |
|
20 | 20 | group = "io.github.lhotari" |
|
Collapse file
Copy file name to clipboardExpand all lines: jonoffcpu-jfr-converter/build.gradle.kts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -11,7 +11,7 @@ import org.gradle.jvm.toolchain.JvmVendorSpec |
11 | 11 | plugins { |
12 | 12 | `java-library` |
13 | 13 | // The base plugin: the build script registers the publication itself, as in the other modules. |
14 | | - id("com.vanniktech.maven.publish.base") version "0.37.0" |
| 14 | + id("com.vanniktech.maven.publish.base") |
15 | 15 | } |
16 | 16 |
|
17 | 17 | group = "io.github.lhotari" |
|