File tree 3 files changed +15
-3
lines changed
content/docs/paper/dev/getting-started
3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,12 @@ import starlightLinksValidator from "starlight-links-validator";
6
6
import starlightSidebarTopics from "starlight-sidebar-topics" ;
7
7
import codeConstantsPlugin from "./src/utils/remark/code_const" ;
8
8
import javadocPlugin from "./src/utils/remark/javadoc" ;
9
- import { LATEST_MC_RELEASE , LATEST_PAPER_RELEASE , LATEST_VELOCITY_RELEASE } from "./src/utils/versions" ;
9
+ import {
10
+ LATEST_MC_RELEASE ,
11
+ LATEST_PAPER_RELEASE ,
12
+ LATEST_USERDEV_RELEASE ,
13
+ LATEST_VELOCITY_RELEASE ,
14
+ } from "./src/utils/versions" ;
10
15
11
16
const prod = process . env . NODE_ENV === "production" ;
12
17
@@ -408,6 +413,7 @@ export default defineConfig({
408
413
LATEST_MC_RELEASE ,
409
414
LATEST_PAPER_RELEASE ,
410
415
LATEST_VELOCITY_RELEASE ,
416
+ LATEST_USERDEV_RELEASE ,
411
417
} ,
412
418
} ,
413
419
] ,
Original file line number Diff line number Diff line change @@ -36,9 +36,9 @@ See [here](#1205-and-beyond) for more details.
36
36
## Adding the plugin
37
37
Add the plugin to your ` build.gradle.kts ` file.
38
38
39
- ``` kotlin title="build.gradle.kts"
39
+ ``` kts title="build.gradle.kts" replace
40
40
plugins {
41
- id(" io.papermc.paperweight.userdev" ) version " <latest version here, check https://plugins.gradle.org/plugin/io.papermc.paperweight.userdev> "
41
+ id(" io.papermc.paperweight.userdev" ) version " \{ LATEST_USERDEV_RELEASE} "
42
42
}
43
43
```
44
44
Original file line number Diff line number Diff line change @@ -35,3 +35,9 @@ export const LATEST_PAPER_RELEASE = paperProject.versions[paperProject.versions.
35
35
const velocityProject : Project = await fetch ( "https://api.papermc.io/v2/projects/velocity" ) . then ( ( r ) => r . json ( ) ) ;
36
36
37
37
export const LATEST_VELOCITY_RELEASE = velocityProject . versions [ velocityProject . versions . length - 1 ] ;
38
+
39
+ const userdevVersions : string [ ] = await fetch ( "https://api.github.com/repos/PaperMC/paperweight/tags" )
40
+ . then ( ( r ) => r . json ( ) )
41
+ . then ( ( json ) => json . map ( ( e ) => e . name . substring ( 1 ) ) ) ;
42
+
43
+ export const LATEST_USERDEV_RELEASE = userdevVersions [ 0 ] ;
You can’t perform that action at this time.
0 commit comments