Skip to content

Commit 3b97647

Browse files
committed
documentation updates
1 parent 6e991af commit 3b97647

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ This build script was heavily inspired by the build script created by GT New Hor
1818
- Jabel for Java 17 language features while still targeting Java 8
1919
- JUnit 5 added automatically
2020
- Spotless auto-formatting with default formatter configurations, or user-specified configurations
21-
- API and Source deployment along side obf and deobf jars
21+
- API and Source deployment alongside obf and deobf jars
2222
- Deployment testing options, so that you can ensure your tokens and other variables are set up properly
2323
- Custom username setting for development, that can be set either project-wide or via an environment variable for shared projects
2424
- Ships with Jetbrains annotations by default, so you have another option over `javax`
2525
- Scala support
2626
- Custom Maven publishing location support, with all secrets held by system environment variables
2727
- Automatic mixin JSON generation, as well as mcmod.info and pack.mcmeta if they are missing
28+
- Dependency shadowing for releasing dependencies in your builds, more info [here](https://github.com/GregTechCEu/Buildscripts/blob/master/docs/shadow.md)
29+
- Automatic changelog generation by generating a list of all commits between the current tag and the previous tag
2830

2931
And many more to come! And of course, all of these features are toggleable via an option in `gradle.properties`.
3032

@@ -35,6 +37,7 @@ And many more to come! And of course, all of these features are toggleable via a
3537
- Ensure your project is initialized in git. For example, you can run `git init; git commit --message "initial commit"`
3638
- Replace placeholder values, such as `gradle.properties`, package/class names for your `src/main` directory, etc.
3739
- Run `./gradlew setupDecompWorkspace`
40+
- Run `./gradlew updateBuildScript` to ensure that you are on the latest version
3841
- You are good to go! You can now run the `runClient` run configuration or run `./gradlew runClient` to launch the game
3942

4043
## How to Install (Existing Project)
@@ -54,6 +57,7 @@ And many more to come! And of course, all of these features are toggleable via a
5457
1. JEI
5558
2. The One Probe
5659
- Delete the `build.gradle.old` file
60+
- And lastly, run `./gradlew updateBuildScript` to ensure that you are on the latest version
5761

5862
### Advanced
5963
- If your project was using Mixins, you may get a new mixin config file generated as `mixins.{modid}.json`, if yours was not named this way. Currently, you will have to move your Mixin config options to this newly generated file. If this behavior does not suit your needs, feel free to open an issue and start a discussion on different behavior

dependencies.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
* To add a mod with CurseMaven, replace '("g:n:v:c")' in the above with 'rfg.deobf("curse.maven:project_slug-project_id:file_id")'
1818
* Example: implementation rfg.deobf("curse.maven:gregtech-ce-unofficial-557242:4527757")
1919
*
20+
* To shadow a dependency, use 'shadowImplementation'. For more info, see https://github.com/GregTechCEu/Buildscripts/blob/master/docs/shadow.md
21+
*
2022
* For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph
2123
*/
2224
dependencies {

docs/shadow.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## Dependency shadowing
2+
3+
Shadowing is a useful tool which allows you to include other projects into your builds, so that users of your mod do not need to manually install them some other way.
4+
5+
Some use-cases for this include:
6+
- Using Java libraries which are not normally available in an MC environment
7+
- Including a non-released mod, such as a library mod of yours that you do not want to separately manage releases of
8+
- Using newer versions of certain Java libraries than MC provides
9+
10+
However, this feature should be used carefully. Some common issues that can occur:
11+
- If you include a shadowed mod in your project, and a modpack contains that mod, the game will not launch as Forge will see them as duplicate mods (matching mod id)
12+
- If you include a shadowed Java library in your project, users creating addon mods for your mod may have difficulties with their environment if the 'relocateShadowedDependencies' option is enabled, as import paths will be changed

0 commit comments

Comments
 (0)