-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
757 additions
and
743 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import org.jetbrains.gradle.ext.settings | ||
import org.gradle.plugins.ide.idea.model.IdeaLanguageLevel | ||
import org.jetbrains.gradle.ext.Gradle | ||
import org.jetbrains.gradle.ext.runConfigurations | ||
|
||
plugins { | ||
id("org.jetbrains.kotlin.jvm") version embeddedKotlinVersion | ||
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.7" | ||
id("dev.redstudio.gradleembeder") version "1.0" | ||
id("io.freefair.lombok") version "8.3" | ||
id("maven-publish") | ||
id("java-library") | ||
} | ||
|
||
allprojects { | ||
apply(plugin = "org.jetbrains.gradle.plugin.idea-ext") | ||
apply(plugin = "io.freefair.lombok") | ||
apply(plugin = "java-library") | ||
apply(plugin = "dev.redstudio.gradleembeder") | ||
apply(plugin = "maven-publish") | ||
|
||
group = "dev.redstudio" | ||
version = "0.5-Dev-2" // Versioning must follow Ragnarök versioning convention: https://shor.cz/ragnarok_versioning_convention | ||
|
||
repositories { | ||
gradlePluginPortal() | ||
} | ||
|
||
idea { | ||
module { | ||
excludeDirs = setOf( | ||
file(".github"), file(".gradle"), file(".idea"), file("build"), file("gradle"), file("run") | ||
) | ||
} | ||
} | ||
|
||
// Set the toolchain version to decouple the Java we run Gradle with from the Java used to compile and run the mod | ||
java { | ||
toolchain { | ||
languageVersion.set(JavaLanguageVersion.of(8)) | ||
// Azul covers the most platforms for Java 8 toolchains, crucially including macOS arm64 | ||
vendor.set(JvmVendorSpec.AZUL) | ||
} | ||
withJavadocJar() | ||
} | ||
|
||
tasks.withType<JavaCompile>().configureEach { | ||
options.encoding = "UTF-8" | ||
options.isFork = true | ||
} | ||
} | ||
|
||
idea { | ||
project { | ||
settings { | ||
jdkName = "1.8" | ||
languageLevel = IdeaLanguageLevel("JDK_1_8") | ||
|
||
runConfigurations { | ||
create("MC Client", Gradle::class.java) { | ||
taskNames = setOf("runClient") | ||
} | ||
create("MC Server", Gradle::class.java) { | ||
taskNames = setOf("runServer") | ||
} | ||
create("MC Obfuscated Client", Gradle::class.java) { | ||
taskNames = setOf("runObfClient") | ||
} | ||
create("MC Obfuscated Server", Gradle::class.java) { | ||
taskNames = setOf("runObfServer") | ||
} | ||
create("MC Vanilla Client", Gradle::class.java) { | ||
taskNames = setOf("runVanillaClient") | ||
} | ||
create("MC Vanilla Server", Gradle::class.java) { | ||
taskNames = setOf("runVanillaServer") | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
plugins { | ||
id("com.github.gmazzo.buildconfig") version "4.1.2" | ||
} | ||
|
||
val log4jVersion = "2.17.1" | ||
|
||
dependencies { | ||
embed("net.jafama", "jafama", "2.3.2") | ||
|
||
compileOnly("org.apache.logging.log4j", "log4j-api", log4jVersion) | ||
compileOnly("org.apache.logging.log4j", "log4j-core", log4jVersion) | ||
} | ||
|
||
buildConfig { | ||
packageName(project.group.toString() + ".redcore") | ||
className("ProjectConstants") | ||
|
||
useJavaOutput() | ||
buildConfigField("String", "NAME", provider { "\"Red Core\"" }) | ||
buildConfigField("String", "VERSION", provider { "\"${project.version}\"" }) | ||
buildConfigField("org.apache.logging.log4j.Logger", "LOGGER", "org.apache.logging.log4j.LogManager.getLogger(NAME)") | ||
buildConfigField("dev.redstudio.redcore.logging.RedLogger", "RED_LOGGER", "new RedLogger(NAME, \"https://linkify.cz/RedCoreBugReport\", LOGGER)") | ||
} | ||
|
||
publishing.publications.register("redCore", MavenPublication::class) { | ||
from(components["java"]) | ||
|
||
groupId = project.group.toString() | ||
artifactId = "red-core" | ||
version = project.version.toString() | ||
} |
File renamed without changes.
Oops, something went wrong.