Customizable lanyards for modding events.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Lanyard/build.gradle.kts

135 lines
3.5 KiB

plugins {
java
alias(libs.plugins.quilt.loom)
`maven-publish`
signing
}
group = "gay.pyrrha"
version = "1.1.1+${libs.versions.minecraft.get()}"
base.archivesName.set("Lanyard")
println("${base.archivesName.get()}: v$version")
repositories {
mavenCentral()
maven("https://maven.terraformersmc.com/releases/") {
name = "TerraformersMC"
}
maven("https://ladysnake.jfrog.io/artifactory/mods/") {
name = "Ladysnake Libs"
}
maven("https://repo.sleeping.town/") {
name = "Sleeping Town"
content {
includeGroup("com.unascribed")
}
}
}
dependencies {
minecraft(libs.minecraft)
mappings(loom.layered {
addLayer(quiltMappings.mappings(withClassifier(libs.quilt.mappings, "v2")))
})
modImplementation(libs.quilt.loader)
modImplementation(libs.bundles.quilt.qsl)
include(libs.bundles.quilt.qsl)
modApi(libs.mod.modmenu)
modRuntimeOnly(libs.quilted.fapi)
modApi(libs.bundles.mods.required)
include(libs.bundles.mods.required)
}
loom {
runtimeOnlyLog4j.set(true)
runs {
register("p1Client") {
client()
name("Player 1 Client")
source(sourceSets.main.get())
programArgs("--uuid", "7662d98917e04797bb2123745ea59664", "--username", "AlsoPyrrha")
}
register("p2Client") {
client()
name("Player 2 Client")
source(sourceSets.main.get())
programArgs("--uuid", "2e3e408ef3404f64984098de7a8f5242", "--username", "MorePyrrha")
}
}
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_17
withSourcesJar()
withJavadocJar()
}
tasks.processResources {
inputs.property("version", project.version)
filesMatching("quilt.mod.json") {
expand("version" to project.version)
}
// Minify json
doLast {
fileTree(mapOf("dir" to outputs.files.asPath, "includes" to listOf("**/*.json", "**/*.mcmeta"))).forEach {
file: File -> file.writeText(groovy.json.JsonOutput.toJson(groovy.json.JsonSlurper().parse(file)))
}
}
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.release.set(17)
}
tasks.jar {
from("LICENSE.md") {
rename { "${it}_${project.base.archivesName}" }
}
}
tasks.javadoc {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
pom {
scm {
url.set("https://code.pyrrhya.gay/JustPyrrha/Lanyard")
connection.set("scm:git:git://code.pyrrhya.gay/JustPyrrha/Lanyard.git")
developerConnection.set("scm:git:git@connect.pyrrha.gay:JustPyrrha/Lanyard.git")
}
licenses {
license {
name.set("GNU Lesser General Public License v3.0 or later")
url.set("https://code.pyrrha.gay/JustPyrrha/Lanyard/src/branch/main/LICENSE.md")
}
}
}
}
}
repositories {
maven("https://mvn.pyrrha.gay/releases") {
name = "pyrrha"
credentials(PasswordCredentials::class)
}
}
}
fun withClassifier(provider: Provider<MinimalExternalModuleDependency>, classifier: String): String =
"${provider.get()}:$classifier"