mirror of
https://github.com/TeamMidnightDust/MidnightLib.git
synced 2025-12-16 17:25:09 +01:00
Compare commits
1 Commits
d954b32461
...
2e6bcaa3f2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e6bcaa3f2 |
@@ -3,7 +3,7 @@ import groovy.json.JsonOutput
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "architectury-plugin" version "3.4-SNAPSHOT"
|
id "architectury-plugin" version "3.4-SNAPSHOT"
|
||||||
id "dev.architectury.loom" version "1.10.+" apply false
|
id "dev.architectury.loom" version "1.10-SNAPSHOT" apply false
|
||||||
id "me.shedaniel.unified-publishing" version "0.1.+" apply false
|
id "me.shedaniel.unified-publishing" version "0.1.+" apply false
|
||||||
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
|
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
plugins {
|
|
||||||
id 'java'
|
|
||||||
}
|
|
||||||
|
|
||||||
architectury {
|
architectury {
|
||||||
common(rootProject.enabled_platforms.split(","))
|
common(rootProject.enabled_platforms.split(","))
|
||||||
}
|
}
|
||||||
@@ -25,16 +21,3 @@ publishing {
|
|||||||
// Add repositories to publish to here.
|
// Add repositories to publish to here.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
|
||||||
testOutput.extendsFrom(testImplementation)
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register('testJar', Jar) {
|
|
||||||
from sourceSets.test.output
|
|
||||||
archiveClassifier = 'tests'
|
|
||||||
}
|
|
||||||
|
|
||||||
artifacts {
|
|
||||||
testOutput testJar
|
|
||||||
}
|
|
||||||
@@ -11,27 +11,7 @@ architectury {
|
|||||||
fabric()
|
fabric()
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
test {
|
|
||||||
compileClasspath += main.compileClasspath
|
|
||||||
runtimeClasspath += main.runtimeClasspath
|
|
||||||
java {
|
|
||||||
srcDirs.add('src/test/java' as File)
|
|
||||||
}
|
|
||||||
resources {
|
|
||||||
srcDirs.add('src/test/resources' as File)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
loom {
|
loom {
|
||||||
runs {
|
|
||||||
testClient {
|
|
||||||
client()
|
|
||||||
configName = "Test Minecraft Client"
|
|
||||||
source sourceSets.test
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
@@ -47,12 +27,10 @@ configurations {
|
|||||||
dependencies {
|
dependencies {
|
||||||
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
|
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
|
||||||
modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}"
|
modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}"
|
||||||
modCompileOnly("com.terraformersmc:modmenu:${rootProject.mod_menu_version}")
|
modCompileOnly ("com.terraformersmc:modmenu:${rootProject.mod_menu_version}")
|
||||||
|
|
||||||
common(project(path: ":common", configuration: "namedElements")) { transitive false }
|
common(project(path: ":common", configuration: "namedElements")) { transitive false }
|
||||||
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false }
|
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false }
|
||||||
|
|
||||||
testImplementation common(project(path: ':common', configuration: 'testOutput'))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
@@ -63,14 +41,6 @@ processResources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
processTestResources {
|
|
||||||
inputs.property "version", rootProject.version
|
|
||||||
|
|
||||||
filesMatching("fabric.mod.json") {
|
|
||||||
expand "version": rootProject.version
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
exclude "architectury.common.json"
|
exclude "architectury.common.json"
|
||||||
|
|
||||||
@@ -101,7 +71,7 @@ unifiedPublishing {
|
|||||||
releaseType = "$project.release_type"
|
releaseType = "$project.release_type"
|
||||||
changelog = releaseChangelog()
|
changelog = releaseChangelog()
|
||||||
gameVersions = []
|
gameVersions = []
|
||||||
gameLoaders = ["fabric", "quilt"]
|
gameLoaders = ["fabric","quilt"]
|
||||||
mainPublication remapJar
|
mainPublication remapJar
|
||||||
relations {
|
relations {
|
||||||
depends {
|
depends {
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
package eu.midnightdust.test.fabric;
|
|
||||||
|
|
||||||
import eu.midnightdust.test.config.MidnightConfigExample;
|
|
||||||
import eu.midnightdust.lib.config.MidnightConfig;
|
|
||||||
import net.fabricmc.api.ModInitializer;
|
|
||||||
|
|
||||||
public class MLExampleFabric implements ModInitializer {
|
|
||||||
@Override
|
|
||||||
public void onInitialize() {
|
|
||||||
MidnightConfig.init("modid", MidnightConfigExample.class);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https://mirrors.aliyun.com/gradle/distributions/v8.14.3/gradle-8.14.3-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -13,44 +13,11 @@ repositories {
|
|||||||
|
|
||||||
architectury {
|
architectury {
|
||||||
platformSetupLoomIde()
|
platformSetupLoomIde()
|
||||||
neoForge {
|
neoForge()
|
||||||
platformPackage = "neoforge"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
test {
|
|
||||||
compileClasspath += main.compileClasspath
|
|
||||||
runtimeClasspath += main.runtimeClasspath
|
|
||||||
java {
|
|
||||||
srcDirs.add('src/test/java' as File)
|
|
||||||
}
|
|
||||||
resources {
|
|
||||||
srcDirs.add('src/test/resources' as File)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loom {
|
loom {
|
||||||
accessWidenerPath = project(":common").loom.accessWidenerPath
|
accessWidenerPath = project(":common").loom.accessWidenerPath
|
||||||
|
|
||||||
runs {
|
|
||||||
testClient {
|
|
||||||
client()
|
|
||||||
name = "Test Minecraft Client"
|
|
||||||
|
|
||||||
mods {
|
|
||||||
create('midnightlib') {
|
|
||||||
sourceSet sourceSets.main
|
|
||||||
}
|
|
||||||
create('testmod') {
|
|
||||||
sourceSet sourceSets.test
|
|
||||||
}
|
|
||||||
}
|
|
||||||
source sourceSets.test
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
@@ -77,10 +44,6 @@ dependencies {
|
|||||||
|
|
||||||
common(project(path: ':common', configuration: 'namedElements')) { transitive false }
|
common(project(path: ':common', configuration: 'namedElements')) { transitive false }
|
||||||
shadowBundle project(path: ':common', configuration: 'transformProductionNeoForge')
|
shadowBundle project(path: ':common', configuration: 'transformProductionNeoForge')
|
||||||
|
|
||||||
// testImplementation common(project(path: ':common', configuration: 'namedElements')) { transitive false }
|
|
||||||
testImplementation common(project(path: ':common', configuration: 'testOutput')) { transitive false }
|
|
||||||
testImplementation sourceSets.main.output
|
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
@@ -91,14 +54,6 @@ processResources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
processTestResources {
|
|
||||||
inputs.property 'version', rootProject.version
|
|
||||||
|
|
||||||
filesMatching('META-INF/neoforge.mods.toml') {
|
|
||||||
expand version: rootProject.version
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
configurations = [project.configurations.shadowBundle]
|
configurations = [project.configurations.shadowBundle]
|
||||||
archiveClassifier = 'dev-shadow'
|
archiveClassifier = 'dev-shadow'
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
package eu.midnightdust.test.neoforge;
|
|
||||||
|
|
||||||
import eu.midnightdust.test.config.MidnightConfigExample;
|
|
||||||
import net.neoforged.fml.common.Mod;
|
|
||||||
|
|
||||||
@Mod("testmod")
|
|
||||||
public class MLExampleNeoForge {
|
|
||||||
public MLExampleNeoForge() {
|
|
||||||
MidnightConfigExample.init("modid", MidnightConfigExample.class);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
modLoader = "javafml"
|
|
||||||
loaderVersion = "[2,)"
|
|
||||||
#issueTrackerURL = ""
|
|
||||||
license = "MIT License"
|
|
||||||
|
|
||||||
[[mods]]
|
|
||||||
modId = "testmod"
|
|
||||||
version = "${version}"
|
|
||||||
displayName = "Example Mod"
|
|
||||||
authors = "TeamMidnightDust, Motschen"
|
|
||||||
description = '''
|
|
||||||
Example Mod for Team MidnightDust's mods.
|
|
||||||
'''
|
|
||||||
|
|
||||||
[[dependencies.testmod]]
|
|
||||||
modId = "neoforge"
|
|
||||||
mandatory = true
|
|
||||||
versionRange = "[20.5,)"
|
|
||||||
ordering = "NONE"
|
|
||||||
side = "BOTH"
|
|
||||||
|
|
||||||
[[dependencies.testmod]]
|
|
||||||
modId = "minecraft"
|
|
||||||
mandatory = true
|
|
||||||
versionRange = "[1.20.5,)"
|
|
||||||
ordering = "NONE"
|
|
||||||
side = "BOTH"
|
|
||||||
|
|
||||||
[[dependencies.testmod]]
|
|
||||||
modId = "midnightlib"
|
|
||||||
mandatory = true
|
|
||||||
versionRange = "[1.0,)"
|
|
||||||
ordering = "NONE"
|
|
||||||
side = "BOTH"
|
|
||||||
@@ -9,7 +9,9 @@ pluginManagement {
|
|||||||
|
|
||||||
include("common")
|
include("common")
|
||||||
include("fabric")
|
include("fabric")
|
||||||
|
include("test-fabric")
|
||||||
include("neoforge")
|
include("neoforge")
|
||||||
|
include("test-neoforge")
|
||||||
//include("quilt")
|
//include("quilt")
|
||||||
|
|
||||||
rootProject.name = "midnightlib"
|
rootProject.name = "midnightlib"
|
||||||
|
|||||||
32
test-fabric/build.gradle
Normal file
32
test-fabric/build.gradle
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
plugins {
|
||||||
|
id 'com.github.johnrengelman.shadow'
|
||||||
|
id "me.shedaniel.unified-publishing"
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
maven { url "https://maven.terraformersmc.com/releases" }
|
||||||
|
}
|
||||||
|
|
||||||
|
architectury {
|
||||||
|
platformSetupLoomIde()
|
||||||
|
fabric()
|
||||||
|
}
|
||||||
|
|
||||||
|
loom {
|
||||||
|
}
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
common
|
||||||
|
shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files.
|
||||||
|
compileClasspath.extendsFrom common
|
||||||
|
runtimeClasspath.extendsFrom common
|
||||||
|
developmentFabric.extendsFrom common
|
||||||
|
archivesBaseName = rootProject.archives_base_name + "-fabric"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
|
||||||
|
modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}"
|
||||||
|
|
||||||
|
implementation project(path: ":fabric", configuration: "namedElements")
|
||||||
|
common(project(path: ":common", configuration: "namedElements")) { transitive false }
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package eu.midnightdust.fabric.example;
|
||||||
|
|
||||||
|
import eu.midnightdust.fabric.example.config.MidnightConfigExample;
|
||||||
|
import net.fabricmc.api.ModInitializer;
|
||||||
|
|
||||||
|
public class MLExampleFabric implements ModInitializer {
|
||||||
|
@Override
|
||||||
|
public void onInitialize() {
|
||||||
|
MidnightConfigExample.init("modid", MidnightConfigExample.class);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package eu.midnightdust.test;
|
package eu.midnightdust.fabric.example;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import eu.midnightdust.lib.config.MidnightConfig;
|
import eu.midnightdust.lib.config.MidnightConfig;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package eu.midnightdust.test.config;
|
package eu.midnightdust.fabric.example.config;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import eu.midnightdust.test.MidnightLibExtras;
|
import eu.midnightdust.fabric.example.MidnightLibExtras;
|
||||||
import eu.midnightdust.lib.config.MidnightConfig;
|
import eu.midnightdust.lib.config.MidnightConfig;
|
||||||
import net.minecraft.text.MutableText;
|
import net.minecraft.text.MutableText;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"schemaVersion": 1,
|
"schemaVersion": 1,
|
||||||
"id": "testmod",
|
"id": "midnightlib-example",
|
||||||
"version": "${version}",
|
"version": "${version}",
|
||||||
|
|
||||||
"name": "MidnightLib Example",
|
"name": "MidnightLib Example",
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
"environment": "*",
|
"environment": "*",
|
||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
"main": [
|
"main": [
|
||||||
"eu.midnightdust.test.fabric.MLExampleFabric"
|
"eu.midnightdust.fabric.example.MLExampleFabric"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"depends": {
|
"depends": {
|
||||||
Reference in New Issue
Block a user