mirror of
https://github.com/TeamMidnightDust/MidnightControls.git
synced 2025-12-13 23:25:10 +01:00
WIP broken stuff.
This commit is contained in:
@@ -1,14 +1,24 @@
|
||||
import net.fabricmc.loom.task.RemapJarTask
|
||||
|
||||
plugins {
|
||||
id 'fabric-loom' version '0.4-SNAPSHOT'
|
||||
id 'fabric-loom' version '0.6-SNAPSHOT'
|
||||
id 'java-library'
|
||||
id 'maven-publish'
|
||||
id 'com.github.johnrengelman.shadow'
|
||||
id 'org.cadixdev.licenser'
|
||||
}
|
||||
|
||||
version = "${project.mod_version}+${project.minecraft_version}"
|
||||
import net.fabricmc.loom.task.RemapJarTask
|
||||
|
||||
version = "${project.mod_version}+${getMCVersionString()}"
|
||||
archivesBaseName = project.archives_base_name + "-fabric"
|
||||
|
||||
def getMCVersionString() {
|
||||
if (project.minecraft_version.matches("\\d\\dw\\d\\d[a-z]")) {
|
||||
return project.minecraft_version
|
||||
}
|
||||
int lastDot = project.minecraft_version.lastIndexOf('.')
|
||||
return project.minecraft_version.substring(0, lastDot)
|
||||
}
|
||||
|
||||
minecraft {
|
||||
}
|
||||
|
||||
@@ -20,6 +30,7 @@ repositories {
|
||||
repositories {
|
||||
maven { url = "https://jitpack.io" }
|
||||
}
|
||||
maven { url "https://maven.shedaniel.me/" }
|
||||
}
|
||||
|
||||
configurations {
|
||||
@@ -43,17 +54,12 @@ dependencies {
|
||||
|
||||
// Compatibility mods
|
||||
modImplementation "com.github.joaoh1:okzoomer:e13183c59b"
|
||||
modImplementation "me.shedaniel:RoughlyEnoughItems:5.2.3"
|
||||
modImplementation "me.shedaniel:RoughlyEnoughItems:5.10.184"
|
||||
|
||||
api project(":core")
|
||||
shadowInternal project(":core")
|
||||
shadow("org.aperlambda:lambdajcommon:1.8.1") {
|
||||
// Minecraft already has all that google crap.
|
||||
exclude group: 'com.google.code.gson'
|
||||
exclude group: 'com.google.guava'
|
||||
}
|
||||
shadow "com.electronwill.night-config:core:3.5.3"
|
||||
shadow "com.electronwill.night-config:toml:3.5.3"
|
||||
shadow project(":core")
|
||||
shadow "com.electronwill.night-config:core:3.6.3"
|
||||
shadow "com.electronwill.night-config:toml:3.6.3"
|
||||
}
|
||||
|
||||
processResources {
|
||||
@@ -80,23 +86,21 @@ jar {
|
||||
from "../LICENSE"
|
||||
}
|
||||
|
||||
task shadowJar(type: Jar) {
|
||||
archiveClassifier.set("dev")
|
||||
license {
|
||||
header file('HEADER')
|
||||
include '**/*.java'
|
||||
}
|
||||
|
||||
from sourceSets.main.output
|
||||
shadowJar {
|
||||
dependsOn jar
|
||||
configurations = [project.configurations.shadow]
|
||||
archiveClassifier.set('dev')
|
||||
|
||||
from {
|
||||
configurations.shadowInternal.filter {
|
||||
it.getName().contains("lambdacontrols")
|
||||
}.collect {
|
||||
it.isDirectory() ? it : zipTree(it)
|
||||
}
|
||||
}
|
||||
from {
|
||||
configurations.shadow.collect {
|
||||
it.isDirectory() ? it : zipTree(it)
|
||||
}
|
||||
}
|
||||
exclude 'META-INF/maven/**'
|
||||
exclude 'com/google/**'
|
||||
exclude 'javax/**'
|
||||
exclude 'org/**'
|
||||
relocate 'com.electronwill.nightconfig', 'dev.lambdaurora.lambdacontrols.shadow.nightconfig'
|
||||
}
|
||||
|
||||
task shadowRemapJar(type: RemapJarTask) {
|
||||
|
||||
Reference in New Issue
Block a user