2023-12-02 03:46:20 +00:00
|
|
|
plugins {
|
|
|
|
id("java")
|
|
|
|
id("maven-publish")
|
2024-10-04 18:25:01 +00:00
|
|
|
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.9"
|
2023-12-02 03:46:20 +00:00
|
|
|
id("net.kyori.blossom") version "2.1.0"
|
2024-09-10 23:23:04 +00:00
|
|
|
id("io.github.goooler.shadow") version "8.1.8"
|
2023-12-02 03:46:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
group = "dev.plex"
|
2024-06-15 18:26:50 +00:00
|
|
|
version = "1.5-SNAPSHOT"
|
2023-12-02 03:46:20 +00:00
|
|
|
description = "Plex"
|
|
|
|
|
|
|
|
subprojects {
|
|
|
|
apply(plugin = "java")
|
|
|
|
apply(plugin = "maven-publish")
|
|
|
|
apply(plugin = "org.jetbrains.gradle.plugin.idea-ext")
|
|
|
|
apply(plugin = "net.kyori.blossom")
|
2024-06-15 01:29:08 +00:00
|
|
|
apply(plugin = "io.github.goooler.shadow")
|
2023-12-02 03:46:20 +00:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
url = uri("https://repo.papermc.io/repository/maven-public/")
|
|
|
|
}
|
|
|
|
|
|
|
|
maven {
|
|
|
|
url = uri("https://repository.apache.org/content/repositories/snapshots/")
|
|
|
|
}
|
|
|
|
|
|
|
|
maven {
|
|
|
|
url = uri("https://repo.maven.apache.org/maven2/")
|
|
|
|
}
|
|
|
|
|
|
|
|
maven {
|
|
|
|
url = uri("https://jitpack.io")
|
|
|
|
content {
|
|
|
|
includeGroup("com.github.MilkBowl")
|
2024-04-28 03:24:03 +00:00
|
|
|
includeGroup("com.github.LeonMangler")
|
2023-12-02 03:46:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
2024-06-15 18:41:34 +00:00
|
|
|
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
2023-12-02 03:46:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks {
|
|
|
|
compileJava {
|
|
|
|
options.encoding = Charsets.UTF_8.name()
|
|
|
|
}
|
|
|
|
javadoc {
|
|
|
|
options.encoding = Charsets.UTF_8.name()
|
|
|
|
}
|
|
|
|
processResources {
|
|
|
|
filteringCharset = Charsets.UTF_8.name()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.clean {
|
2023-12-02 07:17:27 +00:00
|
|
|
dependsOn(subprojects.map {
|
|
|
|
it.project.tasks.clean
|
|
|
|
})
|
2023-12-02 03:46:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.create<Copy>("copyJars") {
|
2023-12-02 07:17:27 +00:00
|
|
|
dependsOn(tasks.jar)
|
2023-12-02 03:46:20 +00:00
|
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
2023-12-02 07:17:27 +00:00
|
|
|
from(subprojects.map {
|
|
|
|
it.project.tasks.shadowJar
|
|
|
|
})
|
|
|
|
from(subprojects.map {
|
|
|
|
it.project.tasks.jar
|
|
|
|
})
|
2023-12-02 03:46:20 +00:00
|
|
|
into(file("build/libs"))
|
|
|
|
}
|