forked from mirrors/cobblemon
gradle and build improvements
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
import ca.stellardrift.build.configurate.ConfigFormats
|
||||
import ca.stellardrift.build.configurate.catalog.PolyglotVersionCatalogExtension
|
||||
|
||||
plugins {
|
||||
id("ca.stellardrift.polyglot-version-catalogs") version "5.0.1"
|
||||
}
|
||||
|
||||
extensions.configure<PolyglotVersionCatalogExtension> {
|
||||
from(ConfigFormats.YAML, file("../gradle/libs.versions.yml"))
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
plugins {
|
||||
`java-library`
|
||||
}
|
||||
|
||||
tasks {
|
||||
val collectJars by registering(Copy::class) {
|
||||
val tasks = subprojects.filter { it.path != ":common" }.map { it.tasks.named("remapJar") }
|
||||
dependsOn(tasks)
|
||||
|
||||
from(tasks)
|
||||
into(buildDir.resolve("libs"))
|
||||
}
|
||||
|
||||
assemble {
|
||||
dependsOn(collectJars)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
+2
-3
@@ -1,13 +1,12 @@
|
||||
plugins {
|
||||
base
|
||||
id("cobblemon.root-conventions")
|
||||
id ("net.nemerosa.versioning") version "2.8.2"
|
||||
}
|
||||
|
||||
group = "com.cobblemon.mod"
|
||||
version = "${project.property("mod_version")}+${project.property("mc_version")}"
|
||||
|
||||
val isSnapshot = project.property("snapshot")?.equals("true") ?: false
|
||||
if (isSnapshot) {
|
||||
version = "$version-${versioning.info.branch}-${versioning.info.build}"
|
||||
val fixedBranchName = versioning.info.branch.substringAfter("/")
|
||||
version = "$version-${fixedBranchName}-${versioning.info.build}"
|
||||
}
|
||||
|
||||
+18
-24
@@ -1,5 +1,5 @@
|
||||
import extensions.isSnapshot
|
||||
import extensions.version
|
||||
import utilities.isSnapshot
|
||||
import utilities.version
|
||||
import java.time.OffsetDateTime
|
||||
import java.time.ZoneOffset
|
||||
import java.time.format.DateTimeFormatter
|
||||
@@ -20,7 +20,7 @@ plugins {
|
||||
|
||||
id("net.kyori.blossom")
|
||||
id("org.jetbrains.gradle.plugin.idea-ext")
|
||||
id ("net.nemerosa.versioning") version "2.8.2"
|
||||
id("net.nemerosa.versioning") version "2.8.2"
|
||||
}
|
||||
|
||||
architectury {
|
||||
@@ -34,31 +34,26 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(libs.stdlib)
|
||||
implementation(libs.reflect)
|
||||
|
||||
modImplementation(libs.fabricLoader)
|
||||
//Flywheel has no common dep so just pick one and don't use any platform specific code in common
|
||||
// modCompileOnly(libs.flywheelFabric)
|
||||
implementation(libs.bundles.kotlin)
|
||||
modImplementation(libs.fabric.loader)
|
||||
modApi(libs.molang)
|
||||
compileOnlyApi(libs.jeiApi)
|
||||
modCompileOnly(libs.adornFabric)
|
||||
modCompileOnly(libs.lambDynamicLights) { isTransitive = false }
|
||||
|
||||
// For Showdown
|
||||
// Integrations
|
||||
compileOnlyApi(libs.jei.api)
|
||||
modCompileOnly(libs.bundles.fabric.integrations.compileOnly) {
|
||||
isTransitive = false
|
||||
}
|
||||
// Flywheel has no common dep so just pick one and don't use any platform specific code in common
|
||||
// modCompileOnly(libs.flywheelFabric)
|
||||
|
||||
// Showdown
|
||||
modCompileOnly(libs.graal)
|
||||
|
||||
//shadowCommon group: 'commons-io', name: 'commons-io', version: '2.6'
|
||||
// Data Storage
|
||||
modCompileOnly(libs.bundles.mongo)
|
||||
|
||||
// For datastore
|
||||
modCompileOnly(libs.mongoDriverCore)
|
||||
modCompileOnly(libs.mongoDriverSync)
|
||||
|
||||
testImplementation(libs.fabricJunit)
|
||||
testImplementation(libs.junitParams)
|
||||
testImplementation(libs.mockito)
|
||||
testImplementation(libs.mockk)
|
||||
testImplementation(libs.classgraph)
|
||||
// Unit Testing
|
||||
testImplementation(libs.bundles.unitTesting)
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
@@ -94,7 +89,6 @@ sourceSets {
|
||||
property("gitCommit", versioning.info.commit)
|
||||
property("branch", versioning.info.branch)
|
||||
System.getProperty("buildNumber")?.let { property("buildNumber", it) }
|
||||
property("timestamp", OffsetDateTime.now(ZoneOffset.UTC).format(DateTimeFormatter.ofPattern("MM/dd/yyyy hh:mm:ss")) + " UTC")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ public final class CrashReportMixin {
|
||||
cobblemon.add("Is Snapshot", CobblemonBuildDetails.SNAPSHOT);
|
||||
cobblemon.add("Git Commit", CobblemonBuildDetails.INSTANCE.smallCommitHash() + " (" + "https://gitlab.com/cable-mc/cobblemon/-/commit/" + CobblemonBuildDetails.GIT_COMMIT + ")");
|
||||
cobblemon.add("Branch", CobblemonBuildDetails.BRANCH);
|
||||
cobblemon.add("Timestamp", CobblemonBuildDetails.TIMESTAMP);
|
||||
|
||||
cobblemon.addStackTrace(builder);
|
||||
builder.append("\n\n");
|
||||
|
||||
@@ -10,7 +10,6 @@ object CobblemonBuildDetails {
|
||||
|
||||
const val GIT_COMMIT = "{{ gitCommit | default("Not Specified") }}"
|
||||
const val BRANCH = "{{ branch | default("Not Specified") }}"
|
||||
const val TIMESTAMP = "{{ timestamp }}"
|
||||
|
||||
fun smallCommitHash(): String {
|
||||
return this.GIT_COMMIT.substring(0, 7)
|
||||
|
||||
@@ -179,7 +179,6 @@ object Cobblemon {
|
||||
if(CobblemonBuildDetails.SNAPSHOT) {
|
||||
this.LOGGER.info(" - Git Commit: ${smallCommitHash()} (https://gitlab.com/cable-mc/cobblemon/-/commit/${CobblemonBuildDetails.GIT_COMMIT})")
|
||||
this.LOGGER.info(" - Branch: ${CobblemonBuildDetails.BRANCH}")
|
||||
this.LOGGER.info(" - Timestamp: ${CobblemonBuildDetails.TIMESTAMP}")
|
||||
}
|
||||
|
||||
implementation.registerPermissionValidator()
|
||||
|
||||
@@ -65,12 +65,6 @@ object CobblemonInfoCommand {
|
||||
.append(this.SPACE)
|
||||
.append(CobblemonBuildDetails.BRANCH)
|
||||
|
||||
message.append(this.NEW_LINE)
|
||||
.append(this.INDENT)
|
||||
.append(Text.literal("Timestamp:").styled { it.withColor(Formatting.GRAY) })
|
||||
.append(this.SPACE)
|
||||
.append(CobblemonBuildDetails.TIMESTAMP)
|
||||
|
||||
ctx.source.sendMessage(message)
|
||||
0
|
||||
}
|
||||
|
||||
+13
-15
@@ -10,7 +10,7 @@
|
||||
|
||||
configurations.all {
|
||||
resolutionStrategy {
|
||||
force(libs.fabricLoader)
|
||||
force(libs.fabric.loader)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,22 +52,20 @@ dependencies {
|
||||
isTransitive = false
|
||||
}
|
||||
|
||||
modImplementation(libs.fabricLoader)
|
||||
modApi(libs.fabricApi)
|
||||
modApi(libs.fabricKotlin)
|
||||
modApi(libs.fabricPermissionsApi)
|
||||
modCompileOnly(libs.lambDynamicLights) { isTransitive = false }
|
||||
modRuntimeOnly(libs.jeiFabric)
|
||||
modCompileOnly(libs.adornFabric)
|
||||
modImplementation(libs.fabric.loader)
|
||||
modApi(libs.fabric.api)
|
||||
modApi(libs.bundles.fabric)
|
||||
|
||||
modCompileOnly(libs.bundles.fabric.integrations.compileOnly) {
|
||||
isTransitive = false
|
||||
}
|
||||
modRuntimeOnly(libs.jei.fabric)
|
||||
// modImplementation(libs.flywheelFabric)
|
||||
// include(libs.flywheelFabric)
|
||||
|
||||
listOf(
|
||||
libs.stdlib,
|
||||
libs.reflect,
|
||||
libs.jetbrainsAnnotations,
|
||||
libs.serializationCore,
|
||||
libs.serializationJson,
|
||||
libs.bundles.kotlin,
|
||||
libs.bundles.fabric.kotlin.deps,
|
||||
libs.graal,
|
||||
libs.molang
|
||||
).forEach {
|
||||
@@ -90,13 +88,13 @@ tasks {
|
||||
processResources {
|
||||
dependsOn(copyAccessWidener)
|
||||
inputs.property("version", rootProject.version)
|
||||
inputs.property("fabric_loader_version", libs.fabricLoader.get().version)
|
||||
inputs.property("fabric_loader_version", libs.fabric.loader.get().version)
|
||||
inputs.property("minecraft_version", rootProject.property("mc_version").toString())
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand(
|
||||
"version" to rootProject.version,
|
||||
"fabric_loader_version" to libs.fabricLoader.get().version,
|
||||
"fabric_loader_version" to libs.fabric.loader.get().version,
|
||||
"minecraft_version" to rootProject.property("mc_version").toString()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -42,12 +42,12 @@ dependencies {
|
||||
//shadowCommon group: 'commons-io', name: 'commons-io', version: '2.6'
|
||||
// modImplementation(libs.flywheelForge)
|
||||
// include(libs.flywheelForge)
|
||||
modCompileOnly(libs.adornForge)
|
||||
modCompileOnly(libs.adorn.forge)
|
||||
|
||||
implementation(project(":common", configuration = "namedElements")) {
|
||||
isTransitive = false
|
||||
}
|
||||
implementation(libs.kotlinForForge)
|
||||
implementation(libs.kotlin.forge)
|
||||
"developmentForge"(project(":common", configuration = "namedElements")) {
|
||||
isTransitive = false
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
org.gradle.jvmargs=-Xmx8G
|
||||
org.gradle.daemon=false
|
||||
org.gradle.parallel=true
|
||||
org.gradle.caching=true
|
||||
|
||||
group=com.cobblemon.mod
|
||||
|
||||
# API
|
||||
mc_version = 1.20.1
|
||||
|
||||
@@ -11,10 +11,12 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
implementation(libs.kotlin)
|
||||
implementation(libs.indra.common)
|
||||
|
||||
implementation(libs.licenser)
|
||||
implementation(libs.shadow)
|
||||
implementation(libs.loom)
|
||||
implementation(libs.architecturyPlugin)
|
||||
implementation(libs.architectury)
|
||||
|
||||
implementation(libs.blossom)
|
||||
implementation(libs.ideaExt)
|
||||
@@ -0,0 +1,20 @@
|
||||
rootProject.name = "build-logic"
|
||||
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
maven("https://maven.architectury.dev/")
|
||||
maven("https://maven.fabricmc.net/")
|
||||
maven("https://maven.minecraftforge.net/")
|
||||
maven("https://repo.papermc.io/repository/maven-public/")
|
||||
}
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
versionCatalogs {
|
||||
create("libs") {
|
||||
from(files("../libs.versions.toml"))
|
||||
}
|
||||
}
|
||||
}
|
||||
+18
-11
@@ -9,18 +9,31 @@
|
||||
*/
|
||||
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
val accessWidenerFile = "src/main/resources/cobblemon-common.accesswidener"
|
||||
import utilities.ACCESS_WIDENER
|
||||
|
||||
plugins {
|
||||
java
|
||||
`java-library`
|
||||
id("java")
|
||||
id("java-library")
|
||||
id("net.kyori.indra")
|
||||
id("net.kyori.indra.git")
|
||||
|
||||
id("org.cadixdev.licenser")
|
||||
id("dev.architectury.loom")
|
||||
id("architectury-plugin")
|
||||
kotlin("jvm")
|
||||
}
|
||||
|
||||
group = rootProject.group
|
||||
version = rootProject.version
|
||||
description = rootProject.description
|
||||
|
||||
indra {
|
||||
javaVersions {
|
||||
minimumToolchain(17)
|
||||
target(17)
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
//JEI
|
||||
@@ -32,11 +45,6 @@ license {
|
||||
header(rootProject.file("HEADER"))
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
architectury {
|
||||
minecraft = project.property("mc_version").toString()
|
||||
}
|
||||
@@ -57,8 +65,7 @@ dependencies {
|
||||
|
||||
tasks {
|
||||
withType<JavaCompile> {
|
||||
options.encoding = "UTF-8"
|
||||
options.release.set(17)
|
||||
options.compilerArgs.add("-Xlint:-processing,-classfile,-serial")
|
||||
}
|
||||
|
||||
withType<KotlinCompile> {
|
||||
+17
@@ -1,8 +1,13 @@
|
||||
import utilities.VersionType
|
||||
import utilities.writeVersion
|
||||
|
||||
plugins {
|
||||
id("cobblemon.base-conventions")
|
||||
id("com.github.johnrengelman.shadow")
|
||||
}
|
||||
|
||||
writeVersion(type = VersionType.FULL)
|
||||
|
||||
val bundle: Configuration by configurations.creating {
|
||||
isCanBeConsumed = false
|
||||
isCanBeResolved = true
|
||||
@@ -39,4 +44,16 @@ tasks {
|
||||
archiveVersion.set("${rootProject.version}")
|
||||
}
|
||||
|
||||
val copyJar by registering(CopyFile::class) {
|
||||
val productionJar = tasks.remapJar.flatMap { it.archiveFile }
|
||||
fileToCopy = productionJar
|
||||
destination = productionJar.flatMap {
|
||||
rootProject.layout.buildDirectory.file("libs/${it.asFile.name}")
|
||||
}
|
||||
}
|
||||
|
||||
assemble {
|
||||
dependsOn(copyJar)
|
||||
}
|
||||
|
||||
}
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
import extensions.VersionType
|
||||
import extensions.writeVersion
|
||||
import utilities.VersionType
|
||||
import utilities.writeVersion
|
||||
|
||||
plugins {
|
||||
java
|
||||
`java-library`
|
||||
id("java")
|
||||
id("java-library")
|
||||
id("maven-publish")
|
||||
id("dev.architectury.loom")
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
plugins {
|
||||
base
|
||||
}
|
||||
|
||||
tasks {
|
||||
withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.file.RegularFileProperty
|
||||
import org.gradle.api.tasks.InputFile
|
||||
import org.gradle.api.tasks.OutputFile
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.gradle.work.DisableCachingByDefault
|
||||
|
||||
@DisableCachingByDefault(because = "Not worth caching")
|
||||
abstract class CopyFile : DefaultTask() {
|
||||
@get:InputFile
|
||||
abstract val fileToCopy: RegularFileProperty
|
||||
|
||||
@get:OutputFile
|
||||
abstract val destination: RegularFileProperty
|
||||
|
||||
@TaskAction
|
||||
private fun copyFile() {
|
||||
destination.get().asFile.parentFile.mkdirs()
|
||||
fileToCopy.get().asFile.copyTo(destination.get().asFile, overwrite = true)
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package extensions
|
||||
package utilities
|
||||
|
||||
import org.gradle.api.Project
|
||||
|
||||
+1
@@ -1,2 +1,3 @@
|
||||
package utilities
|
||||
|
||||
const val ACCESS_WIDENER = "src/main/resources/cobblemon-common.accesswidener"
|
||||
@@ -0,0 +1,101 @@
|
||||
[versions]
|
||||
# Kotlin
|
||||
kotlin = "1.8.20"
|
||||
annotations = "23.0.0"
|
||||
serialization = "1.5.0"
|
||||
|
||||
# Plugins
|
||||
indra = "3.1.3"
|
||||
licenser = "0.6.1"
|
||||
shadow = "8.1.1"
|
||||
blossom = "2.1.0"
|
||||
idea-ext = "1.1.7"
|
||||
|
||||
# Loom
|
||||
loom = "1.6-SNAPSHOT"
|
||||
architectury-plugin = "3.4-SNAPSHOT"
|
||||
|
||||
# Common
|
||||
molang = "1.1.11"
|
||||
graal = "22.3.0"
|
||||
icu4j = "71.1"
|
||||
jei-api = "15.2.0.25"
|
||||
|
||||
# Fabric
|
||||
fabric-loader = "0.15.10"
|
||||
fabric-api = "0.89.0+1.20.1"
|
||||
fabric-kotlin = "1.9.3+kotlin.1.8.20"
|
||||
fabric-permissions-api = "0.2-SNAPSHOT"
|
||||
lambDynamicLights = "2.3.2+1.20.1"
|
||||
|
||||
# Forge
|
||||
forge = "1.20.1-47.1.0"
|
||||
kotlin-for-forge = "4.10.0"
|
||||
flywheel = "0.6.10-7"
|
||||
|
||||
# Data Storage
|
||||
mongo = "4.10.2"
|
||||
|
||||
# Testing
|
||||
junit = "5.9.0"
|
||||
mockito = "5.2.0"
|
||||
mockk = "1.12.1"
|
||||
classgraph = "4.8.153"
|
||||
|
||||
[libraries]
|
||||
# General Buildscript Plugins
|
||||
indra-common = { group = "net.kyori", name = "indra-common", version.ref = "indra" }
|
||||
kotlin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
|
||||
loom = { group = "dev.architectury", name = "architectury-loom", version.ref = "loom" }
|
||||
architectury = { group = "architectury-plugin", name = "architectury-plugin.gradle.plugin", version.ref = "architectury-plugin" }
|
||||
shadow = { group = "com.github.johnrengelman", name = "shadow", version.ref = "shadow" }
|
||||
blossom = { group = "net.kyori", name = "blossom", version.ref = "blossom" }
|
||||
ideaExt = { group = "org.jetbrains.gradle.plugin.idea-ext", name = "org.jetbrains.gradle.plugin.idea-ext.gradle.plugin", version.ref = "idea-ext"}
|
||||
licenser = { group = "gradle.plugin.org.cadixdev.gradle", name = "licenser", version.ref = "licenser" }
|
||||
|
||||
# Kotlin
|
||||
kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8", version.ref = "kotlin" }
|
||||
kotlin-reflect = { group = "org.jetbrains.kotlin", name = "kotlin-reflect", version.ref = "kotlin" }
|
||||
jetbrains-annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" }
|
||||
serialization-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-core-jvm", version.ref = "serialization" }
|
||||
serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json-jvm", version.ref = "serialization" }
|
||||
|
||||
# Common
|
||||
jei-api = { group = "local.mezz.jei", name = "common-api", version.ref = "jei-api"}
|
||||
molang = { group = "local.com.bedrockk", name = "molang", version.ref = "molang" }
|
||||
graal = { group = "org.graalvm.js", name = "js", version.ref = "graal" }
|
||||
icu4j = { group = "com.ibm.icu", name = "icu4j", version.ref = "icu4j" }
|
||||
|
||||
# Fabric
|
||||
fabric-loader = { group = "net.fabricmc", name = "fabric-loader", version.ref = "fabric-loader" }
|
||||
fabric-api = { group = "net.fabricmc.fabric-api", name = "fabric-api", version.ref = "fabric-api" }
|
||||
fabric-kotlin = { group = "net.fabricmc", name = "fabric-language-kotlin", version.ref = "fabric-kotlin" }
|
||||
fabric-permissions = { group = "me.lucko", name = "fabric-permissions-api", version.ref = "fabric-permissions-api" }
|
||||
adorn-fabric = { group = "maven.modrinth", name = "adorn", version = "5.0.0-fabric"}
|
||||
lambDynamicLights = { group = "maven.modrinth", name = "lambdynamiclights", version.ref = "lambDynamicLights"}
|
||||
jei-fabric = { group = "mezz.jei", name = "jei-1.20.1-fabric", version.ref = "jei-api"}
|
||||
|
||||
# Forge
|
||||
forge = { group = "net.minecraftforge", name = "forge", version.ref = "forge" }
|
||||
kotlin-forge = { group = "thedarkcolour", name = "kotlinforforge", version.ref = "kotlin-for-forge" }
|
||||
adorn-forge = { group = "maven.modrinth", name = "adorn", version = "5.0.0-forge"}
|
||||
|
||||
# Data Storage
|
||||
mongo-driver-core = { group = "org.mongodb", name = "mongodb-driver-core", version.ref = "mongo" }
|
||||
mongo-driver-sync = { group = "org.mongodb", name = "mongodb-driver-sync", version.ref = "mongo" }
|
||||
|
||||
# Testing
|
||||
junit-fabric = { group = "net.fabricmc", name = "fabric-loader-junit", version.ref = "fabric-loader" }
|
||||
junit-params = { group = "org.junit.jupiter", name = "junit-jupiter-params", version.ref = "junit" }
|
||||
mockito-core = { group = "org.mockito", name = "mockito-core", version.ref = "mockito" }
|
||||
mock-kotlin = { group = "io.mockk", name = "mockk", version.ref = "mockk" }
|
||||
classgraph = { group = "io.github.classgraph", name = "classgraph", version.ref = "classgraph" }
|
||||
|
||||
[bundles]
|
||||
kotlin = [ "kotlin-stdlib", "kotlin-reflect" ]
|
||||
fabric = [ "fabric-kotlin", "fabric-permissions" ]
|
||||
fabric-kotlin-deps = [ "jetbrains-annotations", "serialization-core", "serialization-json" ]
|
||||
fabric-integrations-compileOnly = [ "adorn-fabric", "lambDynamicLights" ]
|
||||
fabric-integrations-runtimeOnly = [ "jei-fabric" ]
|
||||
mongo = [ "mongo-driver-core", "mongo-driver-sync" ]
|
||||
unitTesting = [ "junit-fabric", "junit-params", "mockito-core", "mock-kotlin", "classgraph" ]
|
||||
@@ -1,205 +0,0 @@
|
||||
versions:
|
||||
|
||||
# jetbrains
|
||||
kotlin: 1.8.20
|
||||
coroutines: 1.6.4
|
||||
annotations: 23.0.0
|
||||
serialization: 1.5.0
|
||||
|
||||
# other
|
||||
licenser: 0.6.1
|
||||
shadow: 7.1.2
|
||||
blossom: 2.1.0
|
||||
idea-ext: 1.1.7
|
||||
|
||||
# fabric/remap
|
||||
loom: 1.1-SNAPSHOT
|
||||
fabric-loader: 0.14.21
|
||||
fabric-api: 0.89.0+1.20.1
|
||||
fabric-kotlin: 1.9.3+kotlin.1.8.20
|
||||
architectury-plugin: 3.4-SNAPSHOT
|
||||
flywheelFabric: 0.6.9-1
|
||||
fabric-permissions-api: 0.2-SNAPSHOT
|
||||
adorn-fabric: 5.0.0-fabric
|
||||
lamb-dynamic-lights: 2.3.2+1.20.1
|
||||
|
||||
# forge
|
||||
forge: 1.20.1-47.1.0
|
||||
kotlinForForge: 4.10.0
|
||||
flywheelForge: 0.6.10-7
|
||||
adorn-forge: 5.0.0-forge
|
||||
|
||||
# common
|
||||
graal: 22.3.0
|
||||
molang: 1.1.11
|
||||
#make sure to keep this the same as the one bundled in graal (can see it using ./gradlew commmon:dependencies
|
||||
icu4j: 71.1
|
||||
|
||||
# test
|
||||
junit: 5.9.0
|
||||
mockito: 5.2.0
|
||||
mockk: 1.12.1
|
||||
classgraph: 4.8.153
|
||||
jei-api: 15.2.0.25
|
||||
|
||||
|
||||
dependencies:
|
||||
|
||||
# build-logic
|
||||
kotlin:
|
||||
group: org.jetbrains.kotlin
|
||||
name: kotlin-gradle-plugin
|
||||
version: { ref: kotlin }
|
||||
licenser:
|
||||
group: gradle.plugin.org.cadixdev.gradle
|
||||
name: licenser
|
||||
version: { ref: licenser }
|
||||
shadow:
|
||||
group: gradle.plugin.com.github.johnrengelman
|
||||
name: shadow
|
||||
version: { ref: shadow }
|
||||
blossom:
|
||||
group: net.kyori
|
||||
name: blossom
|
||||
version: { ref: blossom }
|
||||
ideaExt:
|
||||
group: org.jetbrains.gradle.plugin.idea-ext
|
||||
name: org.jetbrains.gradle.plugin.idea-ext.gradle.plugin
|
||||
version: { ref: idea-ext }
|
||||
loom:
|
||||
group: dev.architectury
|
||||
name: architectury-loom
|
||||
version: { ref: loom }
|
||||
architecturyPlugin:
|
||||
group: architectury-plugin
|
||||
name: architectury-plugin.gradle.plugin
|
||||
version: { ref: architectury-plugin }
|
||||
|
||||
# Jetbrains // Core Stuff
|
||||
stdlib:
|
||||
group: org.jetbrains.kotlin
|
||||
name: kotlin-stdlib-jdk8
|
||||
version: { ref: kotlin }
|
||||
reflect:
|
||||
group: org.jetbrains.kotlin
|
||||
name: kotlin-reflect
|
||||
version: { ref: kotlin }
|
||||
jetbrainsAnnotations:
|
||||
group: org.jetbrains
|
||||
name: annotations
|
||||
version: { ref: annotations }
|
||||
serializationCore:
|
||||
group: org.jetbrains.kotlinx
|
||||
name: kotlinx-serialization-core-jvm
|
||||
version: { ref: serialization }
|
||||
serializationJson:
|
||||
group: org.jetbrains.kotlinx
|
||||
name: kotlinx-serialization-json-jvm
|
||||
version: { ref: serialization }
|
||||
graal:
|
||||
group: org.graalvm.js
|
||||
name: js
|
||||
version: { ref: graal }
|
||||
#This is a graal dep but has to be explicitly marked as included as present on the server
|
||||
icu4j:
|
||||
group: com.ibm.icu
|
||||
name: icu4j
|
||||
version: { ref: icu4j }
|
||||
molang:
|
||||
group: local.com.bedrockk
|
||||
name: molang
|
||||
version: { ref: molang }
|
||||
fabricLoader:
|
||||
group: net.fabricmc
|
||||
name: fabric-loader
|
||||
version: { ref: fabric-loader }
|
||||
jeiApi:
|
||||
group: local.mezz.jei
|
||||
name: common-api
|
||||
version: { ref: jei-api }
|
||||
|
||||
|
||||
# fabric
|
||||
fabricApi:
|
||||
group: net.fabricmc.fabric-api
|
||||
name: fabric-api
|
||||
version: { ref: fabric-api }
|
||||
fabricKotlin:
|
||||
group: net.fabricmc
|
||||
name: fabric-language-kotlin
|
||||
version: { ref: fabric-kotlin }
|
||||
fabricPermissionsApi:
|
||||
group: me.lucko
|
||||
name: fabric-permissions-api
|
||||
version: { ref: fabric-permissions-api }
|
||||
jeiFabric:
|
||||
group: mezz.jei
|
||||
name: jei-1.20.1-fabric
|
||||
version: { ref: jei-api }
|
||||
flywheelFabric:
|
||||
group: com.jozufozu.flywheel
|
||||
name: flywheel-fabric-1.20.1
|
||||
version: { ref: flywheelFabric }
|
||||
adornFabric:
|
||||
group: maven.modrinth
|
||||
name: adorn
|
||||
version: { ref: adorn-fabric }
|
||||
lambDynamicLights:
|
||||
group: maven.modrinth
|
||||
name: lambdynamiclights
|
||||
version: { ref: lamb-dynamic-lights }
|
||||
|
||||
# forge
|
||||
forge:
|
||||
group: net.minecraftforge
|
||||
name: forge
|
||||
version: { ref: forge }
|
||||
kotlinForForge:
|
||||
group: thedarkcolour
|
||||
name: kotlinforforge
|
||||
version: { ref: kotlinForForge }
|
||||
jeiForge:
|
||||
group: mezz.jei
|
||||
name: jei-1.20.1-forge
|
||||
version: { ref: jei-api }
|
||||
flywheelForge:
|
||||
group: com.jozufozu.flywheel
|
||||
name: flywheel-forge-1.20.1
|
||||
version: { ref: flywheelForge }
|
||||
adornForge:
|
||||
group: maven.modrinth
|
||||
name: adorn
|
||||
version: { ref: adorn-forge }
|
||||
|
||||
# datastore
|
||||
mongoDriverCore:
|
||||
group: org.mongodb
|
||||
name: mongodb-driver-core
|
||||
version: 4.10.2
|
||||
|
||||
mongoDriverSync:
|
||||
group: org.mongodb
|
||||
name: mongodb-driver-sync
|
||||
version: 4.10.2
|
||||
|
||||
# test
|
||||
fabricJunit:
|
||||
group: net.fabricmc
|
||||
name: fabric-loader-junit
|
||||
version: { ref: fabric-loader }
|
||||
junitParams:
|
||||
group: org.junit.jupiter
|
||||
name: junit-jupiter-params
|
||||
version: { ref: junit }
|
||||
mockito:
|
||||
group: org.mockito
|
||||
name: mockito-core
|
||||
version: { ref: mockito }
|
||||
mockk:
|
||||
group: io.mockk
|
||||
name: mockk
|
||||
version: { ref: mockk }
|
||||
classgraph:
|
||||
group: io.github.classgraph
|
||||
name: classgraph
|
||||
version: { ref: classgraph }
|
||||
Vendored
BIN
Binary file not shown.
+3
-1
@@ -1,5 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -32,10 +32,10 @@
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
@@ -55,7 +55,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -80,13 +80,11 @@ do
|
||||
esac
|
||||
done
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -133,22 +131,29 @@ location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
@@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
@@ -205,6 +214,12 @@ set -- \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
|
||||
Vendored
+92
-89
@@ -1,89 +1,92 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
|
||||
+7
-6
@@ -1,18 +1,19 @@
|
||||
rootProject.name = "cobblemon"
|
||||
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
||||
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
|
||||
maven("https://maven.fabricmc.net/")
|
||||
maven("https://maven.architectury.dev/")
|
||||
maven("https://maven.minecraftforge.net/")
|
||||
gradlePluginPortal()
|
||||
}
|
||||
includeBuild("build-logic")
|
||||
|
||||
includeBuild("gradle/build-logic")
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("ca.stellardrift.polyglot-version-catalogs") version "5.0.1"
|
||||
}
|
||||
rootProject.name = "cobblemon"
|
||||
|
||||
listOf(
|
||||
"common",
|
||||
|
||||
Reference in New Issue
Block a user