Skip to content

Commit bedb789

Browse files
committed
feat: apply jmp's suggestions
1 parent a160d49 commit bedb789

File tree

1 file changed

+13
-5
lines changed
  • src/content/docs/paper/dev/getting-started

1 file changed

+13
-5
lines changed

src/content/docs/paper/dev/getting-started/userdev.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,20 +86,28 @@ You should remove any dependency on the Paper API, as the dev bundle includes th
8686

8787
:::
8888

89-
:::note[Running userdev with a newer JDK]
89+
:::note[Configuring the Java toolchain for userdev setup]
9090

91-
A dev bundle might not support the JDK version Gradle is configured to use.
92-
If you are getting an error during the execution of `paperweightUserdevSetup`, you can try
93-
setting paperweight's `javaLauncher` property to a different Java version.
91+
A given dev bundle may not always support the Java toolchain Gradle is configured to use
92+
(whether configured explicitly or inherited from the Gradle runtime).
93+
If you are getting an error during the execution of `paperweightUserdevSetup` (especially patch application failures),
94+
you can try setting paperweight's `javaLauncher` property to a different Java version.
9495

96+
For example, with 1.17.1:
9597
```kts title="build.gradle.kts"
9698
paperweight {
9799
javaLauncher = javaToolchains.launcherFor {
98-
languageVersion = JavaLanguageVersion.of(21)
100+
// Example scenario:
101+
// Paper 1.17.1 was originally built with JDK 16 and the bundle
102+
// has not been updated to work with 21+ (but we want to compile with a 25 toolchain)
103+
languageVersion = JavaLanguageVersion.of(17)
99104
}
100105
}
101106
```
102107

108+
Among others, the [multi-project branch of the PaperMC/paperweight-test-plugin](https://github.com/PaperMC/paperweight-test-plugin/tree/multi-project)
109+
makes use of this feature.
110+
103111
:::
104112

105113
## Gradle tasks

0 commit comments

Comments
 (0)