-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c9e2fd
commit ccc84ba
Showing
3 changed files
with
9 additions
and
29 deletions.
There are no files selected for viewing
23 changes: 0 additions & 23 deletions
23
plugin/loom/src/main/java/dev/lukebemish/opensesame/plugin/loom/LoomExtension.java
This file was deleted.
Oops, something went wrong.
13 changes: 9 additions & 4 deletions
13
plugin/loom/src/main/java/dev/lukebemish/opensesame/plugin/loom/OpenSesamePluginLoom.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
package dev.lukebemish.opensesame.plugin.loom; | ||
|
||
import dev.lukebemish.opensesame.plugin.OpenSesameExtension; | ||
import dev.lukebemish.opensesame.plugin.OpenSesamePlugin; | ||
import net.fabricmc.loom.api.LoomGradleExtensionAPI; | ||
import net.fabricmc.loom.api.remapping.RemapperParameters; | ||
import net.fabricmc.loom.bootstrap.LoomGradlePluginBootstrap; | ||
import org.gradle.api.Plugin; | ||
import org.gradle.api.Project; | ||
|
||
public class OpenSesamePluginLoom implements Plugin<Project> { | ||
@Override | ||
|
||
@Override@SuppressWarnings({"unchecked", "rawtypes"}) | ||
public void apply(Project target) { | ||
target.getPlugins().apply(OpenSesamePlugin.class); | ||
target.getPlugins().apply(LoomGradlePluginBootstrap.class); | ||
|
||
var openSesameExtension = (OpenSesameExtension) target.getExtensions().getByName("opensesame"); | ||
openSesameExtension.getExtensions().create("loom", LoomExtension.class); | ||
LoomGradleExtensionAPI loomExtension = (LoomGradleExtensionAPI) target.getExtensions().getByName("loom"); | ||
loomExtension.addRemapperExtension((Class) OpeningRemapperExtension.class, RemapperParameters.None.class, i -> {}); | ||
loomExtension.getKnownIndyBsms().add("dev/lukebemish/opensesame/runtime/OpeningMetafactory"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters