mirror of
https://github.com/plexusorg/Futura.git
synced 2024-11-21 11:45:01 +00:00
110 lines
3.2 KiB
Plaintext
110 lines
3.2 KiB
Plaintext
plugins {
|
|
id("java")
|
|
`maven-publish`
|
|
id("net.minecrell.plugin-yml.paper") version "0.6.0"
|
|
id("com.gradleup.shadow") version "8.3.3"
|
|
}
|
|
|
|
group = "dev.plex"
|
|
version = "1.0-SNAPSHOT"
|
|
description = "Futura"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
name = "papermc-repo"
|
|
url = uri("https://repo.papermc.io/repository/maven-public/")
|
|
}
|
|
maven {
|
|
name = "sonatype"
|
|
url = uri("https://oss.sonatype.org/content/groups/public/")
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly("io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT")
|
|
library("net.dv8tion:JDA:5.1.2") {
|
|
exclude(module = "opus-java")
|
|
}
|
|
implementation("org.bstats:bstats-base:3.1.0")
|
|
implementation("org.bstats:bstats-bukkit:3.1.0")
|
|
}
|
|
|
|
paper {
|
|
name = "Futura"
|
|
version = project.version.toString()
|
|
main = "dev.plex.futura.Futura"
|
|
apiVersion = "1.20"
|
|
authors = listOf("Telesphoreo", "Taah")
|
|
description = "Discord plugin bridge for Minecraft"
|
|
website = "https://plex.us.org"
|
|
loader = "dev.plex.futura.util.FuturaLibraryManager"
|
|
generateLibrariesJson = true
|
|
}
|
|
|
|
java {
|
|
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
|
}
|
|
|
|
tasks {
|
|
compileJava {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
}
|
|
javadoc {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
}
|
|
processResources {
|
|
filteringCharset = Charsets.UTF_8.name()
|
|
}
|
|
|
|
build {
|
|
dependsOn(shadowJar)
|
|
}
|
|
|
|
jar {
|
|
enabled = false
|
|
}
|
|
|
|
shadowJar {
|
|
archiveBaseName.set("Futura")
|
|
archiveClassifier.set("")
|
|
relocate("org.bstats", "dev.plex")
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
repositories {
|
|
maven {
|
|
val releasesRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-releases/")
|
|
val snapshotsRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-snapshots/")
|
|
url = if (rootProject.version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
|
|
credentials {
|
|
username = System.getenv("plexUser")
|
|
password = System.getenv("plexPassword")
|
|
}
|
|
}
|
|
}
|
|
publications {
|
|
create<MavenPublication>("maven") {
|
|
pom.withXml {
|
|
val dependenciesNode = asNode().appendNode("dependencies")
|
|
configurations.getByName("library").allDependencies.configureEach {
|
|
dependenciesNode.appendNode("dependency")
|
|
.appendNode("groupId", group).parent()
|
|
.appendNode("artifactId", name).parent()
|
|
.appendNode("version", version).parent()
|
|
.appendNode("scope", "provided").parent()
|
|
}
|
|
configurations.getByName("implementation").allDependencies.configureEach {
|
|
dependenciesNode.appendNode("dependency")
|
|
.appendNode("groupId", group).parent()
|
|
.appendNode("artifactId", name).parent()
|
|
.appendNode("version", version).parent()
|
|
.appendNode("scope", "provided").parent()
|
|
}
|
|
}
|
|
artifacts.artifact(tasks.shadowJar)
|
|
}
|
|
}
|
|
}
|