[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() {
|
||||
|
@@ -1,3 +1,4 @@
|
||||
accessWidener v1 named
|
||||
|
||||
accessible method net/minecraft/client/renderer/item/ItemProperties register (Lnet/minecraft/world/item/Item;Lnet/minecraft/resources/ResourceLocation;Lnet/minecraft/client/renderer/item/ClampedItemPropertyFunction;)V
|
||||
accessible method net/minecraft/client/renderer/blockentity/BlockEntityRenderers register (Lnet/minecraft/world/level/block/entity/BlockEntityType;Lnet/minecraft/client/renderer/blockentity/BlockEntityRendererProvider;)V
|
@@ -23,6 +23,5 @@
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
},
|
||||
"refmap": "${refmap_target}refmap.json"
|
||||
}
|
||||
}
|
||||
|
@@ -1,95 +1,70 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.3-SNAPSHOT'
|
||||
id 'idea'
|
||||
id "me.hypherionmc.modutils.modpublisher" version "1.0.+"
|
||||
id 'com.github.johnrengelman.shadow' version '7.0.0'
|
||||
}
|
||||
|
||||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
archivesBaseName = "${mod_name}-fabric-${minecraft_version}"
|
||||
|
||||
configurations {
|
||||
shade
|
||||
}
|
||||
archivesBaseName = "${mod_name.replace(" ", "")}-Fabric-${minecraft_version}"
|
||||
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:${minecraft_version}"
|
||||
mappings loom.officialMojangMappings()
|
||||
modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
|
||||
implementation project(":Common")
|
||||
// Core
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_api}"
|
||||
|
||||
shade "me.hypherionmc.moon-config:core:${moon_config}"
|
||||
shade "me.hypherionmc.moon-config:toml:${moon_config}"
|
||||
shade "com.hypherionmc:rpcsdk:1.0"
|
||||
|
||||
modCompileOnlyApi("com.terraformersmc:modmenu:${mod_menu_version}") {
|
||||
modImplementation("com.terraformersmc:modmenu:${mod_menu_version}") {
|
||||
exclude(group: "net.fabricmc.fabric-api")
|
||||
}
|
||||
|
||||
// Do not edit or remove
|
||||
implementation project(":Common")
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
from sourceSets.main.output
|
||||
configurations = [project.configurations.shade]
|
||||
|
||||
dependencies {
|
||||
relocate 'me.hypherionmc.moonconfig', 'shadow.hypherionmc.moonconfig'
|
||||
}
|
||||
|
||||
setArchiveClassifier('dev-shadow')
|
||||
}
|
||||
|
||||
/**
|
||||
* ===============================================================================
|
||||
* = DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING =
|
||||
* ===============================================================================
|
||||
*/
|
||||
|
||||
unimined.minecraft {
|
||||
fabric {
|
||||
loader fabric_loader
|
||||
accessWidener(project(":Common").file("src/main/resources/${mod_id}.aw"))
|
||||
}
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath = project(":Common").file("src/main/resources/craterlib.aw")
|
||||
runs {
|
||||
client {
|
||||
client()
|
||||
setConfigName("Fabric Client")
|
||||
ideConfigGenerated(true)
|
||||
runDir("run")
|
||||
}
|
||||
server {
|
||||
server()
|
||||
setConfigName("Fabric Server")
|
||||
ideConfigGenerated(true)
|
||||
runDir("run")
|
||||
}
|
||||
}
|
||||
remapJar {
|
||||
inputFile.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
archiveClassifier.set null
|
||||
}
|
||||
|
||||
jar {
|
||||
archiveClassifier.set "dev"
|
||||
}
|
||||
|
||||
processResources {
|
||||
from project(":Common").sourceSets.main.resources
|
||||
inputs.property "version", project.version
|
||||
def buildProps = project.properties.clone()
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand "version": project.version
|
||||
}
|
||||
|
||||
filesMatching('*.mixins.json') {
|
||||
expand "refmap_target": "${archivesBaseName}-"
|
||||
filesMatching(['fabric.mod.json']) {
|
||||
expand buildProps
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
compileTestJava.enabled = false
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
source(project(":Common").sourceSets.main.allSource)
|
||||
}
|
||||
|
||||
jar {
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${mod_name}" }
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Shadowjar Config
|
||||
*/
|
||||
shadowJar {
|
||||
configurations = [project.configurations.shade]
|
||||
dependencies {
|
||||
relocate 'me.hypherionmc.moonconfig', 'shadow.hypherionmc.moonconfig'
|
||||
}
|
||||
setArchiveClassifier("dev-shadow")
|
||||
}
|
||||
|
||||
remapJar {
|
||||
input.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
setArchiveClassifier(null)
|
||||
}
|
||||
|
||||
//reg.configureJarTask(shadowJar)
|
||||
|
||||
/**
|
||||
* Publishing Config
|
||||
*/
|
||||
@@ -101,8 +76,8 @@ publishing {
|
||||
version project.version
|
||||
from components.java
|
||||
|
||||
artifact(jar) {
|
||||
builtBy jar
|
||||
artifact(remapJar) {
|
||||
builtBy remapJar
|
||||
}
|
||||
|
||||
pom.withXml {
|
||||
@@ -110,7 +85,7 @@ publishing {
|
||||
pomNode.dependencies.'*'.findAll() {
|
||||
it.artifactId.text() == 'regutils-joined-fabric' ||
|
||||
it.artifactId.text() == 'core' ||
|
||||
it.artifactId.text() == 'toml' || it.artifactId.text() == "modmenu"
|
||||
it.artifactId.text() == 'toml'
|
||||
}.each() {
|
||||
it.parent().remove(it)
|
||||
}
|
||||
@@ -156,4 +131,3 @@ publisher {
|
||||
|
||||
publishCurseforge.dependsOn(remapJar)
|
||||
publishModrinth.dependsOn(remapJar)
|
||||
|
||||
|
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "craterlib",
|
||||
"id": "${mod_id}",
|
||||
"version": "${version}",
|
||||
"name": "CraterLib",
|
||||
"name": "${mod_name}",
|
||||
"description": "A library mod used by First Dark Development and HypherionSA Mods",
|
||||
"authors": [
|
||||
"HypherionSA",
|
||||
"${mod_author}",
|
||||
"Misha"
|
||||
],
|
||||
"contact": {
|
||||
@@ -27,10 +27,10 @@
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
"craterlib.mixins.json",
|
||||
"craterlib.fabric.mixins.json"
|
||||
"${mod_id}.mixins.json",
|
||||
"${mod_id}.fabric.mixins.json"
|
||||
],
|
||||
"accessWidener": "craterlib.aw",
|
||||
"accessWidener": "${mod_id}.aw",
|
||||
"depends": {
|
||||
"fabricloader": ">=0.14.21",
|
||||
"fabric-api": "*",
|
||||
|
@@ -1,125 +1,64 @@
|
||||
plugins {
|
||||
id "me.hypherionmc.modutils.modpublisher" version "1.0.+"
|
||||
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
|
||||
id 'org.spongepowered.mixin' version '0.7-SNAPSHOT'
|
||||
id 'com.github.johnrengelman.shadow' version '7.0.0'
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'net.minecraftforge.gradle'
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'org.spongepowered.mixin'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
|
||||
archivesBaseName = "${mod_name}-forge-${minecraft_version}"
|
||||
|
||||
mixin {
|
||||
add sourceSets.main, "${mod_id}.refmap.json"
|
||||
|
||||
config "${mod_id}.mixins.json"
|
||||
config "${mod_id}.forge.mixins.json"
|
||||
}
|
||||
|
||||
minecraft {
|
||||
mappings channel: 'official', version: minecraft_version
|
||||
|
||||
if (project.hasProperty('forge_ats_enabled') && project.findProperty('forge_ats_enabled').toBoolean()) {
|
||||
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||
project.logger.debug('Forge Access Transformers are enabled for this project.')
|
||||
}
|
||||
|
||||
runs {
|
||||
client {
|
||||
workingDirectory project.file('run')
|
||||
ideaModule "${rootProject.name}.${project.name}.main"
|
||||
taskName 'Client'
|
||||
args "-mixin.config=${mod_id}.mixins.json", "-mixin.config=${mod_id}.forge.mixins.json"
|
||||
mods {
|
||||
modClientRun {
|
||||
source sourceSets.main
|
||||
source project(":Common").sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
workingDirectory project.file('run')
|
||||
ideaModule "${rootProject.name}.${project.name}.main"
|
||||
taskName 'Server'
|
||||
args "-mixin.config=${mod_id}.mixins.json", "-mixin.config=${mod_id}.forge.mixins.json"
|
||||
mods {
|
||||
modServerRun {
|
||||
source sourceSets.main
|
||||
source project(":Common").sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data {
|
||||
workingDirectory project.file('run')
|
||||
ideaModule "${rootProject.name}.${project.name}.main"
|
||||
args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
|
||||
taskName 'Data'
|
||||
args "-mixin.config=${mod_id}.mixins.json", "-mixin.config=${mod_id}.forge.mixins.json"
|
||||
mods {
|
||||
modDataRun {
|
||||
source sourceSets.main
|
||||
source project(":Common").sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets.main.resources.srcDir 'src/generated/resources'
|
||||
|
||||
configurations {
|
||||
shade
|
||||
implementation.extendsFrom shade
|
||||
}
|
||||
// Adjust the output jar name here
|
||||
archivesBaseName = "${mod_name.replace(" ", "")}-Forge-${minecraft_version}"
|
||||
|
||||
dependencies {
|
||||
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
||||
compileOnly project(":Common")
|
||||
annotationProcessor 'org.spongepowered:mixin:0.8.4-SNAPSHOT:processor'
|
||||
|
||||
shade "me.hypherionmc.moon-config:core:${moon_config}"
|
||||
shade "me.hypherionmc.moon-config:toml:${moon_config}"
|
||||
shade "com.hypherionmc:rpcsdk:1.0"
|
||||
|
||||
// Do not edit or remove
|
||||
implementation project(":Common")
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
source(project(":Common").sourceSets.main.allSource)
|
||||
shadowJar {
|
||||
from sourceSets.main.output
|
||||
configurations = [project.configurations.shade]
|
||||
|
||||
dependencies {
|
||||
relocate 'me.hypherionmc.moonconfig', 'shadow.hypherionmc.moonconfig'
|
||||
}
|
||||
|
||||
setArchiveClassifier('dev-shadow')
|
||||
}
|
||||
|
||||
/**
|
||||
* ===============================================================================
|
||||
* = DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING =
|
||||
* ===============================================================================
|
||||
*/
|
||||
|
||||
unimined.minecraft {
|
||||
minecraftForge {
|
||||
loader forge_version
|
||||
mixinConfig("${mod_id}.mixins.json", "${mod_id}.forge.mixins.json")
|
||||
}
|
||||
}
|
||||
|
||||
remapJar {
|
||||
inputFile.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
archiveClassifier.set null
|
||||
}
|
||||
|
||||
jar {
|
||||
archiveClassifier.set "dev"
|
||||
}
|
||||
|
||||
processResources {
|
||||
from project(":Common").sourceSets.main.resources
|
||||
def buildProps = project.properties.clone()
|
||||
|
||||
filesMatching('*.mixins.json') {
|
||||
expand "refmap_target": "${mod_id}."
|
||||
filesMatching("META-INF/mods.toml") {
|
||||
expand buildProps
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Shadowjar Config
|
||||
*/
|
||||
shadowJar {
|
||||
configurations = [project.configurations.shade]
|
||||
dependencies {
|
||||
relocate 'me.hypherionmc.moonconfig', 'shadow.hypherionmc.moonconfig'
|
||||
}
|
||||
setArchiveClassifier('')
|
||||
compileTestJava.enabled = false
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
source(project(":Common").sourceSets.main.allSource)
|
||||
}
|
||||
|
||||
assemble.dependsOn(shadowJar)
|
||||
|
||||
reobf {
|
||||
shadowJar {}
|
||||
}
|
||||
|
||||
//reg.configureJarTask(shadowJar)
|
||||
|
||||
/**
|
||||
* Publishing Config
|
||||
*/
|
||||
@@ -129,7 +68,12 @@ publishing {
|
||||
groupId project.group
|
||||
artifactId project.archivesBaseName
|
||||
version project.version
|
||||
artifact shadowJar
|
||||
from components.java
|
||||
|
||||
artifact(remapJar) {
|
||||
builtBy remapJar
|
||||
}
|
||||
|
||||
pom.withXml {
|
||||
Node pomNode = asNode()
|
||||
pomNode.dependencies.'*'.findAll() {
|
||||
@@ -142,6 +86,7 @@ publishing {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url "https://maven.firstdark.dev/" + (project.release ? "releases" : "snapshots")
|
||||
@@ -162,15 +107,13 @@ publisher {
|
||||
curseID = curse_id
|
||||
modrinthID = modrinth_id
|
||||
versionType = "release"
|
||||
changelog = rootProject.file("changelog-forge.md")
|
||||
changelog = rootProject.file("changelog-fabric.md")
|
||||
version = "${minecraft_version}-${project.version}"
|
||||
displayName = "[FORGE 1.20.2] CraterLib - ${project.version}"
|
||||
gameVersions = ["1.20.2"]
|
||||
loaders = ["forge"]
|
||||
artifact = shadowJar
|
||||
artifact = remapJar
|
||||
}
|
||||
|
||||
publishCurseforge.dependsOn(reobfShadowJar)
|
||||
publishModrinth.dependsOn(reobfShadowJar)
|
||||
|
||||
jar.finalizedBy('reobfJar')
|
||||
publishCurseforge.dependsOn(remapJar)
|
||||
publishModrinth.dependsOn(remapJar)
|
@@ -4,26 +4,26 @@ license = "MIT"
|
||||
issueTrackerURL="https://github.com/firstdarkdev/craterLib/issues"
|
||||
|
||||
[[mods]]
|
||||
modId = "craterlib"
|
||||
version = "${file.jarVersion}"
|
||||
displayName = "CraterLib"
|
||||
modId = "${mod_id}"
|
||||
version = "${version}"
|
||||
displayName = "${mod_name}"
|
||||
displayURL="https://modrinth.com/mod/craterlib"
|
||||
logoFile = "craterlib_logo.png"
|
||||
#credits="Thanks for this example mod goes to Java"
|
||||
authors = "HypherionSA, Zenith"
|
||||
authors = "${mod_author}, Zenith"
|
||||
description = '''
|
||||
A library mod used by First Dark Development and HypherionSA Mods
|
||||
'''
|
||||
displayTest = "MATCH_VERSION"
|
||||
|
||||
[[dependencies.craterlib]]
|
||||
[[dependencies.${mod_id}]]
|
||||
modId = "forge"
|
||||
mandatory = true
|
||||
versionRange = "[46,)"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
|
||||
[[dependencies.craterlib]]
|
||||
[[dependencies.${mod_id}]]
|
||||
modId = "minecraft"
|
||||
mandatory = true
|
||||
versionRange = "[1.20,)"
|
||||
|
@@ -13,6 +13,5 @@
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
},
|
||||
"refmap": "${refmap_target}refmap.json"
|
||||
}
|
||||
}
|
||||
|
117
build.gradle
117
build.gradle
@@ -1,9 +1,13 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
//id 'com.matyrobbrt.mc.registrationutils' version '1.20.1-1.0.0'
|
||||
id 'com.github.johnrengelman.shadow' version '8.0.0' apply false
|
||||
id "xyz.wagyourtail.unimined" version "1.1.0-SNAPSHOT" apply false
|
||||
id "me.hypherionmc.modutils.modpublisher" version "1.0.+"
|
||||
id 'maven-publish'
|
||||
//id 'com.matyrobbrt.mc.registrationutils' version '1.20.1-1.0.0'
|
||||
}
|
||||
|
||||
// TODO Reg Utils
|
||||
/*registrationUtils {
|
||||
group 'com.hypherionmc.craterlib.core.systems.reg'
|
||||
projects {
|
||||
@@ -14,32 +18,58 @@ plugins {
|
||||
}*/
|
||||
|
||||
ext {
|
||||
release = project.properties['release'] ?: false
|
||||
release=project.properties['release'] ?: false
|
||||
}
|
||||
|
||||
def version_base = "${project.version_major}.${project.version_minor}"
|
||||
def final_ver = "${version_base}.${project.version_patch}"
|
||||
var base_version = "${version_major}.${version_minor}"
|
||||
var final_version = "${base_version}.${version_patch}"
|
||||
|
||||
// Jenkins
|
||||
if (System.getenv('BUILD_NUMBER') != null && project.release == false) {
|
||||
final_ver = version_base + "." + System.getenv('BUILD_NUMBER') + "d"
|
||||
// CI Support
|
||||
if (!release && System.getenv('BUILD_NUMBER') != null) {
|
||||
final_version = "${base_version}.${System.getenv('BUILD_NUMBER')}d"
|
||||
}
|
||||
|
||||
version = "${final_ver}"
|
||||
group = project_group
|
||||
version = "${final_version}"
|
||||
|
||||
subprojects {
|
||||
version = "${final_ver}"
|
||||
group = project.group
|
||||
apply plugin: "xyz.wagyourtail.unimined"
|
||||
apply plugin: "java"
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
apply plugin: 'me.hypherionmc.modutils.modpublisher'
|
||||
|
||||
apply plugin: 'java'
|
||||
group = rootProject.group
|
||||
version = rootProject.version
|
||||
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||
//java.withSourcesJar()
|
||||
//java.withJavadocJar()
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = 'First Dark Maven'
|
||||
url = 'https://maven.firstdark.dev/releases/'
|
||||
}
|
||||
maven {
|
||||
name = 'First Dark Mirror'
|
||||
url = 'https://mcentral.firstdark.dev/releases/'
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
shade
|
||||
modCompileOnly
|
||||
implementation.extendsFrom shade
|
||||
compileOnly.extendsFrom modCompileOnly
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "me.hypherionmc.moon-config:core:${moon_config}"
|
||||
implementation "me.hypherionmc.moon-config:toml:${moon_config}"
|
||||
}
|
||||
|
||||
jar {
|
||||
archiveClassifier = 'slim'
|
||||
|
||||
manifest {
|
||||
attributes([
|
||||
'Specification-Title' : mod_name,
|
||||
@@ -56,21 +86,19 @@ subprojects {
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = 'First Dark Maven'
|
||||
url = 'https://maven.firstdark.dev/releases/'
|
||||
}
|
||||
maven {
|
||||
name = 'First Dark Mirror'
|
||||
url = 'https://mcentral.firstdark.dev/releases/'
|
||||
}
|
||||
}
|
||||
/**
|
||||
* ===============================================================================
|
||||
* = DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING =
|
||||
* ===============================================================================
|
||||
*/
|
||||
|
||||
dependencies {
|
||||
implementation "me.hypherionmc.moon-config:core:${moon_config}"
|
||||
implementation "me.hypherionmc.moon-config:toml:${moon_config}"
|
||||
unimined.minecraft(sourceSets.main, true) {
|
||||
version minecraft_version
|
||||
|
||||
mappings {
|
||||
mojmap()
|
||||
devNamespace "mojmap"
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
@@ -78,9 +106,6 @@ subprojects {
|
||||
it.options.release = 17
|
||||
}
|
||||
|
||||
// Disables Gradle's custom module metadata from being published to maven. The
|
||||
// metadata includes mapped dependencies which are not reasonably consumable by
|
||||
// other mod developers.
|
||||
tasks.withType(GenerateModuleMetadata) {
|
||||
enabled = false
|
||||
}
|
||||
@@ -90,11 +115,11 @@ subprojects {
|
||||
}
|
||||
|
||||
if (project.name !== 'Common') {
|
||||
task delDevJar {
|
||||
tasks.register('delDevJar') {
|
||||
doLast {
|
||||
def tree = fileTree('build/libs')
|
||||
tree.include '**/*-dev.jar'
|
||||
tree.include '**/*-dev-shadow.jar'
|
||||
tree.include '**/*-dev.jar'
|
||||
tree.include '**/*-all.jar'
|
||||
tree.include '**/*-slim.jar'
|
||||
tree.each { it.delete() }
|
||||
@@ -102,7 +127,7 @@ subprojects {
|
||||
}
|
||||
build.finalizedBy delDevJar
|
||||
|
||||
task copyAllArtifacts(type: Copy) {
|
||||
tasks.register('copyAllArtifacts', Copy) {
|
||||
from "$buildDir/libs"
|
||||
into "$rootDir/artifacts"
|
||||
include("*.jar")
|
||||
@@ -113,32 +138,32 @@ subprojects {
|
||||
}
|
||||
|
||||
// Standalone or Module JARS
|
||||
task rpcJar(type: Jar) {
|
||||
tasks.register('rpcJar', Jar) {
|
||||
dependsOn(compileJava)
|
||||
includeEmptyDirs = false
|
||||
archivesBaseName = "${mod_name}-modules"
|
||||
version = final_ver;
|
||||
archivesBaseName = "${mod_name}-modules-${minecraft_version}"
|
||||
version = final_version
|
||||
setArchiveClassifier("rpc")
|
||||
|
||||
from project(":Common").sourceSets.main.output
|
||||
}
|
||||
|
||||
task configJar(type: Jar) {
|
||||
tasks.register('configJar', Jar) {
|
||||
dependsOn(compileJava)
|
||||
includeEmptyDirs = false
|
||||
archivesBaseName = "${mod_name}-modules"
|
||||
version = final_ver;
|
||||
archivesBaseName = "${mod_name}-modules-${minecraft_version}"
|
||||
version = final_version
|
||||
setArchiveClassifier("config")
|
||||
|
||||
from project(":Common").sourceSets.main.output
|
||||
include("**\\core\\config\\**\\*", "**\\**\\CraterConstants.*")
|
||||
}
|
||||
|
||||
task eventsJar(type: Jar) {
|
||||
tasks.register('eventsJar', Jar) {
|
||||
dependsOn(compileJava)
|
||||
includeEmptyDirs = false
|
||||
archivesBaseName = "${mod_name}-modules"
|
||||
version = final_ver;
|
||||
archivesBaseName = "${mod_name}-modules-${minecraft_version}"
|
||||
version = final_version
|
||||
setArchiveClassifier("events")
|
||||
|
||||
from project(":Common").sourceSets.main.output
|
||||
@@ -149,7 +174,7 @@ publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
groupId project.group
|
||||
artifactId "${mod_name}-modules"
|
||||
artifactId "${mod_name}-modules-${minecraft_version}"
|
||||
version project.version
|
||||
|
||||
artifact rpcJar
|
||||
|
@@ -1,34 +1,23 @@
|
||||
# Gradle
|
||||
fabric.loom.multiProjectOptimisation = true
|
||||
|
||||
# Project
|
||||
#Project
|
||||
version_major=1
|
||||
version_minor=0
|
||||
version_patch=3
|
||||
group=com.hypherionmc.craterlib
|
||||
project_group=com.hypherionmc.craterlib
|
||||
|
||||
# Common
|
||||
#Mod
|
||||
mod_author=HypherionSA
|
||||
mod_id=craterlib
|
||||
mod_name=CraterLib
|
||||
|
||||
# Shared
|
||||
minecraft_version=1.20.2
|
||||
common_runs_enabled=false
|
||||
common_client_run_name=Common Client
|
||||
common_server_run_name=Common Server
|
||||
|
||||
# Fabric
|
||||
fabric_loader=0.14.22
|
||||
fabric_api=0.89.0+1.20.2
|
||||
|
||||
# Forge
|
||||
forge_version=48.0.6
|
||||
forge_ats_enabled=true
|
||||
|
||||
# Fabric
|
||||
fabric_version=0.89.0+1.20.2
|
||||
fabric_loader_version=0.14.22
|
||||
|
||||
# Mod options
|
||||
mod_name=CraterLib
|
||||
mod_author=HypherionSA
|
||||
mod_id=craterlib
|
||||
|
||||
# Gradle
|
||||
org.gradle.jvmargs=-Xmx3G
|
||||
org.gradle.daemon=false
|
||||
|
||||
# Dependencies
|
||||
mod_menu_version=8.0.0-beta.2
|
||||
@@ -37,3 +26,7 @@ moon_config=1.0.9
|
||||
# Publishing
|
||||
curse_id=867099
|
||||
modrinth_id=Nn8Wasaq
|
||||
|
||||
# Gradle
|
||||
org.gradle.jvmargs=-Xmx3G
|
||||
org.gradle.daemon=false
|
@@ -2,10 +2,10 @@ pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
maven {
|
||||
url "https://maven.firstdark.dev/releases"
|
||||
url "https://mcentral.firstdark.dev/releases"
|
||||
}
|
||||
maven {
|
||||
url "https://mcentral.firstdark.dev/releases"
|
||||
url "https://maven.firstdark.dev/releases"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user