Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
301 commits
Select commit Hold shift + click to select a range
253bad9
opt: speed up rebuild patches and a lot of more small tweaks
Toffikk Aug 12, 2025
3ed0675
Merge branch 'basepatches' into gradle-9-update
Toffikk Aug 12, 2025
55e4101
fix: revert part of the previous commit
Toffikk Aug 13, 2025
c994c1c
Merge branch 'basepatches' into gradle-9-update
Toffikk Aug 13, 2025
14c6f06
feat: update our diff library, removes the need for cleanup patches i…
Toffikk Aug 18, 2025
92d54d8
fix: update the group id for diffpatch in buildsrc
Toffikk Aug 18, 2025
0d3cba8
chore: continue development cycle
Toffikk Aug 18, 2025
0517441
Merge branch 'basepatches' into gradle-9-update
Toffikk Aug 18, 2025
41fa6b2
chore: cleanup after diff library update
Toffikk Aug 18, 2025
1926a10
major: Add patch generation from additional upstreams
Toffikk Aug 22, 2025
ed4cea3
fix: dont redact src/main/java
Toffikk Aug 23, 2025
c3ed623
refactor: move to patchGeneration {}
Toffikk Aug 23, 2025
da4d69d
make the outputted patches prettier :tm:
Toffikk Aug 23, 2025
e96a0c1
ATs and additional patches for patch gen
Toffikk Aug 23, 2025
58bde0b
also prepend // generated to .java sources
Toffikk Aug 23, 2025
d9fca52
qol: allow to auto move patches to their dirs
Toffikk Aug 23, 2025
3dd478c
chore: allow null outputDir when patchDirOutput is enabled
Toffikk Aug 23, 2025
741a3a1
fix: spotless and optionals
Toffikk Aug 23, 2025
a1d3456
fix: overwrite files by default in generateDevBundle
Toffikk Aug 24, 2025
19db55d
fix regression introduced by RepoConfig
Toffikk Aug 24, 2025
b6dca1a
fix: skip patch gen when repo is empty
Toffikk Aug 24, 2025
7d2e93b
chore: continue development cycle
Toffikk Aug 24, 2025
0cb27f1
refactor patch/source generation
Toffikk Aug 25, 2025
f846102
generate sources seperately
Toffikk Aug 25, 2025
5f3ac61
chore: continue development cycle
Toffikk Aug 25, 2025
3d83107
fix(regression): Only scan commit subjects for the wrong name
Toffikk Aug 27, 2025
b789294
Merge remote-tracking branch 'papermc/main' into basepatches
Toffikk Aug 28, 2025
c5ddcee
fix(patch apply): workaround https://github.com/PaperMC/paperweight/i…
Toffikk Sep 5, 2025
8d6966a
chore: improve gen tasks descriptions
Toffikk Sep 5, 2025
847a7da
Merge branch 'basepatches' into gradle-9-update
Toffikk Sep 5, 2025
42123b0
fixup
Toffikk Sep 5, 2025
2c86f50
chore: use our util
Toffikk Sep 5, 2025
964f3fa
Merge branch 'basepatches' into gradle-9-update
Toffikk Sep 5, 2025
e410b59
fix: revert unintentional change
Toffikk Sep 7, 2025
e6c0237
Merge branch 'basepatches' into gradle-9-update
Toffikk Sep 7, 2025
c094b6d
fix: revert unintentional change
Toffikk Sep 7, 2025
a1f2697
Merge branch 'basepatches' into gradle-9-update
Toffikk Sep 7, 2025
5020cb0
feat: Allow specifying additional mappings such as parchment to the s…
Toffikk Sep 18, 2025
3791d85
refactor additional mappings
Toffikk Sep 18, 2025
485a716
rename to javadoc mappings
Toffikk Sep 18, 2025
37a38e8
chore: cleanup
Toffikk Sep 18, 2025
38c3e1d
chore: adapt for new JST update
Toffikk Sep 19, 2025
963874e
Merge branch 'basepatches' into gradle-9-update
Toffikk Sep 21, 2025
87f5f69
Merge remote-tracking branch 'papermc/main' into basepatches
Toffikk Sep 21, 2025
afc8e73
only one config cache please
Toffikk Sep 21, 2025
a066374
eh? maybe bump gradle? lol
Toffikk Sep 21, 2025
9f995e1
feat: add a nice util to allow us to pass in configurations to javado…
Toffikk Sep 23, 2025
93bca52
chore: satisfy spotless
Toffikk Sep 23, 2025
dd03528
chore: continue development cycle
Toffikk Sep 23, 2025
aa2b78a
fix(dsl): change additionalAts to non-nullable type
Toffikk Sep 23, 2025
3e4b0e0
chore: properly rebrand to weaver in last places
Toffikk Sep 24, 2025
63b5494
fix: make javadoc mappings apply lazy
Toffikk Sep 25, 2025
8c51db5
chore: simplify some code
Toffikk Sep 25, 2025
89fb8fc
fix: revert to gradle 8.14 and bump version
Toffikk Sep 25, 2025
370b30c
Revert "fix: revert to gradle 8.14 and bump version"
Toffikk Sep 25, 2025
94807c3
fix: revert shadow bump, causes issues with generate mappings
Toffikk Sep 25, 2025
bff3b0f
chore: continue development cycle
Toffikk Sep 25, 2025
801ee28
fix(rebuilding): fail fast on missing tag and allow to rebuild base p…
Toffikk Sep 27, 2025
eb843c3
chore: setup release publishing
Toffikk Sep 27, 2025
69d250c
chore: Merge upstream changes
Toffikk Sep 27, 2025
77c94c3
release: Version 2.3.6
Toffikk Sep 27, 2025
d5df6e7
Merge remote-tracking branch 'papermc/main' into basepatches
Toffikk Sep 27, 2025
4df77d0
fix(tests): apply weaver in userdev test
Toffikk Sep 27, 2025
fd93041
chore: continue development cycle
Toffikk Sep 27, 2025
e51d6df
chore: correct release title
Toffikk Sep 27, 2025
bdaa471
chore: bump actions in workflows (this somehow got reverted?)
Toffikk Sep 27, 2025
e317c9a
feat: add a canvasDevBundle configuration to userdev
Toffikk Sep 28, 2025
05813c1
chore: minor corrections
Toffikk Sep 29, 2025
b57f40d
chore: switch out the patchedBase tag for basepatches
Toffikk Sep 29, 2025
4d95b1f
chore: remove no longer relevant comments
Toffikk Sep 29, 2025
0df75ff
chore: rename mapping to mappings
Toffikk Sep 29, 2025
1df6b33
feat: add canvas and folia upstream extensions
Toffikk Sep 29, 2025
40806ef
release: Version 2.3.7
Toffikk Sep 29, 2025
82d6f99
chore: continue development cycle
Toffikk Sep 29, 2025
0972e00
fix(forks): fix source apply when upstream has javadocs specified
Toffikk Sep 29, 2025
29bd829
fix(apply): only set the base for source apply on readOnly
Toffikk Sep 29, 2025
b00d6a0
chore: fixup commit name
Toffikk Sep 29, 2025
670e323
release: Release 2.3.8
Toffikk Sep 29, 2025
18a9cdd
chore: continue development cycle
Toffikk Sep 29, 2025
6df6302
fix: actually depend on the jd mappings
Toffikk Sep 29, 2025
97257cf
fix: revert some changes
Toffikk Sep 29, 2025
6640759
fix(deps): adapt shadow configuration for shadow 9.x and bump shadow …
Toffikk Sep 30, 2025
5bfc793
chore: remove unintentional indent
Toffikk Sep 30, 2025
a3cba07
Merge remote-tracking branch 'papermc/main' into basepatches
Toffikk Sep 30, 2025
7c4f62f
release: Version 2.3.9
Toffikk Sep 30, 2025
84bb7c4
chore: continue development cycle
Toffikk Sep 30, 2025
3c8c22b
fix: use proper duplicates strategy for shadow
Toffikk Sep 30, 2025
16c1865
chore: use providers in the publish config
Toffikk Sep 30, 2025
bc700a5
cleanup: remove unnecessary overload
Toffikk Oct 4, 2025
bf36e34
opt: reduce I/O ops during per-file patches rebuilding
Toffikk Oct 5, 2025
c22526b
Merge branch 'PaperMC:main' into basepatches
Toffikk Oct 10, 2025
c75ca9f
Merge remote-tracking branch 'papermc/main' into basepatches
Toffikk Oct 11, 2025
bbd967a
feat: Improve source generation from additional upstreams
Toffikk Oct 11, 2025
ad27490
misc changes related to generation
Toffikk Oct 14, 2025
1f30819
Merge branch 'PaperMC:main' into basepatches
Toffikk Oct 14, 2025
46332b2
fix: bring the publisher jar task name up to par with other bundling …
Toffikk Oct 19, 2025
208be34
Merge remote-tracking branch 'refs/remotes/origin/basepatches' into b…
Toffikk Oct 19, 2025
1ee539e
Merge branch 'PaperMC:main' into basepatches
Toffikk Oct 19, 2025
d553237
cleanup: rearrange diff
Toffikk Oct 19, 2025
54d937c
cleanup: rearrange diff
Toffikk Oct 19, 2025
8ba4363
Merge remote-tracking branch 'refs/remotes/aws/basepatches' into base…
Toffikk Oct 19, 2025
5f5c69e
Merge remote-tracking branch 'origin/basepatches' into basepatches
Toffikk Oct 19, 2025
925b010
fix: a git error snuck in
Toffikk Oct 19, 2025
f83895d
fix: resolve circular dependency errors
Toffikk Oct 19, 2025
ca0394f
chore: unify the rest of tasks with the recent setup change
Toffikk Oct 19, 2025
9801321
fix(feat): Unify the file patching classes, brings back fuzzy apply f…
Toffikk Oct 19, 2025
96aecd8
fix: undo the accidental behaviour change introduced by the previous …
Toffikk Oct 19, 2025
458f8ea
fix(tests/logic): cleanup classes and fix some logic
Toffikk Oct 21, 2025
c9d9481
[ci-skip] move some hunks around and adjust path sensitivity
Toffikk Oct 21, 2025
23deafb
chore: remove unnecessary rebuild safeguards
Toffikk Oct 22, 2025
5051d8d
release: Version 2.3.10
Toffikk Oct 22, 2025
1121ea3
chore: continue development cycle
Toffikk Oct 22, 2025
3abf78a
Merge remote-tracking branch 'papermc/main' into basepatches
Toffikk Nov 8, 2025
f94f26e
fix(deps): update diffpatch to v2.1.0.42
Toffikk Nov 8, 2025
2479ee2
chore: rename the internal javadoc apply task for naming parity
Toffikk Nov 9, 2025
b611eed
chore: use the built in github repo secret for release deployments
Toffikk Nov 9, 2025
8bd560e
chore: move commit validation to an util
Toffikk Nov 9, 2025
a9707a4
Merge remote-tracking branch 'papermc/main' into basepatches
Toffikk Nov 27, 2025
f2435ea
feat: hooks
Toffikk Nov 30, 2025
0495787
fix: improve horizon hooks
Toffikk Dec 1, 2025
cad8e8a
Merge remote-tracking branch 'papermc/main' into basepatches
Toffikk Dec 1, 2025
94a549e
Merge branch 'PaperMC:main' into basepatches
Toffikk Dec 10, 2025
811ee1a
chore: fix checkstyle plugin application test
Toffikk Dec 10, 2025
e927d29
chore: change checkstyle plugin coordinates
Toffikk Dec 10, 2025
e7e32c7
chore: update plugin coords for source generator too
Toffikk Dec 10, 2025
84e7ebf
feat: scan AT file for library imports
Toffikk Dec 18, 2025
b61752e
Merge remote-tracking branch 'origin/basepatches' into basepatches
Toffikk Dec 18, 2025
1c7ec86
Version 2.3.11
Toffikk Dec 18, 2025
daae456
chore: continue development cycle
Toffikk Dec 18, 2025
ef688aa
feat: Support patch roulette and old repo fetching for forks through …
Toffikk Dec 18, 2025
5728dfc
fix: only call get on fork name if we're a fork
Toffikk Dec 18, 2025
793086a
fix: resolve deprecation warnings in SetupForkMinecraftSources
Toffikk Dec 18, 2025
955be4b
fix: allow rebuilding base patches after conflict resolution
Toffikk Dec 20, 2025
b976b0f
fix: resolve mismatch between old commit property reads
Toffikk Dec 20, 2025
4047414
fix: generate objects from the full history for 3-way apply
Toffikk Dec 20, 2025
492b869
Revert "fix: generate objects from the full history for 3-way apply"
Toffikk Dec 21, 2025
0fccb5a
feat: Auto AT file discovery for non-minecraft sources
Toffikk Jan 3, 2026
5585763
Version 2.3.12
Toffikk Jan 3, 2026
2b72ef0
chore: continue development cycle
Toffikk Jan 3, 2026
6589bfe
chore!: rip out javadoc mappings logic and break on unseperated ATs
Toffikk Jan 4, 2026
faaf36d
fix(tasks): missed this `dependsOn` when renaming base feature patche…
Toffikk Jan 4, 2026
fa92775
chore: revert to using paper's jst
Toffikk Jan 4, 2026
b256880
fix(git-utils): respect the ignoreErr boolean
Toffikk Jan 5, 2026
5c4220c
chore(cleanup): correct a comment and remove an unnecessary @get:Opti…
Toffikk Jan 5, 2026
b79361c
fix(tasks): derive fork name from ForkConfig instead of rootProject.n…
Toffikk Jan 5, 2026
bc3e792
chore: update workflow for new branch
Toffikk Jan 17, 2026
c156df8
feat: expose configuration to fail on invalid ATs, closes #344
Toffikk Jan 25, 2026
adf6f62
fix: provide a default
Toffikk Jan 25, 2026
c635f8e
fix: don't default to false, always require it to be set
Toffikk Jan 25, 2026
f57c586
Merge remote-tracking branch 'origin/feat/fail-on-invalid-ats'
Toffikk Jan 25, 2026
456e779
fix: mark validateAts as optional
Toffikk Jan 25, 2026
69ec219
Merge remote-tracking branch 'origin/feat/fail-on-invalid-ats'
Toffikk Jan 25, 2026
4dcfc63
fix: specify the validateAts property for weaver specific tasks
Toffikk Jan 25, 2026
3665104
feat: allow for specifying ATs for upstream sources
Toffikk Jan 25, 2026
3b474df
fix: bring up-to-par with paperweight pr impl
Toffikk Jan 26, 2026
55d76c0
chore: remove unnecessary this@PatchingTasks specifier
Toffikk Jan 26, 2026
3e49a66
fix: dont cast patcher ext to core ext
Toffikk Jan 26, 2026
3ddbc21
chore: cleanup tagging logic
Toffikk Jan 27, 2026
d9aac74
Merge branch 'feat/ats-for-upstream-sources'
Toffikk Jan 27, 2026
2043efc
fix: provide compile classpath for JST
Toffikk Feb 3, 2026
93077cb
chore: indent
Toffikk Feb 3, 2026
c8e472c
fix: provide the classpaths of subprojects
Toffikk Feb 3, 2026
f93aa30
fix: append the mache minecraft jar to JST's classpath
Toffikk Feb 3, 2026
04de79a
format
Toffikk Feb 3, 2026
e5e4e5b
fix(normal AT logic/paperweight issue): append compile classpath for …
Toffikk Feb 3, 2026
81c66ef
Revert "fix(normal AT logic/paperweight issue): append compile classp…
Toffikk Feb 3, 2026
42182b2
chore: capitalise ATs
Toffikk Feb 11, 2026
e47ecfd
Merge branch 'feat/fail-on-invalid-ats'
Toffikk Feb 11, 2026
f65f51b
chore: cleanup impl
Toffikk Feb 24, 2026
6796334
fix: resolve gradle errors while running upstream setup
Toffikk Feb 24, 2026
92ab00a
fix: workaround the latest review
Toffikk Feb 24, 2026
8f6c384
chore: format
Toffikk Feb 24, 2026
d633868
Support for 26.1+ (#2)
Toffikk Mar 18, 2026
79f32cd
chore: fix tests
Toffikk Mar 18, 2026
c025e22
if paper has these disabled and they don't feel like updating those, …
Toffikk Mar 18, 2026
9798134
Merge remote-tracking branch 'papermc/main'
Toffikk Mar 22, 2026
bda157f
chore: bump diffpatch to v2.1.0.43
Toffikk Mar 22, 2026
303f9d4
Merge remote-tracking branch 'papermc/main'
Toffikk Apr 3, 2026
1b9b739
chore!: rip out publisher jar logic
Toffikk Apr 3, 2026
4c8771d
Merge branch 'PaperMC:main' into main
Toffikk Apr 3, 2026
103de06
Version 2.4.0
Toffikk Apr 3, 2026
cf8c21c
Merge remote-tracking branch 'papermc/main'
Toffikk Apr 8, 2026
bf79921
chore: continue development cycle
Toffikk Apr 8, 2026
3774747
chore: mark emitRejects as deprecated for removal
Toffikk Apr 9, 2026
6e079f7
BREAKING: Rework the old fork commit logic
Toffikk Apr 23, 2026
33a250c
fix: guard against setting up old fork in upstream's setup
Toffikk Apr 24, 2026
188bb7a
feat/fix: declare a dependency bridge plugin to allow resolving api p…
Toffikk Apr 24, 2026
30c1f57
chore: remove unused property
Toffikk Apr 24, 2026
581f8a5
Provide a more comprehensive classpath for MC AT application to decre…
Toffikk Apr 24, 2026
92e9d53
Version 2.4.1
Toffikk Apr 24, 2026
c5166bb
chore: continue development cycle
Toffikk Apr 24, 2026
e0c8b65
feat: enable AT validation by default
Toffikk Apr 24, 2026
4afa4ad
fix task naming in patch roulette
Toffikk Apr 25, 2026
2c2ed44
fix: dont trigger compileJava for the API subproject
Toffikk Apr 25, 2026
a1fb1d2
another shot at fixing the dep bridge
Toffikk Apr 25, 2026
e4f4d7b
fix: don't fail on clean run
Toffikk Apr 25, 2026
f294cc7
actually fix
Toffikk Apr 25, 2026
21f8fe1
some things
Toffikk Apr 25, 2026
02f70c2
Dirty workaround for upstream ATs
Toffikk Apr 28, 2026
59d3b81
Revert patcher change
Toffikk Apr 30, 2026
f790946
Version 2.4.2
Toffikk Apr 30, 2026
95511f0
chore: continue development cycle
Toffikk Apr 30, 2026
d96aa24
chore: resolve dev bundles from the canvasmc public maven repository
Toffikk Apr 30, 2026
5cef661
Version 2.4.3
Toffikk May 1, 2026
5dde1a3
chore: continue development cycle
Toffikk May 4, 2026
4532e6d
fix: make the patch output flow match paperweight in order to resolve…
Toffikk May 4, 2026
0aec6f7
fix: detach the rebuild worktree
Toffikk May 7, 2026
deaf030
feat: add a base patch fixup task
Toffikk May 15, 2026
8e7ad56
fix: allow fixing base patches up without a file commit
Toffikk May 15, 2026
8af0bf0
feat: allow specifying commit descriptions too
Toffikk May 15, 2026
031f88f
feat: allow for fixing up already existing base patches
Toffikk May 15, 2026
f03c6a5
feat: allow fixup to work with failed applies
Toffikk May 16, 2026
5e31871
chore: rename the base patches fixup task
Toffikk May 16, 2026
6a6741c
feat: add a fixup feature patches task
Toffikk May 16, 2026
3f691dd
Merge branch 'feat/fixup-feature-patches'
Toffikk May 16, 2026
aef80be
Use gradle's lifecycle logger wherever applicable
Toffikk May 16, 2026
0f72aee
Merge branch 'fix/use-gradle-logger-for-ats'
Toffikk May 16, 2026
1457ded
chore: remove debug log line
Toffikk May 16, 2026
b5701a6
use int min value
Toffikk May 16, 2026
ecdd01f
fix: set correct upstreams for fixup tasks
Toffikk May 17, 2026
c5f601c
fix: properly retag in base fixups
Toffikk May 17, 2026
c6d7566
fix: resolve CreateBasePatch task creation issue
Toffikk May 18, 2026
c0f5cda
try to fix tests
Toffikk May 18, 2026
488c654
chore: correct the dependency notation in libs.versions.toml
Toffikk May 18, 2026
59235d2
Version 2.4.4
Toffikk May 18, 2026
5cbd118
feat(rebuild): Detach rebuild tasks from the apply process and remove…
Toffikk Jun 10, 2026
6b3a12c
fix(userdev): Inject Canvas releases maven repo explicitly to fix iss…
Toffikk Jun 10, 2026
378818d
chore: spotless
Toffikk Jun 10, 2026
a98bf40
fix(patcher): make compatible with Gradle 9.5.0
Toffikk Jun 10, 2026
bdcb4b1
Version 2.4.5
Toffikk Jun 10, 2026
20c0299
chore: continue development cycle
Toffikk Jun 11, 2026
f47d0b0
chore: move commit logic to util
Toffikk Jun 11, 2026
125bab0
feat: support patch roulette for upstream sources
Toffikk Jul 5, 2026
6607eea
chore: fix tests
Toffikk Jul 5, 2026
b386deb
chore: use gradle 9.3.1
Toffikk Jul 5, 2026
62dcc60
fix(rebuild): use git mutation lock service for resource patches rebu…
Toffikk Jul 5, 2026
72a8597
Merge remote-tracking branch 'papermc/main'
Toffikk Sep 16, 2026
d7d9f1a
Bump to 2.5.0-SNAPSHOT
Toffikk Sep 17, 2026
17f36df
Isolated Projects support
Toffikk Sep 17, 2026
2e33c41
Backport fix
Toffikk Sep 20, 2026
b22cf13
backport more changes from the PR branch
Toffikk Sep 20, 2026
fcc1350
[backport] Fix kotlin compiler deprecation warning
Toffikk Sep 20, 2026
ae52d51
Merge remote-tracking branch 'papermc/main'
Toffikk Sep 20, 2026
ca54b54
Version 2.4.6
Toffikk Sep 20, 2026
f150ba9
Version 2.5.0
Toffikk Sep 20, 2026
86be7d9
Fix cleanCache for IP
Toffikk Sep 20, 2026
ad3353d
Version 2.5.1
Toffikk Sep 20, 2026
ff41211
Register download service in the relevant project
Toffikk Sep 20, 2026
9f234c8
Merge remote-tracking branch 'papermc/main'
Toffikk Sep 26, 2026
08737cf
chore: fix bad merge
Toffikk Sep 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 7 additions & 17 deletions .github/workflows/deploy-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,15 @@ on:
jobs:
deploy:
name: Deploy Snapshot
runs-on: namespace-profile-linux-default
runs-on: 'ubuntu-latest'
steps:
- uses: namespacelabs/nscloud-checkout-action@v9
- uses: actions/setup-java@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21
cache: "" # namespace handles this
- name: Set up cache
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: gradle
- name: Setup gradle build cache
run: |
nsc cache gradle setup --init-gradle /tmp/init.gradle
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
with:
cache-disabled: true # namespace handles this
- name: Get project version
id: get_version
shell: bash
Expand All @@ -39,7 +29,7 @@ jobs:
echo version=$project_version >> $GITHUB_OUTPUT
- name: Deploy snapshot version
if: endsWith(steps.get_version.outputs.version, '-SNAPSHOT')
run: ./gradlew --init-script=/tmp/init.gradle -Dorg.gradle.parallel=true publish --no-daemon --stacktrace -Dorg.gradle.internal.http.socketTimeout=90000 -Dorg.gradle.internal.http.connectionTimeout=90000
run: ./gradlew -Dorg.gradle.parallel=true publishAllPublicationsToCanvasMC_SnapshotsRepository --no-daemon --stacktrace -Dorg.gradle.internal.http.socketTimeout=90000 -Dorg.gradle.internal.http.connectionTimeout=90000
env:
ORG_GRADLE_PROJECT_paperUsername: ${{ secrets.ARTIFACTORY_USERNAME }}
ORG_GRADLE_PROJECT_paperPassword: ${{ secrets.ARTIFACTORY_PASSWORD }}
PUBLISH_USER: ${{ secrets.PUBLISH_USER }}
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
28 changes: 9 additions & 19 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,25 @@ on:
jobs:
deploy:
name: Deploy
runs-on: namespace-profile-linux-default
runs-on: 'ubuntu-latest'
steps:
- uses: namespacelabs/nscloud-checkout-action@v9
- uses: actions/setup-java@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21
cache: "" # namespace handles this
- name: Set up cache
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: gradle
- name: Setup gradle build cache
run: |
nsc cache gradle setup --init-gradle /tmp/init.gradle
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
with:
cache-disabled: true # namespace handles this
- name: Deploy release
run: ./gradlew --init-script=/tmp/init.gradle publishPlugins --no-daemon --stacktrace
run: ./gradlew publishAllPublicationsToCanvasMC_ReleasesRepository --no-daemon --stacktrace
env:
GRADLE_PUBLISH_KEY: "${{ secrets.GRADLE_PLUGIN_PORTAL_KEY }}"
GRADLE_PUBLISH_SECRET: "${{ secrets.GRADLE_PLUGIN_PORTAL_SECRET }}"
PUBLISH_USER: ${{ secrets.PUBLISH_USER }}
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
- name: Parse tag
id: vars
run: echo "tag=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Create release and changelog
uses: MC-Machinations/auto-release-changelog@v1.1.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: paperweight ${{ steps.vars.outputs.tag }}
title: weaver ${{ steps.vars.outputs.tag }}
20 changes: 5 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,20 @@ jobs:
# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
name: Test
runs-on: namespace-profile-linux-default
runs-on: 'ubuntu-latest'
steps:
- uses: namespacelabs/nscloud-checkout-action@v9
- uses: actions/setup-java@v6
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21
cache: "" # namespace handles this
- name: Set up cache
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: gradle
- name: Setup gradle build cache
run: |
nsc cache gradle setup --init-gradle /tmp/init.gradle
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
with:
cache-disabled: true # namespace handles this
- name: Execute Gradle build
run: |
git config --global user.email "no-reply@github.com"
git config --global user.name "GitHub Actions"
./gradlew --init-script=/tmp/init.gradle build --no-daemon --stacktrace
./gradlew build --no-daemon --stacktrace
- name: Publish Test Report
uses: mikepenz/action-junit-report@v6
if: always()
Expand Down
28 changes: 28 additions & 0 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
plugins {
`kotlin-dsl`
}

repositories {
mavenCentral()
gradlePluginPortal()
}

dependencies {
implementation(libs.gradle.ktlint)
implementation(libs.gradle.level.headered)
implementation(libs.gradle.shadow)
implementation(libs.gradle.kotlin.dsl)
implementation(kotlin("gradle-plugin", embeddedKotlinVersion))
implementation(libs.gradle.plugin.publish)

/*
constraints {
// spotless carries 1.9.10 and kotlin-dsl plugin has a strictly 2.4.0 constraint
implementation("org.jetbrains.kotlin:kotlin-stdlib") {
version {
strictly(embeddedKotlinVersion)
}
}
}
*/
}
13 changes: 13 additions & 0 deletions build-logic/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
}

