Skip to content

Commit

Permalink
Modified example code to use "plugin" vs. "service"
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Sep 15, 2024
1 parent 2086916 commit e7effa5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ neoForge {
}
}
def serviceJar = tasks.register("pluginJar", Jar) {
def pluginJar = tasks.register("pluginJar", Jar) {
from(sourceSets.plugin.output)
archiveClassifier = "plugin"
manifest {
Expand All @@ -293,7 +293,7 @@ def serviceJar = tasks.register("pluginJar", Jar) {
}
dependencies {
jarJar files(serviceJar)
jarJar files(pluginJar)
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ void testCanEmbedLocalFileWithModuleInfo() throws Exception {
sourceSets {
plugin
}
compileServiceJava {
compilePluginJava {
// otherwise testkit needs to run with J21
options.release = 9
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package jijtestservice;
package jijtestplugin;

public class Plugin {

Expand Down
2 changes: 1 addition & 1 deletion testproject/jijtest/src/test/java/jijtest/CoreModTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ void testPresenceOfCoreMod() throws Exception {
var field = assertDoesNotThrow(() -> ItemStack.class.getField("CORE_MOD_MARKER"));
assertTrue(field.getBoolean(null));

var obj = new jijtestservice.Service();
var obj = new jijtestplugin.Plugin();
// ensures it is *not* a transforming classloader, meaning it was loaded in our parent layer
assertEquals("cpw.mods.cl.ModuleClassLoader", obj.getClass().getClassLoader().getClass().getName());
assertEquals("cpw.mods.modlauncher.TransformingClassLoader", getClass().getClassLoader().getClass().getName());
Expand Down

0 comments on commit e7effa5

Please sign in to comment.