migrated settings.gradle to kotlin

Dieser Commit ist enthalten in:
MattBDev 2019-08-19 14:00:37 -04:00
Ursprung f04cae1686
Commit 45f947a3b2
7 geänderte Dateien mit 135 neuen und 165 gelöschten Zeilen

Datei anzeigen

@ -9,13 +9,13 @@ buildscript {
configurations.all {
resolutionStrategy {
force 'commons-io:commons-io:2.4'
force "commons-io:commons-io:2.4"
}
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.8.1'
classpath "com.github.jengelman.gradle.plugins:shadow:2.0.4"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.8.1"
}
}
@ -29,8 +29,8 @@ println """
You are building FastAsyncWorldEdit!
If you encounter trouble:
1) Read COMPILING.md if you haven't yet
2) Try running 'build' in a separate Gradle run
1) Read COMPILING.md if you haven"t yet
2) Try running "build" in a separate Gradle run
3) Use gradlew and not gradle
4) If you still need help, ask on Discord! https://discord.gg/ngZCzbU
@ -39,18 +39,18 @@ println """
"""
allprojects {
group = 'com.boydti.fawe'
group = "com.boydti.fawe"
def rootVersion = "1.13"
def revision = ""
def buildNumber = ""
def date = ""
ext {
git = Grgit.open(dir: new File(rootDir.toString()+'/.git'))
git = Grgit.open(dir: new File(rootDir.toString()+"/.git"))
date = git.head().getDate().format("yy.MM.dd")
revision = "-${git.head().abbreviatedId}"
parents = git.head().parentIds;
if (project.hasProperty('buildnumber')) {
if (project.hasProperty("buildnumber")) {
buildNumber = "$buildnumber"
} else {
index = -2109; // Offset to match CI
@ -87,33 +87,29 @@ subprojects {
maven { url "http://dl.bintray.com/tastybento/maven-repo" }
maven { url "http://ci.emc.gs/nexus/content/groups/aikar/" }
ivy {
url 'https://ci.athion.net/job'
layout 'pattern', {
artifact '/[organisation]/[revision]/artifact/[module].[ext]'
url "https://ci.athion.net/job"
layout "pattern", {
artifact "/[organisation]/[revision]/artifact/[module].[ext]"
}
}
}
configurations.all {
resolutionStrategy {
cacheChangingModulesFor 5, 'minutes'
cacheChangingModulesFor 5, "minutes"
}
}
}
configure(['worldedit-core', 'worldedit-bukkit'].collect { project("$it") }) {
apply plugin: 'java'
apply plugin: 'maven'
// apply plugin: 'checkstyle'
apply plugin: 'com.github.johnrengelman.shadow'
// apply plugin: 'com.jfrog.artifactory'
// Enable this requires putting license header files in many, many FAWE files
// apply plugin: 'net.minecrell.licenser'
configure(["worldedit-core", "worldedit-bukkit"].collect { project("$it") }) {
apply plugin: "java"
apply plugin: "maven"
// apply plugin: "checkstyle"
apply plugin: "com.github.johnrengelman.shadow"
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
// checkstyle.configFile = new File(rootProject.projectDir, "config/checkstyle/checkstyle.xml")
// checkstyle.toolVersion = '7.6.1'
// checkstyle.toolVersion = "7.6.1"
clean.doFirst {
delete "../target"
@ -122,13 +118,13 @@ configure(['worldedit-core', 'worldedit-bukkit'].collect { project("$it") }) {
if (JavaVersion.current().isJava8Compatible()) {
// Java 8 turns on doclint which we fail
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption("Xdoclint:none", "-quiet")
}
}
if (name == "worldedit-core" || name == "worldedit-bukkit") {
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
classifier = "sources"
from sourceSets.main.allSource
}
@ -141,46 +137,37 @@ configure(['worldedit-core', 'worldedit-bukkit'].collect { project("$it") }) {
// build.dependsOn(checkstyleMain)
// build.dependsOn(checkstyleTest)
// build.dependsOn(javadocJar)
//
// artifactoryPublish {
// publishConfigs('archives')
// }
dependencies {
compileOnly 'org.jetbrains:annotations:17.0.0'
compileOnly "org.jetbrains:annotations:17.0.0"
}
}
configure(['bukkit'].collect { project(":worldedit-$it") }) {
configure(["bukkit"].collect { project(":worldedit-$it") }) {
shadowJar {
getArchiveClassifier().set('dist')
getArchiveClassifier().set("dist")
dependencies {
include(project(":worldedit-libs:core"))
include(project(":worldedit-libs:${project.name.replace("worldedit-", "")}"))
include(project(":worldedit-core"))
include(dependency('com.github.luben:zstd-jni:1.1.1'))
include(dependency('co.aikar:fastutil-lite:1.0'))
include(dependency("com.github.luben:zstd-jni:1.1.1"))
include(dependency("co.aikar:fastutil-lite:1.0"))
}
exclude 'GradleStart**'
exclude '.cache'
exclude 'LICENSE*'
exclude "GradleStart**"
exclude ".cache"
exclude "LICENSE*"
}
// Enable this requires putting license header files in many, many FAWE files
//license {
// header = rootProject.file("HEADER.txt")
// include '**/*.java'
//}
}
task aggregatedJavadocs(type: Javadoc, description: 'Generate javadocs from all child projects as if it was a single project', group: 'Documentation') {
task aggregatedJavadocs(type: Javadoc, description: "Generate javadocs from all child projects as if it was a single project", group: "Documentation") {
destinationDir = file("./docs/javadoc")
title = "$project.name $version API"
options.author true
options.links 'http://docs.spring.io/spring/docs/4.3.x/javadoc-api/', 'http://docs.oracle.com/javase/8/docs/api/', 'http://docs.spring.io/spring-ws/docs/2.3.0.RELEASE/api/', 'http://docs.spring.io/spring-security/site/docs/4.0.4.RELEASE/apidocs/'
options.addStringOption('Xdoclint:none', '-quiet')
options.links "http://docs.spring.io/spring/docs/4.3.x/javadoc-api/", "http://docs.oracle.com/javase/8/docs/api/", "http://docs.spring.io/spring-ws/docs/2.3.0.RELEASE/api/", "http://docs.spring.io/spring-security/site/docs/4.0.4.RELEASE/apidocs/"
options.addStringOption("Xdoclint:none", "-quiet")
delete "./docs"

Datei anzeigen

@ -1,4 +1,4 @@
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
#group=com.sk89q.worldedit
#version=7.1.0-SNAPSHOT
org.gradle.jvmargs=-Xmx1G

Datei anzeigen

@ -1,9 +0,0 @@
rootProject.name = 'FastAsyncWorldEdit'
include 'worldedit-libs'
['core', 'bukkit'].forEach {
include "worldedit-libs:$it"
include "worldedit-$it"
}
include "worldedit-libs:core:ap"

9
settings.gradle.kts Normale Datei
Datei anzeigen

@ -0,0 +1,9 @@
rootProject.name = "FastAsyncWorldEdit"
include("worldedit-libs")
listOf("core", "bukkit").forEach {
include("worldedit-libs:$it")
include("worldedit-$it")
}
include("worldedit-libs:core:ap")

Datei anzeigen

@ -1,7 +1,7 @@
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'java-library'
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "maven"
apply plugin: "java-library"
repositories {
maven { url "https://hub.spigotmc.org/nexus/content/groups/public" }
@ -19,72 +19,68 @@ configurations.all { Configuration it ->
}
dependencies {
compile ('net.milkbowl.vault:VaultAPI:1.7')
api project(':worldedit-core')
api project(':worldedit-libs:core') // TODO remove once core can compile
api project(':worldedit-libs:bukkit')
compileOnly 'com.sk89q:dummypermscompat:1.10'
compile ("net.milkbowl.vault:VaultAPI:1.7")
api project(":worldedit-core")
api project(":worldedit-libs:core") // TODO remove once core can compile
api project(":worldedit-libs:bukkit")
compileOnly "com.sk89q:dummypermscompat:1.10"
compile "it.unimi.dsi:fastutil:8.2.1"
testCompile 'org.mockito:mockito-core:1.9.0-rc1'
implementation('org.apache.logging.log4j:log4j-slf4j-impl:2.8.1'){transitive = false}
compile 'com.destroystokyo.paper:paper-api:1.14.4-R0.1-SNAPSHOT'
implementation('io.papermc:paperlib:1.0.2'){transitive = false}
compileOnly 'BuildTools:spigot-1.14.4:lastSuccessfulBuild@jar'
implementation('com.sk89q.worldguard:worldguard-core:7.0.0-20190215.210421-39'){transitive = false}
implementation('com.sk89q.worldguard:worldguard-legacy:7.0.0-20190215.210421-39'){transitive = false}
implementation('com.massivecraft:factions:2.8.0'){transitive = false}
implementation('com.drtshock:factions:1.6.9.5'){transitive = false}
implementation('com.factionsone:FactionsOne:1.2.2'){transitive = false}
implementation('me.ryanhamshire:GriefPrevention:11.5.2'){transitive = false}
implementation('com.massivecraft:mcore:7.0.1'){transitive = false}
implementation('net.sacredlabyrinth.Phaed:PreciousStones:10.0.4-SNAPSHOT'){transitive = false}
implementation('net.jzx7:regios:5.9.9'){transitive = false}
implementation('com.bekvon.bukkit.residence:Residence:4.5._13.1'){transitive = false}
implementation('com.palmergames.bukkit:towny:0.84.0.9'){transitive = false}
implementation('com.thevoxelbox.voxelsniper:voxelsniper:5.171.0'){transitive = false}
implementation('com.comphenix.protocol:ProtocolLib-API:4.4.0-SNAPSHOT'){transitive = false}
implementation('com.wasteofplastic:askyblock:3.0.8.2'){transitive = false}
testCompile "org.mockito:mockito-core:1.9.0-rc1"
implementation("org.apache.logging.log4j:log4j-slf4j-impl:2.8.1"){transitive = false}
compile "com.destroystokyo.paper:paper-api:1.14.4-R0.1-SNAPSHOT"
implementation("io.papermc:paperlib:1.0.2"){transitive = false}
compileOnly "BuildTools:spigot-1.14.4:lastSuccessfulBuild@jar"
implementation("com.sk89q.worldguard:worldguard-core:7.0.0-20190215.210421-39"){transitive = false}
implementation("com.sk89q.worldguard:worldguard-legacy:7.0.0-20190215.210421-39"){transitive = false}
implementation("com.massivecraft:factions:2.8.0"){transitive = false}
implementation("com.drtshock:factions:1.6.9.5"){transitive = false}
implementation("com.factionsone:FactionsOne:1.2.2"){transitive = false}
implementation("me.ryanhamshire:GriefPrevention:11.5.2"){transitive = false}
implementation("com.massivecraft:mcore:7.0.1"){transitive = false}
implementation("net.sacredlabyrinth.Phaed:PreciousStones:10.0.4-SNAPSHOT"){transitive = false}
implementation("net.jzx7:regios:5.9.9"){transitive = false}
implementation("com.bekvon.bukkit.residence:Residence:4.5._13.1"){transitive = false}
implementation("com.palmergames.bukkit:towny:0.84.0.9"){transitive = false}
implementation("com.thevoxelbox.voxelsniper:voxelsniper:5.171.0"){transitive = false}
implementation("com.comphenix.protocol:ProtocolLib-API:4.4.0-SNAPSHOT"){transitive = false}
implementation("com.wasteofplastic:askyblock:3.0.8.2"){transitive = false}
}
shadowJar {
dependencies {
relocate "org.slf4j", "com.sk89q.worldedit.slf4j"
relocate "org.apache.logging.slf4j", "com.sk89q.worldedit.log4jbridge"
include(dependency(':worldedit-core'))
include(dependency(':worldedit-libs:core'))
include(dependency(':worldedit-libs:bukkit'))
include(dependency('org.slf4j:slf4j-api'))
include(dependency(":worldedit-core"))
include(dependency(":worldedit-libs:core"))
include(dependency(":worldedit-libs:bukkit"))
include(dependency("org.slf4j:slf4j-api"))
include(dependency("org.apache.logging.log4j:log4j-slf4j-impl"))
relocate("it.unimi.dsi.fastutil", "com.sk89q.worldedit.bukkit.fastutil") {
include("it.unimi.dsi:fastutil")
}
}
archiveName = "${parent.name}-${project.name.replaceAll("worldedit-", "")}-${parent.version}.jar"
destinationDir = file '../target'
destinationDir = file "../target"
}
processResources {
from('src/main/resources') {
from("src/main/resources") {
expand(
name: project.parent.name,
version: project.parent.version
)
include 'plugin.yml'
include "plugin.yml"
}
// from (zipTree('src/main/resources/worldedit-adapters.jar').matching {
// exclude 'META-INF/'
// })
// exclude '**/worldedit-adapters.jar'
}
jar.archiveName="fawe-bukkit-${project.parent.version}.jar"
jar.destinationDir = file '../mvn/com/boydti/fawe-bukkit/' + project.parent.version
jar.destinationDir = file "../mvn/com/boydti/fawe-bukkit/" + project.parent.version
task createPom {
doLast {
pom {
project {
groupId 'com.boydti'
artifactId 'fawe-bukkit'
groupId "com.boydti"
artifactId "fawe-bukkit"
version project.parent.version
}
}
@ -93,9 +89,9 @@ task createPom {
.writeTo("../mvn/com/boydti/fawe-bukkit/${project.parent.version}/fawe-bukkit-${project.parent.version}.pom")
pom {
project {
groupId 'com.boydti'
artifactId 'fawe-bukkit'
version 'latest'
groupId "com.boydti"
artifactId "fawe-bukkit"
version "latest"
}
}
.getEffectivePom()
@ -107,9 +103,9 @@ task copyFiles {
doLast {
copy {
from "../mvn/com/boydti/fawe-bukkit/${project.parent.version}/"
into '../mvn/com/boydti/fawe-bukkit/latest/'
include('*.jar')
rename ("fawe-bukkit-${project.parent.version}.jar", 'fawe-bukkit-latest.jar')
into "../mvn/com/boydti/fawe-bukkit/latest/"
include("*.jar")
rename ("fawe-bukkit-${project.parent.version}.jar", "fawe-bukkit-latest.jar")
}
}
}

Datei anzeigen

@ -21,35 +21,35 @@ configurations.all { Configuration it ->
}
dependencies {
compile project(':worldedit-libs:core')
compile 'de.schlichtherle:truezip:6.8.3'
compile 'rhino:js:1.7R2'
compile 'org.yaml:snakeyaml:1.23'
compile 'com.google.guava:guava:21.0'
compile 'com.google.code.findbugs:jsr305:1.3.9'
compile 'com.thoughtworks.paranamer:paranamer:2.6'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.googlecode.json-simple:json-simple:1.1.1'
compile 'org.slf4j:slf4j-api:1.7.26'
compile project(":worldedit-libs:core")
compile "de.schlichtherle:truezip:6.8.3"
compile "rhino:js:1.7R2"
compile "org.yaml:snakeyaml:1.23"
compile "com.google.guava:guava:21.0"
compile "com.google.code.findbugs:jsr305:1.3.9"
compile "com.thoughtworks.paranamer:paranamer:2.6"
compile "com.google.code.gson:gson:2.8.0"
compile "com.googlecode.json-simple:json-simple:1.1.1"
compile "org.slf4j:slf4j-api:1.7.26"
compile "it.unimi.dsi:fastutil:8.2.1"
compileOnly project(':worldedit-libs:core:ap')
annotationProcessor project(':worldedit-libs:core:ap')
compileOnly project(":worldedit-libs:core:ap")
annotationProcessor project(":worldedit-libs:core:ap")
annotationProcessor "com.google.guava:guava:21.0"
def avVersion = "1.6.5"
compileOnly "com.google.auto.value:auto-value-annotations:$avVersion"
annotationProcessor "com.google.auto.value:auto-value:$avVersion"
//compile 'net.sf.trove4j:trove4j:3.0.3'
testCompile 'org.mockito:mockito-core:1.9.0-rc1'
//compile "net.sf.trove4j:trove4j:3.0.3"
testCompile "org.mockito:mockito-core:1.9.0-rc1"
// Fawe depends
compileOnly 'net.fabiozumbi12:redprotect:1.9.6'
compileOnly "net.fabiozumbi12:redprotect:1.9.6"
compileOnly ("com.github.intellectualsites.plotsquared:PlotSquared-API:latest") {
transitive = false
}
compile 'com.mojang:datafixerupper:1.0.20'
compile 'com.github.luben:zstd-jni:1.1.1'
compile 'co.aikar:fastutil-lite:1.0'
compile "com.mojang:datafixerupper:1.0.20"
compile "com.github.luben:zstd-jni:1.1.1"
compile "co.aikar:fastutil-lite:1.0"
testImplementation ("org.junit.jupiter:junit-jupiter-api:5.5.0")
testImplementation ("org.junit.jupiter:junit-jupiter-params:5.5.0")
testImplementation ("org.mockito:mockito-core:3.0.0")
@ -66,18 +66,18 @@ tasks.withType(JavaCompile).configureEach {
sourceSets {
main {
java {
srcDir 'src/main/java'
srcDir 'src/legacy/java'
srcDir "src/main/java"
srcDir "src/legacy/java"
}
resources {
srcDir 'src/main/resources'
srcDir "src/main/resources"
}
}
}
processResources {
from('src/main/resources') {
include 'fawe.properties'
from("src/main/resources") {
include "fawe.properties"
expand(
version: "${project.parent.version}",
name: project.parent.name,
@ -88,13 +88,13 @@ processResources {
}
jar.archiveName="fawe-api-${project.parent.version}.jar"
jar.destinationDir = file '../mvn/com/boydti/fawe-api/' + project.parent.version
jar.destinationDir = file "../mvn/com/boydti/fawe-api/" + project.parent.version
task createPom {
doLast {
pom {
project {
groupId 'com.boydti'
artifactId 'fawe-api'
groupId "com.boydti"
artifactId "fawe-api"
version project.parent.version
}
}
@ -103,9 +103,9 @@ task createPom {
.writeTo("../mvn/com/boydti/fawe-api/${project.parent.version}/fawe-api-${project.parent.version}.pom")
pom {
project {
groupId 'com.boydti'
artifactId 'fawe-api'
version 'latest'
groupId "com.boydti"
artifactId "fawe-api"
version "latest"
}
}
.getEffectivePom()
@ -117,9 +117,9 @@ task copyFiles {
doLast {
copy {
from "../mvn/com/boydti/fawe-api/${project.parent.version}/"
into '../mvn/com/boydti/fawe-api/latest/'
include('*.jar')
rename ("fawe-api-${project.parent.version}.jar", 'fawe-api-latest.jar')
into "../mvn/com/boydti/fawe-api/latest/"
include("*.jar")
rename ("fawe-api-${project.parent.version}.jar", "fawe-api-latest.jar")
}
}
}

Datei anzeigen

@ -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") })