[CHORE] Migrate to fdd-xplat build system
This commit is contained in:
@@ -1,32 +1,35 @@
|
||||
plugins {
|
||||
id 'org.quiltmc.loom' version '1.3.3'
|
||||
id 'com.github.johnrengelman.shadow' version '7.0.0'
|
||||
}
|
||||
|
||||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
archivesBaseName = "${mod_name}-common-${minecraft_version}"
|
||||
|
||||
loom {
|
||||
accessWidenerPath = project.file("src/main/resources/craterlib.aw")
|
||||
mixin {
|
||||
useLegacyMixinAp = false
|
||||
}
|
||||
runConfigs.configureEach {
|
||||
ideConfigGenerated = false
|
||||
}
|
||||
}
|
||||
archivesBaseName = "${mod_name.replace(" ", "")}-Common-${minecraft_version}"
|
||||
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:${minecraft_version}"
|
||||
mappings loom.officialMojangMappings()
|
||||
modImplementation "org.quiltmc:quilt-loader:0.19.4"
|
||||
|
||||
compileOnly group: 'org.spongepowered', name: 'mixin', version: '0.8.5'
|
||||
implementation "com.hypherionmc:rpcsdk:1.0"
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
from sourceSets.main.output
|
||||
dependencies {
|
||||
include(dependency("me.hypherionmc.moon-config:core:${moon_config}"))
|
||||
include(dependency("me.hypherionmc.moon-config:toml:${moon_config}"))
|
||||
|
||||
relocate 'me.hypherionmc.moonconfig', 'shadow.hypherionmc.moonconfig'
|
||||
}
|
||||
setArchiveClassifier("dev")
|
||||
}
|
||||
|
||||
/**
|
||||
* ===============================================================================
|
||||
* = DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING =
|
||||
* ===============================================================================
|
||||
*/
|
||||
|
||||
unimined.minecraft {
|
||||
fabric {
|
||||
loader fabric_loader
|
||||
accessWidener(project.file("src/main/resources/${mod_id}.aw"))
|
||||
}
|
||||
|
||||
defaultRemapJar = false
|
||||
}
|
||||
|
||||
processResources {
|
||||
def buildProps = project.properties.clone()
|
||||
|
||||
@@ -35,43 +38,17 @@ processResources {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Shadowjar Config
|
||||
*/
|
||||
shadowJar {
|
||||
exclude 'mappings/*'
|
||||
dependencies {
|
||||
include(dependency("me.hypherionmc.moon-config:core:${moon_config}"))
|
||||
include(dependency("me.hypherionmc.moon-config:toml:${moon_config}"))
|
||||
|
||||
relocate 'me.hypherionmc.moonconfig', 'shadow.hypherionmc.moonconfig'
|
||||
}
|
||||
setArchiveClassifier('dev-shadow')
|
||||
}
|
||||
|
||||
remapJar {
|
||||
input.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
setArchiveClassifier(null)
|
||||
}
|
||||
|
||||
//reg.configureJarTask(shadowJar)
|
||||
|
||||
/**
|
||||
* Publishing Config
|
||||
*/
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
mavenCommon(MavenPublication) {
|
||||
groupId project.group
|
||||
artifactId project.archivesBaseName
|
||||
version project.version
|
||||
from components.java
|
||||
|
||||
artifact(jar) {
|
||||
builtBy jar
|
||||
}
|
||||
|
||||
pom.withXml {
|
||||
Node pomNode = asNode()
|
||||
pomNode.dependencies.'*'.findAll() {
|
||||
@@ -94,4 +71,4 @@ publishing {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user