Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kessoku runtime resources #19

Draft
wants to merge 2 commits into
base: dev/1.21
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
9 changes: 9 additions & 0 deletions runtime-resources/common/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apply from: rootProject.file("gradle/scripts/klib-common.gradle")

group = "band.kessoku.lib.resources"
base.archivesName = rootProject.name + "-package"

// You can delete this section if you need to
dependencies {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package band.kessoku.lib.resources;

import band.kessoku.lib.resources.api.IProvider;
import com.google.common.collect.ImmutableList;

import java.util.ArrayList;
import java.util.List;

public class KessokuResourcesManager {

private final String modid;

private final List<IProvider> providers = new ArrayList<>();

private KessokuResourcesManager(String modid) {
this.modid = modid;
}

public static KessokuResourcesManager create(String modid) {
return new KessokuResourcesManager(modid);
}

public void addProvider(IProvider provider) {
providers.add(provider);
}

public String getModid() {
return modid;
}

public List<IProvider> getProviders() {
return ImmutableList.copyOf(providers);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package band.kessoku.lib.resources;

import org.slf4j.Marker;
import org.slf4j.MarkerFactory;

public class KessokuRuntimeResources {
public static final String MOD_ID = "kessoku_runtime_resources";
public static final Marker MARKER = MarkerFactory.getMarker("[KessokuRuntimeResources]");
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package band.kessoku.lib.resources.api;

public interface IProvider {
}
9 changes: 9 additions & 0 deletions runtime-resources/fabric/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apply from: rootProject.file("gradle/scripts/klib-fabric.gradle")

group = "band.kessoku.lib.resources"
base.archivesName = rootProject.name + "-package"

dependencies {
common(project(path: ':runtime-resources-common', configuration: 'namedElements')) { transitive false }
shadowBundle(project(path: ':runtime-resources-common', configuration: 'transformProductionFabric'))
}
9 changes: 9 additions & 0 deletions runtime-resources/neo/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apply from: rootProject.file("gradle/scripts/klib-neo.gradle")

group = "band.kessoku.lib.resources"
base.archivesName = rootProject.name + "-package"

dependencies {
common(project(path: ':runtime-resources-common', configuration: 'namedElements')) { transitive false }
shadowBundle(project(path: ':runtime-resources-common', configuration: 'transformProductionNeoForge'))
}
1 change: 1 addition & 0 deletions runtime-resources/neo/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
loom.platform=neoforge
5 changes: 4 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ includeModule("keybind") // Keybind API
includeModule("config") // Config API
includeModule("entrypoint") // Entrypoint API
includeModule("entity-events") // Entity Events
includeModule("runtime-resources") // Runtime Resources


void includeWrapper(String platform) {
Expand All @@ -38,4 +39,6 @@ void includeModule(String moduleName) {
void includePlatform(String moduleName, String platform) {
include("$moduleName/$platform")
project(":$moduleName/$platform").name = "$moduleName-$platform"
}
}
include 'runtime-resources'

Loading