Skip to content

Commit

Permalink
make use of loader dependency resolver to disable module
Browse files Browse the repository at this point in the history
remove impl prefix from subprojects
  • Loading branch information
deirn committed May 25, 2021
1 parent 450f53c commit 4c649a0
Show file tree
Hide file tree
Showing 57 changed files with 56 additions and 104 deletions.
8 changes: 8 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ allprojects {
}
}

minecraft {
refmapName = "megane-${name}.refmap.json"
}

repositories {
maven { url "https://maven.fabricmc.net/" }
maven { url "https://bai.jfrog.io/artifactory/maven" }
Expand Down Expand Up @@ -111,6 +115,10 @@ subprojects {
main.resources.srcDirs = ["../src/${name}/resources"]
}

tasks.withType(org.gradle.jvm.tasks.Jar) {
archiveBaseName.set("megane-${project.name}")
}

publishing {
publications {
mavenJava(MavenPublication) {
Expand Down
24 changes: 12 additions & 12 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ def include(String name) {
include "base"
include "runtime"

include "impl-applied-energistics-2"
include "impl-art-of-alchemy"
include "impl-astromine"
include "impl-fabric-furnaces"
include "impl-fast-transfer-lib"
include "impl-industrial-revolution"
include "impl-kibe"
include "impl-lib-block-attributes"
include "impl-modern-industrialization"
include "impl-team-reborn-energy"
include "impl-tech-reborn"
include "impl-vanilla"
include "applied-energistics-2"
include "art-of-alchemy"
include "astromine"
include "fabric-furnaces"
include "fast-transfer-lib"
include "industrial-revolution"
include "kibe"
include "lib-block-attributes"
include "modern-industrialization"
include "team-reborn-energy"
include "tech-reborn"
include "vanilla"
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@
"icon" : "assets/megane/icon.png",
"mixins" : ["megane-applied-energistics-2.mixins.json"],
"depends" : {
"megane-base": "*"
"megane-base" : "*",
"appliedenergistics2": "*"
},
"custom" : {
"megane:modules": [
{
"depends": {"appliedenergistics2": "*"},
"init" : "badasintended.megane.impl.AppliedEnergistics2"
}
"badasintended.megane.impl.AppliedEnergistics2"
],
"modmenu" : {
"parent": "megane"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@
"icon" : "assets/megane/icon.png",
"mixins" : ["megane-art-of-alchemy.mixins.json"],
"depends" : {
"megane-base": "*"
"megane-base" : "*",
"artofalchemy": "*"
},
"custom" : {
"megane:modules": [
{
"depends": {"artofalchemy": "*"},
"init" : "badasintended.megane.impl.ArtOfAlchemy"
}
"badasintended.megane.impl.ArtOfAlchemy"
],
"modmenu" : {
"parent": "megane"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
"license" : "MIT",
"icon" : "assets/megane/icon.png",
"depends" : {
"megane-base": "*"
"megane-base" : "*",
"astromine-technologies": "*"
},
"custom" : {
"megane:modules": [
{
"depends": {"astromine-technologies": "*"},
"init" : "badasintended.megane.impl.Astromine"
}
"badasintended.megane.impl.Astromine"
],
"modmenu" : {
"parent": "megane"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
package badasintended.megane.impl.mixin;

import java.io.BufferedReader;
import java.lang.reflect.Type;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import it.unimi.dsi.fastutil.objects.Object2ObjectMaps;
import mcp.mobius.waila.utils.JsonConfig;
import net.fabricmc.loader.api.FabricLoader;
Expand All @@ -36,6 +29,7 @@ public class MixinPlugin implements IMixinConfigPlugin {

private static final Map<String, Map<String, Map<String, String>>> DEPENDENCIES = new HashMap<>();

/*
static {
Type type = new TypeToken<Map<String, Map<String, Map<String, String>>>>() {
}.getType();
Expand All @@ -50,6 +44,7 @@ public class MixinPlugin implements IMixinConfigPlugin {
}
}
}
*/

private Map<String, Map<String, String>> mixinDependencies;
private String mixinPackage;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@
"icon" : "assets/megane/icon.png",
"mixins" : ["megane-fabric-furnaces.mixins.json"],
"depends" : {
"megane-base": "*"
"megane-base" : "*",
"fabric-furnaces": "*"
},
"custom" : {
"megane:modules": [
{
"depends": {"fabric-furnaces": "*"},
"init" : "badasintended.megane.impl.FabricFurnaces"
}
"badasintended.megane.impl.FabricFurnaces"
],
"modmenu" : {
"parent": "megane"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
"license" : "MIT",
"icon" : "assets/megane/icon.png",
"depends" : {
"megane-base": "*"
"megane-base" : "*",
"fasttransferlib": "*"
},
"custom" : {
"megane:modules": [
{
"depends": {"fasttransferlib": "*"},
"init" : "badasintended.megane.impl.FastTransferLib"
}
"badasintended.megane.impl.FastTransferLib"
],
"modmenu" : {
"parent": "megane"
Expand Down

This file was deleted.

7 changes: 0 additions & 7 deletions src/impl-art-of-alchemy/resources/mixindependencies.json

This file was deleted.

7 changes: 0 additions & 7 deletions src/impl-fabric-furnaces/resources/mixindependencies.json

This file was deleted.

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
"license" : "MIT",
"icon" : "assets/megane/icon.png",
"depends" : {
"megane-base": "*"
"megane-base": "*",
"indrev" : "*"
},
"custom" : {
"megane:modules": [
{
"depends": {"indrev": "*"},
"init" : "badasintended.megane.impl.IndustrialRevolution"
}
"badasintended.megane.impl.IndustrialRevolution"
],
"modmenu" : {
"parent": "megane"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
"license" : "MIT",
"icon" : "assets/megane/icon.png",
"depends" : {
"megane-base": "*"
"megane-base": "*",
"kibe" : "*"
},
"custom" : {
"megane:modules": [
{
"depends": {"kibe": "*"},
"init" : "badasintended.megane.impl.Kibe"
}
"badasintended.megane.impl.Kibe"
],
"modmenu" : {
"parent": "megane"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
"license" : "MIT",
"icon" : "assets/megane/icon.png",
"depends" : {
"megane-base": "*"
"megane-base" : "*",
"libblockattributes_fluids": "*"
},
"custom" : {
"megane:modules": [
{
"depends": {"libblockattributes_fluids": "*"},
"init" : "badasintended.megane.impl.LibBlockAttributesFluids"
}
"badasintended.megane.impl.LibBlockAttributesFluids"
],
"modmenu" : {
"parent": "megane"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@
"authors" : ["deirn"],
"license" : "MIT",
"icon" : "assets/megane/icon.png",
"mixins" : ["megane-modern-industrialization.mixins.json"],
"mixins" : ["megane-impl-modern-industrialization.mixins.json"],
"depends" : {
"megane-base": "*"
"megane-base" : "*",
"modern_industrialization": "0.3.x"
},
"custom" : {
"megane:modules": [
{
"depends": {"modern_industrialization": "*"},
"init" : "badasintended.megane.impl.ModernIndustrialization"
}
"badasintended.megane.impl.ModernIndustrialization"
],
"modmenu" : {
"parent": "megane"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
"license" : "MIT",
"icon" : "assets/megane/icon.png",
"depends" : {
"megane-base": "*"
"megane-base" : "*",
"team_reborn_energy": "*"
},
"custom" : {
"megane:modules": [
{
"depends": {"team_reborn_energy": "*"},
"init" : "badasintended.megane.impl.TeamRebornEnergy"
}
"badasintended.megane.impl.TeamRebornEnergy"
],
"modmenu" : {
"parent": "megane"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
"license" : "MIT",
"icon" : "assets/megane/icon.png",
"depends" : {
"megane-base": "*"
"megane-base": "*",
"techreborn" : "*"
},
"custom" : {
"megane:modules": [
{
"depends": {"techreborn": "*"},
"init" : "badasintended.megane.impl.TechReborn"
}
"badasintended.megane.impl.TechReborn"
],
"modmenu" : {
"parent": "megane"
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 4c649a0

Please sign in to comment.