mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-15 12:40:30 +00:00
a17b001950
It should be possible to consume the ComputerCraft's core (i.e. non-Minecraft code) in other projects, such as emulators. While this has been possible for years, it's somewhat tricky from a maintenance perspective - it's very easy to accidentally add an MC dependency somewhere! By publishing a separate "core" jar, we can better distinguish the boundaries between our Lua runtime and the Minecraft-specific code. Ideally we could have one core project (rather than separate core and core-api modules), and publish a separate "api" jar, like we do for the main mod. However, this isn't really possible to express using Maven dependencies, and so we must resort to this system. Of course, this is kinda what the Java module system is meant to solve, but unfortunately getting that working with Minecraft is infeasible.
46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
import org.gradle.kotlin.dsl.`maven-publish`
|
|
|
|
plugins {
|
|
`java-library`
|
|
`maven-publish`
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
register<MavenPublication>("maven") {
|
|
artifactId = base.archivesName.get()
|
|
from(components["java"])
|
|
|
|
pom {
|
|
name.set("CC: Tweaked")
|
|
description.set("CC: Tweaked is a fork of ComputerCraft, adding programmable computers, turtles and more to Minecraft.")
|
|
url.set("https://github.com/cc-tweaked/CC-Tweaked")
|
|
|
|
scm {
|
|
url.set("https://github.com/cc-tweaked/CC-Tweaked.git")
|
|
}
|
|
|
|
issueManagement {
|
|
system.set("github")
|
|
url.set("https://github.com/cc-tweaked/CC-Tweaked/issues")
|
|
}
|
|
|
|
licenses {
|
|
license {
|
|
name.set("ComputerCraft Public License, Version 1.0")
|
|
url.set("https://github.com/cc-tweaked/CC-Tweaked/blob/HEAD/LICENSE")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven("https://squiddev.cc/maven") {
|
|
name = "SquidDev"
|
|
|
|
credentials(PasswordCredentials::class)
|
|
}
|
|
}
|
|
}
|