Port forge and finally fix build scripts
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '0.12-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
id 'fabric-loom' version '1.3-SNAPSHOT'
|
||||
id 'idea'
|
||||
id 'com.github.johnrengelman.shadow' version '7.0.0'
|
||||
id "me.hypherionmc.modutils.modpublisher" version "1.0.+"
|
||||
}
|
||||
|
||||
apply plugin: 'me.hypherionmc.modutils.modpublisher'
|
||||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
archivesBaseName = "${mod_name}-fabric-${minecraft_version}"
|
||||
|
||||
configurations {
|
||||
shade
|
||||
implementation.extendsFrom shade
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -30,7 +30,6 @@ dependencies {
|
||||
}
|
||||
|
||||
loom {
|
||||
shareCaches()
|
||||
accessWidenerPath = project(":Common").file("src/main/resources/craterlib.aw")
|
||||
runs {
|
||||
client {
|
||||
@@ -48,7 +47,6 @@ loom {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
processResources {
|
||||
from project(":Common").sourceSets.main.resources
|
||||
inputs.property "version", project.version
|
||||
@@ -72,23 +70,28 @@ jar {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Shadowjar Config
|
||||
*/
|
||||
shadowJar {
|
||||
from sourceSets.main.output
|
||||
|
||||
configurations = [project.configurations.shade]
|
||||
dependencies {
|
||||
relocate 'me.hypherionmc.moonconfig', 'shadow.hypherionmc.moonconfig'
|
||||
}
|
||||
setArchiveClassifier("dev-shadow")
|
||||
}
|
||||
|
||||
remapJar {
|
||||
dependsOn(shadowJar)
|
||||
shouldRunAfter(shadowJar)
|
||||
input.set shadowJar.archiveFile.get()
|
||||
input.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
setArchiveClassifier(null)
|
||||
}
|
||||
|
||||
reg.configureJarTask(shadowJar)
|
||||
//reg.configureJarTask(shadowJar)
|
||||
|
||||
/**
|
||||
* Publishing Config
|
||||
*/
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
@@ -125,24 +128,6 @@ publishing {
|
||||
}
|
||||
}
|
||||
|
||||
task delDevJar {
|
||||
doLast {
|
||||
def tree = fileTree('build/libs')
|
||||
tree.include '**/*-dev.jar'
|
||||
tree.include '**/*-all.jar'
|
||||
tree.each { it.delete() }
|
||||
}
|
||||
}
|
||||
build.finalizedBy delDevJar
|
||||
|
||||
task copyAllArtifacts(type: Copy) {
|
||||
from "$buildDir/libs"
|
||||
into "$rootDir/artifacts"
|
||||
include("*.jar")
|
||||
}
|
||||
|
||||
build.finalizedBy(copyAllArtifacts)
|
||||
|
||||
publisher {
|
||||
apiKeys {
|
||||
modrinth = System.getenv("MODRINTH_TOKEN")
|
||||
@@ -168,4 +153,5 @@ publisher {
|
||||
}
|
||||
}
|
||||
|
||||
publishMod.dependsOn(build)
|
||||
publishMod.dependsOn(build)
|
||||
|
||||
|
Reference in New Issue
Block a user