2022-05-12 00:18:53 +02:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
2023-09-10 12:58:49 +02:00
|
|
|
id 'fabric-loom' version '0.12-SNAPSHOT'
|
2022-05-12 00:18:53 +02:00
|
|
|
id 'maven-publish'
|
2022-06-10 18:58:26 +02:00
|
|
|
id 'com.github.johnrengelman.shadow' version '7.0.0'
|
2022-05-12 00:18:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
archivesBaseName = "${mod_name}-common-${minecraft_version}"
|
|
|
|
|
2023-07-13 22:36:16 +02:00
|
|
|
loom {
|
2023-09-10 12:58:49 +02:00
|
|
|
shareCaches()
|
2023-07-13 22:36:16 +02:00
|
|
|
accessWidenerPath = project.file("src/main/resources/craterlib.aw")
|
|
|
|
remapArchives = false
|
|
|
|
mixin {
|
|
|
|
useLegacyMixinAp = false
|
2022-05-12 00:18:53 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2023-07-13 22:36:16 +02:00
|
|
|
minecraft "com.mojang:minecraft:${minecraft_version}"
|
|
|
|
mappings loom.officialMojangMappings()
|
2022-06-10 18:58:26 +02:00
|
|
|
compileOnly group: 'org.spongepowered', name: 'mixin', version: '0.8.5'
|
2023-07-31 01:36:45 +02:00
|
|
|
implementation "com.hypherionmc:rpcsdk:1.0"
|
2022-05-12 00:18:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
processResources {
|
|
|
|
def buildProps = project.properties.clone()
|
|
|
|
|
|
|
|
filesMatching(['pack.mcmeta']) {
|
|
|
|
expand buildProps
|
|
|
|
}
|
|
|
|
}
|
2022-06-10 18:58:26 +02:00
|
|
|
|
|
|
|
shadowJar {
|
|
|
|
dependencies {
|
2023-03-19 13:52:23 +02:00
|
|
|
include(dependency("me.hypherionmc.moon-config:core:${moon_config}"))
|
|
|
|
include(dependency("me.hypherionmc.moon-config:toml:${moon_config}"))
|
2022-06-10 18:58:26 +02:00
|
|
|
|
2023-04-02 17:01:02 +02:00
|
|
|
relocate 'me.hypherionmc.moonconfig', 'shadow.hypherionmc.moonconfig'
|
2022-06-10 18:58:26 +02:00
|
|
|
}
|
2023-09-21 19:06:07 +02:00
|
|
|
setArchiveClassifier('')
|
2022-06-10 18:58:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
build.dependsOn shadowJar
|
|
|
|
reg.configureJarTask(shadowJar)
|
|
|
|
|
2022-05-12 00:18:53 +02:00
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
|
|
|
groupId project.group
|
|
|
|
artifactId project.archivesBaseName
|
|
|
|
version project.version
|
|
|
|
from components.java
|
2023-09-10 17:17:49 +02:00
|
|
|
|
|
|
|
artifact(jar) {
|
|
|
|
builtBy jar
|
|
|
|
}
|
|
|
|
|
2022-06-10 18:58:26 +02:00
|
|
|
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)
|
|
|
|
}
|
|
|
|
}
|
2022-05-12 00:18:53 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
maven {
|
2023-07-13 22:36:16 +02:00
|
|
|
url "https://maven.firstdark.dev/" + (project.release ? "releases" : "snapshots")
|
2022-06-10 18:58:26 +02:00
|
|
|
credentials {
|
|
|
|
username System.getenv("MAVEN_USER")
|
|
|
|
password System.getenv("MAVEN_PASS")
|
|
|
|
}
|
2022-05-12 00:18:53 +02:00
|
|
|
}
|
|
|
|
}
|
2022-05-12 00:20:18 +02:00
|
|
|
}
|