dependencyResolutionManagement {
versionCatalogs {
register("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
}

rootProject.name = "build-logic"
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import net.octyl.levelheadered.HeaderApplyTask
import net.octyl.levelheadered.HeaderVerifyTask
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.dsl.JvmDefaultMode
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
Expand All @@ -25,14 +26,15 @@ kotlin {
}
compilerOptions {
jvmTarget = JvmTarget.JVM_21
freeCompilerArgs = listOf("-Xjvm-default=all", "-Xjdk-release=21")
jvmDefault = JvmDefaultMode.NO_COMPATIBILITY
freeCompilerArgs = listOf("-Xjdk-release=21")
}
}

repositories {
maven("https://repo.papermc.io/repository/maven-public/") {
mavenContent {
includeGroup("codechicken")
includeGroup("io.codechicken")
includeGroup("net.fabricmc")
includeGroupAndSubgroups("io.papermc")
}
Expand Down Expand Up @@ -103,7 +105,7 @@ ktlint {
}

levelHeadered {
headerTemplate(rootProject.file("license/copyright.txt"))
headerTemplate(isolated.rootProject.projectDirectory.file("license/copyright.txt").asFile)
}

tasks.named<HeaderApplyTask>("applyTestHeader") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.plugin.compatibility.compatibility

plugins {
id("org.jetbrains.kotlin.jvm")
id("com.gradleup.shadow")
id("com.gradle.plugin-publish")
}
Expand All @@ -17,21 +16,34 @@ if (noRelocate) {
}
}

val shade = configurations.create("shade")
val sourcesJar = configurations.dependencyScope("sourcesJar")
val sourcesJarResolvable = configurations.resolvable("sourcesJarResolvable") {
extendsFrom(sourcesJar)
}

dependencies {
sourcesJar(project(":paperweight-lib", "sourcesJar"))
}

val shade = configurations.dependencyScope("shade")
val shadeResolvable = configurations.resolvable("shadeResolvable") {
extendsFrom(shade)
}

configurations.implementation {
extendsFrom(shade)
}

configurations.shadowRuntimeElements {
compatibilityAttributes(objects)
compatibilityAttributes()
}
configurations.runtimeElements {
compatibilityAttributes(objects)
compatibilityAttributes()
}

fun ShadowJar.configureStandard() {
configurations = listOf(shade)
filesMatching("META-INF/services/**") {
configurations.setFrom(listOf(shadeResolvable))
filesMatching("META-INF/**") {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
filesMatching("META-INF/*.kotlin_module") {
Expand All @@ -48,23 +60,25 @@ fun ShadowJar.configureStandard() {
mergeServiceFiles()
}

val sourcesJar = tasks.named<AbstractArchiveTask>("sourcesJar") {
from(
zipTree(project(":paperweight-lib").tasks
.named("sourcesJar", AbstractArchiveTask::class)
.flatMap { it.archiveFile })
) {
private fun SetProperty<Configuration>.setFrom(configurations: List<NamedDomainObjectProvider<out Configuration>>) {
empty()
configurations.forEach { add(it) }
}

val libSourcesJar = tasks.named<AbstractArchiveTask>("sourcesJar") {
from(zipTree(sourcesJarResolvable.flatMap { it.elements.map { it.single().asFile } })) {
exclude("META-INF/**")
}
}

gradlePlugin {
website.set("https://github.com/PaperMC/paperweight")
vcsUrl.set("https://github.com/PaperMC/paperweight")
website.set("https://github.com/CraftCanvasMC/weaver/")
vcsUrl.set("https://github.com/CraftCanvasMC/weaver/")
plugins.configureEach {
compatibility {
features {
configurationCache = true
isolatedProjects = true
}
}
}
Expand All @@ -81,8 +95,8 @@ val shadowJar = tasks.named<ShadowJar>("shadowJar") {

val prefix = "paper.libs"
listOf(
"codechicken.diffpatch",
/* -> */ "codechicken.repack",
"io.codechicken.diffpatch",
/* -> */ "io.codechicken.repack",
"com.github.salomonbrys.kotson",
"com.google.gson",
"dev.denwav.hypo",
Expand Down Expand Up @@ -112,9 +126,19 @@ val shadowJar = tasks.named<ShadowJar>("shadowJar") {

publishing {
repositories {
maven("https://artifactory.papermc.io/artifactory/snapshots/") {
credentials(PasswordCredentials::class)
name = "paper"
maven("https://maven.canvasmc.io/snapshots") {
name = "CanvasMC_Snapshots"
credentials {
username = providers.environmentVariable("PUBLISH_USER").orNull
password = providers.environmentVariable("PUBLISH_TOKEN").orNull
}
}
maven("https://maven.canvasmc.io/releases") {
name = "CanvasMC_Releases"
credentials {
username = providers.environmentVariable("PUBLISH_USER").orNull
password = providers.environmentVariable("PUBLISH_TOKEN").orNull
}
}
}

Expand All @@ -128,13 +152,13 @@ publishing {
}

fun MavenPom.pomConfig() {
val repoPath = "PaperMC/paperweight"
val repoPath = "CraftCanvasMC/weaver"
val repoUrl = "https://github.com/$repoPath"

name.set("paperweight")
description.set("Gradle plugin for the PaperMC project")
name.set("weaver")
description.set("Gradle plugin for the CanvasMC project")
url.set(repoUrl)
inceptionYear.set("2020")
inceptionYear.set("2025")

licenses {
license {
Expand All @@ -151,10 +175,9 @@ fun MavenPom.pomConfig() {

developers {
developer {
id.set("DenWav")
name.set("Kyle Wood")
email.set("kyle@denwav.dev")
url.set("https://github.com/DenWav")
id.set("CanvasMC")
name.set("Canvas")
url.set("https://github.com/CraftCanvasMC")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@ import org.gradle.api.Action
import org.gradle.api.artifacts.Configuration
import org.gradle.api.attributes.java.TargetJvmVersion
import org.gradle.api.attributes.plugin.GradlePluginApiVersion
import org.gradle.api.model.ObjectFactory
import org.gradle.kotlin.dsl.*
import org.gradle.plugin.devel.GradlePluginDevelopmentExtension
import org.gradle.plugin.devel.PluginDeclaration

fun Configuration.compatibilityAttributes(objects: ObjectFactory) {
fun Configuration.compatibilityAttributes() {
attributes {
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 17)
attribute(GradlePluginApiVersion.GRADLE_PLUGIN_API_VERSION_ATTRIBUTE, objects.named("9.7.1"))
attribute(GradlePluginApiVersion.GRADLE_PLUGIN_API_VERSION_ATTRIBUTE, named("9.7.1"))
}
}

fun GradlePluginDevelopmentExtension.setupPlugin(prefix: String, op: Action<PluginDeclaration>) {
plugins.register("paperweight-$prefix") {
id = "io.papermc.paperweight." + prefix
displayName = "paperweight $prefix"
tags.set(listOf("paper", "minecraft"))
plugins.register("weaver-$prefix") {
id = "io.canvasmc.weaver." + prefix
displayName = "weaver $prefix"
tags.set(listOf("paper", "minecraft", "canvas"))
op.execute(this)
}
}
4 changes: 4 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
`kotlin-dsl` apply false
}

tasks.register("printVersion") {
val ver = project.version
doFirst {
Expand Down
Loading
Loading