[DEV] Add Orion Plugin
This commit is contained in:
@@ -1,17 +1,14 @@
|
|||||||
archivesBaseName = "${mod_name.replace(" ", "")}-Common-${minecraft_version}"
|
archivesBaseName = "${mod_name.replace(" ", "")}-Common-${minecraft_version}"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "com.hypherionmc:rpcsdk:1.0"
|
|
||||||
implementation("me.hypherionmc.sdlink:mcdiscordformatter-1.20.3:2.0.0")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
from sourceSets.main.output
|
from sourceSets.main.output
|
||||||
dependencies {
|
configurations = [project.configurations.shade]
|
||||||
include(dependency("me.hypherionmc.moon-config:core:${moon_config}"))
|
|
||||||
include(dependency("me.hypherionmc.moon-config:toml:${moon_config}"))
|
|
||||||
include(dependency("me.hypherionmc.sdlink:mcdiscordformatter-1.20.3:2.0.0"))
|
|
||||||
|
|
||||||
|
dependencies {
|
||||||
relocate 'me.hypherionmc.moonconfig', 'shadow.hypherionmc.moonconfig'
|
relocate 'me.hypherionmc.moonconfig', 'shadow.hypherionmc.moonconfig'
|
||||||
relocate 'me.hypherionmc.mcdiscordformatter', 'shadow.hypherionmc.mcdiscordformatter'
|
relocate 'me.hypherionmc.mcdiscordformatter', 'shadow.hypherionmc.mcdiscordformatter'
|
||||||
}
|
}
|
||||||
@@ -65,12 +62,6 @@ publishing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven rootProject.orion.getPublishingMaven()
|
||||||
url "https://maven.firstdark.dev/" + (project.release ? "releases" : "snapshots")
|
|
||||||
credentials {
|
|
||||||
username System.getenv("MAVEN_USER")
|
|
||||||
password System.getenv("MAVEN_PASS")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -4,11 +4,6 @@ dependencies {
|
|||||||
// Core
|
// Core
|
||||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_api}"
|
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"
|
|
||||||
shade ("me.hypherionmc.sdlink:mcdiscordformatter-1.20.3:2.0.0")
|
|
||||||
|
|
||||||
modImplementation("com.terraformersmc:modmenu:${mod_menu_version}") {
|
modImplementation("com.terraformersmc:modmenu:${mod_menu_version}") {
|
||||||
exclude(group: "net.fabricmc.fabric-api")
|
exclude(group: "net.fabricmc.fabric-api")
|
||||||
}
|
}
|
||||||
@@ -95,13 +90,7 @@ publishing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven rootProject.orion.getPublishingMaven()
|
||||||
url "https://maven.firstdark.dev/" + (project.release ? "releases" : "snapshots")
|
|
||||||
credentials {
|
|
||||||
username System.getenv("MAVEN_USER")
|
|
||||||
password System.getenv("MAVEN_PASS")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2,10 +2,6 @@
|
|||||||
archivesBaseName = "${mod_name.replace(" ", "")}-Forge-${minecraft_version}"
|
archivesBaseName = "${mod_name.replace(" ", "")}-Forge-${minecraft_version}"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
shade "me.hypherionmc.moon-config:core:${moon_config}"
|
|
||||||
shade "me.hypherionmc.moon-config:toml:${moon_config}"
|
|
||||||
shade "com.hypherionmc:rpcsdk:1.0"
|
|
||||||
shade ("me.hypherionmc.sdlink:mcdiscordformatter-1.20.3:2.0.0")
|
|
||||||
|
|
||||||
// Do not edit or remove
|
// Do not edit or remove
|
||||||
implementation project(":Common")
|
implementation project(":Common")
|
||||||
@@ -90,13 +86,7 @@ publishing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven rootProject.orion.getPublishingMaven()
|
||||||
url "https://maven.firstdark.dev/" + (project.release ? "releases" : "snapshots")
|
|
||||||
credentials {
|
|
||||||
username System.getenv("MAVEN_USER")
|
|
||||||
password System.getenv("MAVEN_PASS")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,11 +1,6 @@
|
|||||||
// Adjust the output jar name here
|
|
||||||
archivesBaseName = "${mod_name.replace(" ", "")}-NeoForge-${minecraft_version}"
|
archivesBaseName = "${mod_name.replace(" ", "")}-NeoForge-${minecraft_version}"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
shade "me.hypherionmc.moon-config:core:${moon_config}"
|
|
||||||
shade "me.hypherionmc.moon-config:toml:${moon_config}"
|
|
||||||
shade "com.hypherionmc:rpcsdk:1.0"
|
|
||||||
shade ("me.hypherionmc.sdlink:mcdiscordformatter-1.20.3:2.0.0")
|
|
||||||
|
|
||||||
// Do not edit or remove
|
// Do not edit or remove
|
||||||
implementation project(":Common")
|
implementation project(":Common")
|
||||||
@@ -90,13 +85,7 @@ publishing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven rootProject.orion.getPublishingMaven()
|
||||||
url "https://maven.firstdark.dev/" + (project.release ? "releases" : "snapshots")
|
|
||||||
credentials {
|
|
||||||
username System.getenv("MAVEN_USER")
|
|
||||||
password System.getenv("MAVEN_PASS")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
132
build.gradle
132
build.gradle
@@ -1,25 +1,25 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'java'
|
id 'java'
|
||||||
id 'com.github.johnrengelman.shadow' version '8.0.0' apply false
|
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
|
||||||
id "xyz.wagyourtail.unimined" version "1.1.0-SNAPSHOT" apply false
|
id "xyz.wagyourtail.unimined" version "1.1.0-SNAPSHOT" apply false
|
||||||
id "me.hypherionmc.modutils.modpublisher" version "1.0.23+"
|
id "me.hypherionmc.modutils.modpublisher" version "1.0.23+"
|
||||||
|
id "com.hypherionmc.modutils.orion" version "1.0.6"
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
orion {
|
||||||
release = project.properties['release'] ?: false
|
multiProject = true
|
||||||
|
enableMirrorMaven = true
|
||||||
|
enableReleasesMaven = true
|
||||||
|
|
||||||
|
dopplerToken = System.getenv("DOPPLER_KEY")
|
||||||
|
|
||||||
|
versioning {
|
||||||
|
identifier("${release_type}")
|
||||||
}
|
}
|
||||||
|
|
||||||
var base_version = "${version_major}.${version_minor}"
|
|
||||||
var final_version = "${base_version}.${version_patch}"
|
|
||||||
|
|
||||||
// CI Support
|
|
||||||
if (!release && System.getenv('BUILD_NUMBER') != null) {
|
|
||||||
final_version = "${base_version}.${System.getenv('BUILD_NUMBER')}d"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
group = project_group
|
group = project_group
|
||||||
version = "${final_version}"
|
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
apply plugin: "xyz.wagyourtail.unimined"
|
apply plugin: "xyz.wagyourtail.unimined"
|
||||||
@@ -28,22 +28,11 @@ subprojects {
|
|||||||
apply plugin: 'com.github.johnrengelman.shadow'
|
apply plugin: 'com.github.johnrengelman.shadow'
|
||||||
apply plugin: 'me.hypherionmc.modutils.modpublisher'
|
apply plugin: 'me.hypherionmc.modutils.modpublisher'
|
||||||
|
|
||||||
group = rootProject.group
|
|
||||||
version = rootProject.version
|
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven {
|
|
||||||
name = 'First Dark Maven'
|
|
||||||
url = 'https://maven.firstdark.dev/releases/'
|
|
||||||
}
|
|
||||||
maven {
|
|
||||||
name = 'First Dark Mirror'
|
|
||||||
url = 'https://mcentral.firstdark.dev/releases/'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
@@ -54,10 +43,13 @@ subprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "me.hypherionmc.moon-config:core:${moon_config}"
|
// All Projects
|
||||||
implementation "me.hypherionmc.moon-config:toml:${moon_config}"
|
shade "me.hypherionmc.moon-config:core:${moon_config}"
|
||||||
shade "net.kyori:adventure-api:4.16.0"
|
shade "me.hypherionmc.moon-config:toml:${moon_config}"
|
||||||
shade "net.kyori:adventure-text-serializer-gson:4.16.0"
|
shade "com.hypherionmc:rpcsdk:${rpc_sdk}"
|
||||||
|
shade "me.hypherionmc.sdlink:mcdiscordformatter-1.20.3:${discord_formatter}"
|
||||||
|
shade "net.kyori:adventure-api:${adventure}"
|
||||||
|
shade "net.kyori:adventure-text-serializer-gson:${adventure}"
|
||||||
|
|
||||||
compileOnly("org.projectlombok:lombok:${lombok}")
|
compileOnly("org.projectlombok:lombok:${lombok}")
|
||||||
annotationProcessor("org.projectlombok:lombok:${lombok}")
|
annotationProcessor("org.projectlombok:lombok:${lombok}")
|
||||||
@@ -75,7 +67,7 @@ subprojects {
|
|||||||
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
||||||
'Timestamp' : System.currentTimeMillis(),
|
'Timestamp' : System.currentTimeMillis(),
|
||||||
'Built-On-Java' : "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})",
|
'Built-On-Java' : "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})",
|
||||||
'Build-On-Minecraft' : minecraft_version
|
'Built-On-Minecraft' : minecraft_version
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -85,7 +77,6 @@ subprojects {
|
|||||||
* = DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING =
|
* = DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING =
|
||||||
* ===============================================================================
|
* ===============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
unimined.minecraft(sourceSets.main, true) {
|
unimined.minecraft(sourceSets.main, true) {
|
||||||
version minecraft_version
|
version minecraft_version
|
||||||
|
|
||||||
@@ -100,90 +91,9 @@ subprojects {
|
|||||||
it.options.release = 17
|
it.options.release = 17
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(GenerateModuleMetadata) {
|
tasks.withType(GenerateModuleMetadata).configureEach {
|
||||||
enabled = false
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|
||||||
clean {
|
|
||||||
delete "$rootDir/artifacts"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (project.name !== 'Common') {
|
// TODO MODULE JARS
|
||||||
tasks.register('delDevJar') {
|
|
||||||
doLast {
|
|
||||||
def tree = fileTree('build/libs')
|
|
||||||
tree.include '**/*-dev-shadow.jar'
|
|
||||||
tree.include '**/*-dev.jar'
|
|
||||||
tree.include '**/*-all.jar'
|
|
||||||
tree.include '**/*-slim.jar'
|
|
||||||
tree.each { it.delete() }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
build.finalizedBy delDevJar
|
|
||||||
|
|
||||||
tasks.register('copyAllArtifacts', Copy) {
|
|
||||||
from "$buildDir/libs"
|
|
||||||
into "$rootDir/artifacts"
|
|
||||||
include("*.jar")
|
|
||||||
}
|
|
||||||
|
|
||||||
build.finalizedBy(copyAllArtifacts)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Standalone or Module JARS
|
|
||||||
tasks.register('rpcJar', Jar) {
|
|
||||||
dependsOn(compileJava)
|
|
||||||
includeEmptyDirs = false
|
|
||||||
archivesBaseName = "${mod_name}-modules-${minecraft_version}"
|
|
||||||
version = final_version
|
|
||||||
setArchiveClassifier("rpc")
|
|
||||||
|
|
||||||
from project(":Common").sourceSets.main.output
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register('configJar', Jar) {
|
|
||||||
dependsOn(compileJava)
|
|
||||||
includeEmptyDirs = false
|
|
||||||
archivesBaseName = "${mod_name}-modules-${minecraft_version}"
|
|
||||||
version = final_version
|
|
||||||
setArchiveClassifier("config")
|
|
||||||
|
|
||||||
from project(":Common").sourceSets.main.output
|
|
||||||
include("**\\core\\config\\**\\*", "**\\**\\CraterConstants.*")
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register('eventsJar', Jar) {
|
|
||||||
dependsOn(compileJava)
|
|
||||||
includeEmptyDirs = false
|
|
||||||
archivesBaseName = "${mod_name}-modules-${minecraft_version}"
|
|
||||||
version = final_version
|
|
||||||
setArchiveClassifier("events")
|
|
||||||
|
|
||||||
from project(":Common").sourceSets.main.output
|
|
||||||
include("**\\core\\event\\**\\*", "**\\**\\CraterConstants.*")
|
|
||||||
}
|
|
||||||
|
|
||||||
publishing {
|
|
||||||
publications {
|
|
||||||
mavenJava(MavenPublication) {
|
|
||||||
groupId project.group
|
|
||||||
artifactId "${mod_name}-modules-${minecraft_version}"
|
|
||||||
version project.version
|
|
||||||
|
|
||||||
artifact rpcJar
|
|
||||||
artifact eventsJar
|
|
||||||
artifact configJar
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
maven {
|
|
||||||
url "https://maven.firstdark.dev/" + (project.release ? "releases" : "snapshots")
|
|
||||||
credentials {
|
|
||||||
username System.getenv("MAVEN_USER")
|
|
||||||
password System.getenv("MAVEN_PASS")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,7 +1,7 @@
|
|||||||
#Project
|
#Project
|
||||||
version_major=1
|
version_major=2
|
||||||
version_minor=1
|
version_minor=0
|
||||||
version_patch=2
|
version_patch=0
|
||||||
|
|
||||||
#Mod
|
#Mod
|
||||||
mod_author=HypherionSA
|
mod_author=HypherionSA
|
||||||
@@ -26,10 +26,14 @@ neoforge_version=73-beta
|
|||||||
mod_menu_version=8.0.0-beta.2
|
mod_menu_version=8.0.0-beta.2
|
||||||
moon_config=1.0.9
|
moon_config=1.0.9
|
||||||
lombok=1.18.32
|
lombok=1.18.32
|
||||||
|
adventure=4.16.0
|
||||||
|
rpc_sdk=1.0
|
||||||
|
discord_formatter=2.0.0
|
||||||
|
|
||||||
# Publishing
|
# Publishing
|
||||||
curse_id=867099
|
curse_id=867099
|
||||||
modrinth_id=Nn8Wasaq
|
modrinth_id=Nn8Wasaq
|
||||||
|
release_type=experimental
|
||||||
|
|
||||||
# Gradle
|
# Gradle
|
||||||
org.gradle.jvmargs=-Xmx3G
|
org.gradle.jvmargs=-Xmx3G
|
||||||
|
Reference in New Issue
Block a user