mirror of
https://github.com/plexusorg/BukkitTelnet.git
synced 2024-11-22 04:35:00 +00:00
Fix publishing
This commit is contained in:
parent
0ebb2b8fae
commit
dfb13d5185
38
build.gradle
38
build.gradle
@ -1,15 +1,13 @@
|
|||||||
import java.nio.charset.StandardCharsets
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "java"
|
id "java"
|
||||||
|
id "maven-publish"
|
||||||
id "net.minecrell.plugin-yml.bukkit" version "0.6.1-SNAPSHOT"
|
id "net.minecrell.plugin-yml.bukkit" version "0.6.1-SNAPSHOT"
|
||||||
id 'com.github.johnrengelman.shadow' version '7.1.2'
|
id 'com.github.johnrengelman.shadow' version '7.1.2'
|
||||||
id "maven-publish"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "me.totalfreedom"
|
group = "me.totalfreedom"
|
||||||
|
version = "4.8"
|
||||||
description = "BukkitTelnet"
|
description = "BukkitTelnet"
|
||||||
version = "4.8-SNAPSHOT"
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@ -39,19 +37,14 @@ tasks {
|
|||||||
jar {
|
jar {
|
||||||
dependsOn(shadowJar)
|
dependsOn(shadowJar)
|
||||||
}
|
}
|
||||||
compileJava {
|
}
|
||||||
options.encoding = StandardCharsets.UTF_8.name() // We want UTF-8 for everything
|
|
||||||
|
|
||||||
// Set the release flag. This configures what version bytecode the compiler will emit, as well as what JDK APIs are usable.
|
java {
|
||||||
// See https://openjdk.java.net/jeps/247 for more information.
|
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
|
||||||
options.release.set(17)
|
|
||||||
}
|
|
||||||
javadoc {
|
|
||||||
options.encoding = StandardCharsets.UTF_8.name() // We want UTF-8 for everything
|
|
||||||
}
|
|
||||||
processResources {
|
|
||||||
filteringCharset = StandardCharsets.UTF_8.name() // We want UTF-8 for everything
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType(JavaCompile) {
|
||||||
|
options.encoding = "UTF-8"
|
||||||
}
|
}
|
||||||
|
|
||||||
bukkit {
|
bukkit {
|
||||||
@ -74,20 +67,31 @@ publishing {
|
|||||||
def config = configurations.getByName("library")
|
def config = configurations.getByName("library")
|
||||||
publications {
|
publications {
|
||||||
maven(MavenPublication) {
|
maven(MavenPublication) {
|
||||||
|
groupId = 'me.totalfreedom'
|
||||||
|
artifactId = 'BukkitTelnet'
|
||||||
|
version = rootProject.version
|
||||||
pom.withXml {
|
pom.withXml {
|
||||||
|
def dependenciesNode = asNode().appendNode("dependencies")
|
||||||
config.getAllDependencies().each { dependency ->
|
config.getAllDependencies().each { dependency ->
|
||||||
asNode().dependencies[0].appendNode("dependency").with {
|
dependenciesNode.appendNode("dependency").with {
|
||||||
it.appendNode("groupId", dependency.group)
|
it.appendNode("groupId", dependency.group)
|
||||||
it.appendNode("artifactId", dependency.name)
|
it.appendNode("artifactId", dependency.name)
|
||||||
it.appendNode("version", dependency.version)
|
it.appendNode("version", dependency.version)
|
||||||
it.appendNode("scope", "provided")
|
it.appendNode("scope", "provided")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
configurations.getByName("compileOnly").getAllDependencies().each { dependency ->
|
||||||
|
dependenciesNode.appendNode("dependency").with {
|
||||||
|
it.appendNode("groupId", dependency.group)
|
||||||
|
it.appendNode("artifactId", dependency.name)
|
||||||
|
it.appendNode("version", dependency.version)
|
||||||
|
it.appendNode("scope", "provided")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
from(components.java)
|
|
||||||
artifacts = [shadowJar]
|
artifacts = [shadowJar]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url = uri("https://nexus.telesphoreo.me/repository/totalfreedom/")
|
url = uri("https://nexus.telesphoreo.me/repository/totalfreedom/")
|
||||||
|
Loading…
Reference in New Issue
Block a user