mirror of
https://github.com/plexusorg/Plex.git
synced 2026-06-04 05:26:55 +00:00
Fix deprecated Gradle usage
This commit is contained in:
+15
-25
@@ -1,9 +1,9 @@
|
||||
plugins {
|
||||
id("java")
|
||||
id("maven-publish")
|
||||
id("org.jetbrains.gradle.plugin.idea-ext") version "1.3"
|
||||
id("net.kyori.blossom") version "2.2.0"
|
||||
id("com.gradleup.shadow") version "9.3.0"
|
||||
id("org.jetbrains.gradle.plugin.idea-ext") version "1.3" apply false
|
||||
id("net.kyori.blossom") version "2.2.0" apply false
|
||||
id("com.gradleup.shadow") version "9.3.0" apply false
|
||||
}
|
||||
|
||||
group = "dev.plex"
|
||||
@@ -11,12 +11,6 @@ version = "1.7-SNAPSHOT"
|
||||
description = "Plex"
|
||||
|
||||
subprojects {
|
||||
apply(plugin = "java")
|
||||
apply(plugin = "maven-publish")
|
||||
apply(plugin = "org.jetbrains.gradle.plugin.idea-ext")
|
||||
apply(plugin = "net.kyori.blossom")
|
||||
apply(plugin = "com.gradleup.shadow")
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url = uri("https://repo.papermc.io/repository/maven-public/")
|
||||
@@ -37,31 +31,29 @@ subprojects {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
java {
|
||||
plugins.withId("java") {
|
||||
extensions.configure<JavaPluginExtension> {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(25))
|
||||
}
|
||||
|
||||
tasks {
|
||||
compileJava {
|
||||
tasks.withType<JavaCompile>().configureEach {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
}
|
||||
javadoc {
|
||||
tasks.withType<Javadoc>().configureEach {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
}
|
||||
processResources {
|
||||
tasks.withType<ProcessResources>().configureEach {
|
||||
filteringCharset = Charsets.UTF_8.name()
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
plugins.withId("maven-publish") {
|
||||
extensions.configure<PublishingExtension> {
|
||||
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")
|
||||
credentials(PasswordCredentials::class)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -77,11 +69,9 @@ tasks.clean {
|
||||
tasks.register<Copy>("copyJars", fun Copy.() {
|
||||
dependsOn(tasks.jar)
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
from(subprojects.map {
|
||||
it.project.tasks.shadowJar
|
||||
})
|
||||
from(subprojects.map {
|
||||
it.project.tasks.jar
|
||||
})
|
||||
subprojects.forEach { sub ->
|
||||
from(sub.tasks.matching { it.name == "shadowJar" })
|
||||
from(sub.tasks.matching { it.name == "jar" })
|
||||
}
|
||||
into(file("build/libs"))
|
||||
})
|
||||
@@ -1,3 +1,11 @@
|
||||
plugins {
|
||||
java
|
||||
`maven-publish`
|
||||
id("org.jetbrains.gradle.plugin.idea-ext")
|
||||
id("net.kyori.blossom")
|
||||
id("com.gradleup.shadow")
|
||||
}
|
||||
|
||||
group = rootProject.group
|
||||
version = rootProject.version
|
||||
description = "Plex-Velocity"
|
||||
|
||||
@@ -3,6 +3,11 @@ import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
plugins {
|
||||
java
|
||||
`maven-publish`
|
||||
id("org.jetbrains.gradle.plugin.idea-ext")
|
||||
id("net.kyori.blossom")
|
||||
id("com.gradleup.shadow")
|
||||
id("net.kyori.indra.git") version "4.0.0"
|
||||
id("de.eldoria.plugin-yml.paper") version "0.9.0"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user