98 lines
2.4 KiB
Groovy
98 lines
2.4 KiB
Groovy
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
|
|
}
|
|
}
|
|
|
|
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"
|
|
}
|
|
|
|
processResources {
|
|
def buildProps = project.properties.clone()
|
|
|
|
filesMatching(['pack.mcmeta']) {
|
|
expand buildProps
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 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) {
|
|
groupId project.group
|
|
artifactId project.archivesBaseName
|
|
version project.version
|
|
from components.java
|
|
|
|
artifact(jar) {
|
|
builtBy jar
|
|
}
|
|
|
|
pom.withXml {
|
|
Node pomNode = asNode()
|
|
pomNode.dependencies.'*'.findAll() {
|
|
it.artifactId.text() == 'regutils-joined-fabric' ||
|
|
it.artifactId.text() == 'core' ||
|
|
it.artifactId.text() == 'toml'
|
|
}.each() {
|
|
it.parent().remove(it)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
url "https://maven.firstdark.dev/" + (project.release ? "releases" : "snapshots")
|
|
credentials {
|
|
username System.getenv("MAVEN_USER")
|
|
password System.getenv("MAVEN_PASS")
|
|
}
|
|
}
|
|
}
|
|
}
|