File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
content/docs/paper/dev/getting-started Expand file tree Collapse file tree 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";
66import starlightSidebarTopics from "starlight-sidebar-topics" ;
77import codeConstantsPlugin from "./src/utils/remark/code_const" ;
88import 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" ;
1015
1116const prod = process . env . NODE_ENV === "production" ;
1217
@@ -408,6 +413,7 @@ export default defineConfig({
408413 LATEST_MC_RELEASE ,
409414 LATEST_PAPER_RELEASE ,
410415 LATEST_VELOCITY_RELEASE ,
416+ LATEST_USERDEV_RELEASE ,
411417 } ,
412418 } ,
413419 ] ,
Original file line number Diff line number Diff line change @@ -36,9 +36,9 @@ See [here](#1205-and-beyond) for more details.
3636## Adding the plugin
3737Add the plugin to your ` build.gradle.kts ` file.
3838
39- ``` kotlin title="build.gradle.kts"
39+ ``` kts title="build.gradle.kts" replace
4040plugins {
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} "
4242}
4343```
4444
Original file line number Diff line number Diff line change @@ -35,3 +35,9 @@ export const LATEST_PAPER_RELEASE = paperProject.versions[paperProject.versions.
3535const velocityProject : Project = await fetch ( "https://api.papermc.io/v2/projects/velocity" ) . then ( ( r ) => r . json ( ) ) ;
3636
3737export 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