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