geforkt von Mirrors/FastAsyncWorldEdit
Generate maven artifacts
I'm not a kotlin dsl expert, but that seems to work.
Dieser Commit ist enthalten in:
Ursprung
a44800659e
Commit
38bdb929f4
@ -2,6 +2,9 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
`java-library`
|
`java-library`
|
||||||
|
maven
|
||||||
|
java
|
||||||
|
`maven-publish`
|
||||||
}
|
}
|
||||||
|
|
||||||
applyPlatformAndCoreConfiguration()
|
applyPlatformAndCoreConfiguration()
|
||||||
@ -81,6 +84,44 @@ tasks.named<Jar>("jar") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val jar: Jar by tasks
|
||||||
|
jar.archiveName = "FAWE-Bukkit-API-${project.version}.jar"
|
||||||
|
jar.destinationDir = file("../mvn/com/boydti/FAWE-Bukkit-API/" + project.version)
|
||||||
|
|
||||||
|
task("writeNewPom") {
|
||||||
|
doLast {
|
||||||
|
maven.pom {
|
||||||
|
withGroovyBuilder {
|
||||||
|
"project" {
|
||||||
|
groupId = "com.boydti"
|
||||||
|
artifactId = "FAWE-Bukkit-API"
|
||||||
|
version = "project.version"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}.writeTo("../mvn/com/boydti/FAWE-Bukkit-API/${project.version}/FAWE-Bukkit-API-${project.version}.pom")
|
||||||
|
maven.pom {
|
||||||
|
withGroovyBuilder {
|
||||||
|
"project" {
|
||||||
|
groupId = "com.boydti"
|
||||||
|
artifactId = "FAWE-Bukkit-API"
|
||||||
|
version = "latest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}.writeTo("../mvn/com/boydti/FAWE-Bukkit-API/latest/FAWE-Bukkit-API-latest.pom")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task("dataContent") {
|
||||||
|
doLast {
|
||||||
|
copySpec {
|
||||||
|
from("../mvn/com/boydti/FAWE-Bukkit-API/${project.version}/")
|
||||||
|
into("../mvn/com/boydti/FAWE-Bukkit-API/latest/")
|
||||||
|
include("*.jar")
|
||||||
|
rename("FAWE-Bukkit-API-${project.version}.jar", "FAWE-Bukkit-API-latest.jar")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tasks.named<ShadowJar>("shadowJar") {
|
tasks.named<ShadowJar>("shadowJar") {
|
||||||
dependencies {
|
dependencies {
|
||||||
relocate("org.slf4j", "com.sk89q.worldedit.slf4j")
|
relocate("org.slf4j", "com.sk89q.worldedit.slf4j")
|
||||||
@ -107,3 +148,7 @@ tasks.named<ShadowJar>("shadowJar") {
|
|||||||
tasks.named("assemble").configure {
|
tasks.named("assemble").configure {
|
||||||
dependsOn("shadowJar")
|
dependsOn("shadowJar")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.named("dataContent").configure {
|
||||||
|
dependsOn("writeNewPom")
|
||||||
|
}
|
||||||
|
@ -5,6 +5,9 @@ import com.mendhak.gradlecrowdin.UploadSourceFileTask
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("java-library")
|
id("java-library")
|
||||||
|
id("java")
|
||||||
|
id("maven")
|
||||||
|
id("maven-publish")
|
||||||
id("net.ltgt.apt-eclipse")
|
id("net.ltgt.apt-eclipse")
|
||||||
id("net.ltgt.apt-idea")
|
id("net.ltgt.apt-idea")
|
||||||
id("antlr")
|
id("antlr")
|
||||||
@ -98,6 +101,45 @@ tasks.named<Copy>("processResources") {
|
|||||||
"date" to "${rootProject.ext["date"]}")
|
"date" to "${rootProject.ext["date"]}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val jar: Jar by tasks
|
||||||
|
jar.archiveName = "FAWE-API-${project.version}.jar"
|
||||||
|
jar.destinationDir = file("../mvn/com/boydti/FAWE-API/" + project.version)
|
||||||
|
|
||||||
|
task("writeNewPom") {
|
||||||
|
doLast {
|
||||||
|
maven.pom {
|
||||||
|
withGroovyBuilder {
|
||||||
|
"project" {
|
||||||
|
groupId = "com.boydti"
|
||||||
|
artifactId = "FAWE-API"
|
||||||
|
version = "project.version"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}.writeTo("../mvn/com/boydti/FAWE-API/${project.version}/FAWE-API-${project.version}.pom")
|
||||||
|
maven.pom {
|
||||||
|
withGroovyBuilder {
|
||||||
|
"project" {
|
||||||
|
groupId = "com.boydti"
|
||||||
|
artifactId = "FAWE-API"
|
||||||
|
version = "latest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}.writeTo("../mvn/com/boydti/FAWE-API/latest/FAWE-API-latest.pom")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task("dataContent") {
|
||||||
|
doLast {
|
||||||
|
copySpec {
|
||||||
|
from("../mvn/com/boydti/FAWE-API/${project.version}/")
|
||||||
|
into("../mvn/com/boydti/FAWE-API/latest/")
|
||||||
|
include("*.jar")
|
||||||
|
rename("FAWE-API-${project.version}.jar", "FAWE-API-latest.jar")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tasks.named<ShadowJar>("shadowJar") {
|
tasks.named<ShadowJar>("shadowJar") {
|
||||||
dependencies {
|
dependencies {
|
||||||
include(dependency("com.github.luben:zstd-jni:1.4.3-1"))
|
include(dependency("com.github.luben:zstd-jni:1.4.3-1"))
|
||||||
@ -129,3 +171,8 @@ if (project.hasProperty(crowdinApiKey)) {
|
|||||||
dependsOn("crowdinDownload")
|
dependsOn("crowdinDownload")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.named("dataContent").configure {
|
||||||
|
dependsOn("writeNewPom")
|
||||||
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren