migrated settings.gradle to kotlin

This commit is contained in:
MattBDev
2019-08-19 14:00:37 -04:00
parent f04cae1686
commit 45f947a3b2
7 changed files with 135 additions and 165 deletions

View File

@ -9,13 +9,13 @@ those libraries whose classes are internally depended on.
This is because the main reason for shading those libraries is for
their internal usage in each platform, not because we need them available to
dependents of `-core` to compile and work with WorldEdit's API.
dependents of `-core` to compile and work with WorldEdit"s API.
*/
configure(subprojects + project("core:ap")) {
apply plugin: 'maven'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.jfrog.artifactory'
apply plugin: "maven"
apply plugin: "com.github.johnrengelman.shadow"
apply plugin: "com.jfrog.artifactory"
configurations {
create("shade")
getByName("archives").extendsFrom(getByName("default"))
@ -33,7 +33,7 @@ configure(subprojects + project("core:ap")) {
exclude(dependency("org.checkerframework:checker-qual"))
}
relocate('net.kyori.text', 'com.sk89q.worldedit.util.formatting.text')
relocate("net.kyori.text", "com.sk89q.worldedit.util.formatting.text")
}
def altConfigFiles = { String artifactType ->
def deps = configurations.shade.incoming.dependencies
@ -42,7 +42,7 @@ configure(subprojects + project("core:ap")) {
dependency.artifact { artifact ->
artifact.name = dependency.name
artifact.type = artifactType
artifact.extension = 'jar'
artifact.extension = "jar"
artifact.classifier = artifactType
}
dependency
@ -55,15 +55,15 @@ configure(subprojects + project("core:ap")) {
}
tasks.register("sourcesJar", Jar) {
from {
altConfigFiles('sources')
altConfigFiles("sources")
}
def filePattern = ~'(.*)net/kyori/text((?:/|$).*)'
def filePattern = ~/(.*)net\/kyori\/text((?:\/|\u0024).*)/
def textPattern = ~/net\.kyori\.text/
eachFile {
it.filter { String line ->
line.replaceFirst(textPattern, 'com.sk89q.worldedit.util.formatting.text')
line.replaceFirst(textPattern, "com.sk89q.worldedit.util.formatting.text")
}
it.path = it.path.replaceFirst(filePattern, '$1com/sk89q/worldedit/util/formatting/text$2')
it.path = it.path.replaceFirst(filePattern, "\$1com/sk89q/worldedit/util/formatting/text\$2")
}
classifier = "sources"
}
@ -82,7 +82,7 @@ configure(subprojects + project("core:ap")) {
}
artifactoryPublish {
publishConfigs('default')
publishConfigs("default")
}
build.dependsOn(jar, sourcesJar)
@ -91,7 +91,7 @@ configure(subprojects + project("core:ap")) {
def textExtrasVersion = "3.0.2"
project("core") {
def textVersion = "3.0.2"
def pistonVersion = '0.4.4-SNAPSHOT'
def pistonVersion = "0.4.4-SNAPSHOT"
dependencies {
shade "net.kyori:text-api:$textVersion"
@ -99,11 +99,11 @@ project("core") {
shade "net.kyori:text-serializer-legacy:$textVersion"
shade "net.kyori:text-serializer-plain:$textVersion"
shade "net.kyori:text-feature-pagination:$textVersion"
shade('com.sk89q:jchronic:0.2.4a') {
shade("com.sk89q:jchronic:0.2.4a") {
exclude(group: "junit", module: "junit")
}
shade 'com.thoughtworks.paranamer:paranamer:2.6'
shade 'com.sk89q.lib:jlibnoise:1.0.0'
shade "com.thoughtworks.paranamer:paranamer:2.6"
shade "com.sk89q.lib:jlibnoise:1.0.0"
shade "FAWE-Piston:lastSuccessfulBuild:core/build/libs/core-$pistonVersion@jar"
shade "FAWE-Piston:lastSuccessfulBuild:core-ap/runtime/build/libs/runtime-$pistonVersion@jar"
shade "FAWE-Piston:lastSuccessfulBuild:default-impl/build/libs/default-impl-$pistonVersion@jar"
@ -133,19 +133,6 @@ project("bukkit") {
shade "net.kyori:text-adapter-bukkit:$textExtrasVersion"
}
}
/*
project("sponge") {
repositories {
maven {
name = "Sponge"
url = "https://repo.spongepowered.org/maven"
}
}
dependencies {
shade "net.kyori:text-adapter-spongeapi:$textExtrasVersion"
}
}
*/
tasks.register("build") {
dependsOn(subprojects.collect { it.tasks.named("build") })