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 {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
id("maven-publish")
|
id("maven-publish")
|
||||||
id("org.jetbrains.gradle.plugin.idea-ext") version "1.3"
|
id("org.jetbrains.gradle.plugin.idea-ext") version "1.3" apply false
|
||||||
id("net.kyori.blossom") version "2.2.0"
|
id("net.kyori.blossom") version "2.2.0" apply false
|
||||||
id("com.gradleup.shadow") version "9.3.0"
|
id("com.gradleup.shadow") version "9.3.0" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "dev.plex"
|
group = "dev.plex"
|
||||||
@@ -11,12 +11,6 @@ version = "1.7-SNAPSHOT"
|
|||||||
description = "Plex"
|
description = "Plex"
|
||||||
|
|
||||||
subprojects {
|
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 {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url = uri("https://repo.papermc.io/repository/maven-public/")
|
url = uri("https://repo.papermc.io/repository/maven-public/")
|
||||||
@@ -37,31 +31,29 @@ subprojects {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
plugins.withId("java") {
|
||||||
|
extensions.configure<JavaPluginExtension> {
|
||||||
toolchain.languageVersion.set(JavaLanguageVersion.of(25))
|
toolchain.languageVersion.set(JavaLanguageVersion.of(25))
|
||||||
}
|
}
|
||||||
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
tasks {
|
|
||||||
compileJava {
|
|
||||||
options.encoding = Charsets.UTF_8.name()
|
options.encoding = Charsets.UTF_8.name()
|
||||||
}
|
}
|
||||||
javadoc {
|
tasks.withType<Javadoc>().configureEach {
|
||||||
options.encoding = Charsets.UTF_8.name()
|
options.encoding = Charsets.UTF_8.name()
|
||||||
}
|
}
|
||||||
processResources {
|
tasks.withType<ProcessResources>().configureEach {
|
||||||
filteringCharset = Charsets.UTF_8.name()
|
filteringCharset = Charsets.UTF_8.name()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
plugins.withId("maven-publish") {
|
||||||
|
extensions.configure<PublishingExtension> {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
val releasesRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-releases/")
|
val releasesRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-releases/")
|
||||||
val snapshotsRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-snapshots/")
|
val snapshotsRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-snapshots/")
|
||||||
url = if (rootProject.version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
|
url = if (rootProject.version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
|
||||||
credentials {
|
credentials(PasswordCredentials::class)
|
||||||
username = System.getenv("plexUser")
|
|
||||||
password = System.getenv("plexPassword")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,11 +69,9 @@ tasks.clean {
|
|||||||
tasks.register<Copy>("copyJars", fun Copy.() {
|
tasks.register<Copy>("copyJars", fun Copy.() {
|
||||||
dependsOn(tasks.jar)
|
dependsOn(tasks.jar)
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||||
from(subprojects.map {
|
subprojects.forEach { sub ->
|
||||||
it.project.tasks.shadowJar
|
from(sub.tasks.matching { it.name == "shadowJar" })
|
||||||
})
|
from(sub.tasks.matching { it.name == "jar" })
|
||||||
from(subprojects.map {
|
}
|
||||||
it.project.tasks.jar
|
|
||||||
})
|
|
||||||
into(file("build/libs"))
|
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
|
group = rootProject.group
|
||||||
version = rootProject.version
|
version = rootProject.version
|
||||||
description = "Plex-Velocity"
|
description = "Plex-Velocity"
|
||||||
|
|||||||
@@ -3,6 +3,11 @@ import java.text.SimpleDateFormat
|
|||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
plugins {
|
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("net.kyori.indra.git") version "4.0.0"
|
||||||
id("de.eldoria.plugin-yml.paper") version "0.9.0"
|
id("de.eldoria.plugin-yml.paper") version "0.9.0"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user