Added shadowing for nightconfig
parent
cfb61f288e
commit
a83c812f94
57
build.gradle
57
build.gradle
|
@ -1,11 +1,24 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.github.johnrengelman:shadow:6.1.0'
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'fabric-loom' version '0d0261a'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
apply plugin: 'java'
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
def shortHash = 'git rev-parse --short HEAD'.execute().in.text.trim()
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
|
@ -44,7 +57,7 @@ dependencies {
|
|||
transitive false
|
||||
}
|
||||
|
||||
compile 'com.electronwill.night-config:toml:3.6.6'
|
||||
shadow(compile('com.electronwill.night-config:toml:3.6.6'))
|
||||
|
||||
// API. You technically don't need it, but it's extremely useful for not having to write the same code in every mod.
|
||||
// modImplementation "io.github.minecraft-cursed-legacy:cursed-legacy-api:${project.api_version}"
|
||||
|
@ -85,24 +98,44 @@ java {
|
|||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes([
|
||||
"MixinConfigs": archivesBaseName+".mixins.json",
|
||||
"Implementation-Title": project.name,
|
||||
"Implementation-Version": project.mod_version,
|
||||
"Implementation-Commit": shortHash,
|
||||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
||||
])
|
||||
}
|
||||
archiveClassifier.set("dev")
|
||||
// from("LICENSE") {
|
||||
// rename { "${it}_${project.archivesBaseName}"}
|
||||
// }
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
configurations = [project.configurations.shadow]
|
||||
relocate "com.electronwill.nightconfig", "xyz.pixelatedw.betterbeta.com.electronwill.nightconfig"
|
||||
archiveClassifier.set("dev")
|
||||
}
|
||||
|
||||
remapJar {
|
||||
dependsOn(shadowJar)
|
||||
}
|
||||
|
||||
// configure the maven publication
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
// add all the jars that should be included when publishing to maven
|
||||
artifact(remapJar) {
|
||||
builtBy remapJar
|
||||
}
|
||||
artifact(sourcesJar) {
|
||||
builtBy remapSourcesJar
|
||||
}
|
||||
}
|
||||
}
|
||||
// publications {
|
||||
// mavenJava(MavenPublication) {
|
||||
// // add all the jars that should be included when publishing to maven
|
||||
// artifact(remapJar) {
|
||||
// builtBy remapJar
|
||||
// }
|
||||
// artifact(sourcesJar) {
|
||||
// builtBy remapSourcesJar
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
|
||||
repositories {
|
||||
|
|
|
@ -6,5 +6,6 @@ public class MainMod implements ModInitializer {
|
|||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
ModConfig.instance();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue