Open-source multiplayer game server compatible with the RuneScape client
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.
 
 
openrs2/all/build.gradle.kts

108 lines
2.7 KiB

import com.github.jk1.license.render.TextReportRenderer
import java.nio.file.Files
plugins {
`maven-publish`
application
id("com.github.jk1.dependency-license-report")
id("com.github.johnrengelman.shadow")
kotlin("jvm")
}
application {
applicationName = "openrs2"
mainClassName = "dev.openrs2.CommandKt"
}
dependencies {
implementation(project(":bundler"))
implementation(project(":compress-cli"))
implementation(project(":crc32"))
implementation(project(":decompiler"))
implementation(project(":deob"))
implementation(project(":deob-ast"))
implementation(project(":game"))
}
tasks.shadowJar {
minimize {
exclude(dependency("org.jetbrains.kotlin:kotlin-reflect"))
}
}
tasks.register("generateAuthors") {
inputs.dir("$rootDir/.git")
outputs.file("$buildDir/AUTHORS")
doLast {
Files.newOutputStream(buildDir.toPath().resolve("AUTHORS")).use { out ->
exec {
commandLine("git", "shortlog", "-esn", "HEAD")
standardOutput = out
}.assertNormalExitValue()
}
}
}
licenseReport {
renderers = arrayOf(TextReportRenderer())
}
val distTasks = listOf(
"distTar",
"distZip",
"installDist",
"installShadowDist",
"shadowDistTar",
"shadowDistZip"
)
configure(tasks.filter { it.name in distTasks }) {
dependsOn("generateAuthors", "generateLicenseReport")
}
distributions {
all {
contents {
from("$buildDir/AUTHORS")
from("${rootProject.projectDir}/DCO")
from("${rootProject.projectDir}/LICENSE")
from("${rootProject.projectDir}/README.md")
from("${rootProject.projectDir}/etc/config.example.yaml") {
rename { "config.yaml" }
into("etc")
}
from("${rootProject.projectDir}/share") {
exclude(".*", "*~")
into("share")
}
from("$buildDir/reports/dependency-license/THIRD-PARTY-NOTICES.txt") {
rename { "third-party-licenses.txt" }
into("share/doc")
}
}
}
named("shadow") {
distributionBaseName.set("openrs2-shadow")
}
}
publishing {
publications.create<MavenPublication>("maven") {
artifactId = "openrs2"
artifact(tasks.named("shadowDistZip").get())
pom {
packaging = "zip"
name.set("OpenRS2")
description.set(
"""
OpenRS2 is an open-source multiplayer game server and suite of
associated tools. It is compatible with build 550 of the
RuneScape client, which was released in mid-2009.
""".trimIndent()
)
}
}
}