Files
SableGravity/build.gradle
T

83 lines
2.4 KiB
Groovy

plugins {
id 'java'
id 'net.neoforged.moddev' version '2.0.107'
}
group = 'dev.nightly.sablegravity'
version = project.mod_version
base {
archivesName = "sablegravity"
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
sourceSets {
// Cosmonautics 26.07.270 advertises a relocated Orekit javac plugin that is absent from its
// published jar. The dev-only provider keeps Minecraft MCP's in-process Java compiler usable.
// This source set is placed on runClient's classpath and is never included in sablegravity.jar.
mcpCompat
}
repositories {
mavenCentral()
maven {
name = 'Modrinth'
url = 'https://api.modrinth.com/maven'
content {
includeGroup 'maven.modrinth'
}
}
maven {
name = 'RyanHCode'
url = 'https://maven.ryanhcode.dev/releases'
content {
includeGroup 'dev.ryanhcode.sable-companion'
}
}
}
neoForge {
version = project.neo_version
runs {
client {
client()
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
}
server {
server()
programArgument '--nogui'
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
}
}
mods {
sablegravity {
sourceSet sourceSets.main
}
}
}
dependencies {
// Sable is part of the compile API used by this mod and is also loaded in dev runs.
implementation "maven.modrinth:sable:${project.sable_version}"
// Sable embeds Companion at runtime, but its public API is a separate compile artifact.
compileOnly "dev.ryanhcode.sable-companion:sable-companion-common-1.21.1:${project.sable_companion_version}"
// Development client mod set. Aeronautics requires Create and Sable.
runtimeOnly "maven.modrinth:create:${project.create_version}"
runtimeOnly "maven.modrinth:create-aeronautics:${project.aeronautics_version}"
runtimeOnly "maven.modrinth:micg1iTH:${project.cosmonautics_version}"
runtimeOnly "maven.modrinth:the-one-probe:${project.the_one_probe_version}"
// Local-only game control/inspection bridge used by the development client.
runtimeOnly files('libs/minecraft_mcp-0.1.0.jar')
runtimeOnly sourceSets.mcpCompat.output
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.release = 21
}