2019-04-09 15:03:39 +00:00
|
|
|
import org.ajoberstar.grgit.Grgit
|
|
|
|
|
2014-04-06 02:33:05 +00:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2014-11-14 19:27:39 +00:00
|
|
|
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
|
2014-05-15 18:41:26 +00:00
|
|
|
jcenter()
|
2014-04-06 02:33:05 +00:00
|
|
|
}
|
|
|
|
|
2015-02-12 21:30:49 +00:00
|
|
|
configurations.all {
|
|
|
|
resolutionStrategy {
|
2019-08-19 18:00:37 +00:00
|
|
|
force "commons-io:commons-io:2.4"
|
2015-02-12 21:30:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-04-06 02:33:05 +00:00
|
|
|
dependencies {
|
2019-08-19 18:00:37 +00:00
|
|
|
classpath "com.github.jengelman.gradle.plugins:shadow:2.0.4"
|
|
|
|
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.8.1"
|
2014-04-06 02:33:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-04 07:29:34 +00:00
|
|
|
plugins {
|
2019-04-09 15:03:39 +00:00
|
|
|
id "org.ajoberstar.grgit" version "3.1.1"
|
2019-07-17 09:43:14 +00:00
|
|
|
id "com.github.johnrengelman.shadow" version "5.1.0"
|
2019-08-19 18:32:30 +00:00
|
|
|
id 'com.gradle.build-scan' version '2.1'
|
2019-08-19 18:16:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
buildScan {
|
2019-08-19 18:32:30 +00:00
|
|
|
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
|
|
|
|
termsOfServiceAgree = 'yes'
|
2018-10-04 07:29:34 +00:00
|
|
|
}
|
|
|
|
|
2019-06-27 01:34:20 +00:00
|
|
|
println """
|
|
|
|
*******************************************
|
2019-07-17 09:43:14 +00:00
|
|
|
You are building FastAsyncWorldEdit!
|
2019-03-31 08:39:52 +00:00
|
|
|
|
2019-06-27 01:34:20 +00:00
|
|
|
If you encounter trouble:
|
2019-08-19 18:00:37 +00:00
|
|
|
1) Read COMPILING.md if you haven"t yet
|
|
|
|
2) Try running "build" in a separate Gradle run
|
2019-06-27 01:34:20 +00:00
|
|
|
3) Use gradlew and not gradle
|
|
|
|
4) If you still need help, ask on Discord! https://discord.gg/ngZCzbU
|
|
|
|
|
|
|
|
Output files will be in /target
|
|
|
|
*******************************************
|
|
|
|
"""
|
2018-10-04 07:29:34 +00:00
|
|
|
|
2019-07-18 10:12:23 +00:00
|
|
|
allprojects {
|
2019-08-19 18:00:37 +00:00
|
|
|
group = "com.boydti.fawe"
|
2019-07-18 06:56:57 +00:00
|
|
|
|
2019-07-18 10:12:23 +00:00
|
|
|
def rootVersion = "1.13"
|
|
|
|
def revision = ""
|
|
|
|
def buildNumber = ""
|
|
|
|
def date = ""
|
|
|
|
ext {
|
2019-08-19 18:00:37 +00:00
|
|
|
git = Grgit.open(dir: new File(rootDir.toString()+"/.git"))
|
2019-07-18 10:12:23 +00:00
|
|
|
date = git.head().getDate().format("yy.MM.dd")
|
|
|
|
revision = "-${git.head().abbreviatedId}"
|
|
|
|
parents = git.head().parentIds;
|
2019-08-19 18:00:37 +00:00
|
|
|
if (project.hasProperty("buildnumber")) {
|
2019-07-18 10:12:23 +00:00
|
|
|
buildNumber = "$buildnumber"
|
|
|
|
} else {
|
|
|
|
index = -2109; // Offset to match CI
|
|
|
|
for (; parents != null && !parents.isEmpty(); index++) {
|
|
|
|
parents = git.getResolve().toCommit(parents.get(0)).getParentIds()
|
|
|
|
}
|
|
|
|
buildNumber = "${index}"
|
2018-08-12 17:38:20 +00:00
|
|
|
}
|
2014-11-14 19:27:39 +00:00
|
|
|
}
|
2019-05-02 17:28:09 +00:00
|
|
|
|
2019-07-06 00:46:48 +00:00
|
|
|
version = String.format("%s.%s", rootVersion, buildNumber)
|
|
|
|
}
|
2019-08-06 15:28:12 +00:00
|
|
|
|
2019-04-16 22:35:39 +00:00
|
|
|
description = rootProject.name
|
2016-06-18 07:32:17 +00:00
|
|
|
|
2014-11-14 19:27:39 +00:00
|
|
|
subprojects {
|
2019-06-27 01:34:20 +00:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
maven { url "http://maven.sk89q.com/repo/" }
|
|
|
|
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
|
|
|
maven { url "http://repo.maven.apache.org/maven2" }
|
|
|
|
// Fawe
|
|
|
|
maven { url "https://mvnrepository.com/artifact/" }
|
|
|
|
maven { url "http://repo.dmulloy2.net/content/groups/public/" }
|
|
|
|
maven { url "https://repo.destroystokyo.com/repository/maven-public//" }
|
|
|
|
maven { url "http://ci.athion.net/job/PlotSquared-Breaking/ws/mvn/" }
|
|
|
|
maven { url "https://libraries.minecraft.net" }
|
|
|
|
mavenLocal()
|
|
|
|
maven { url "http://empcraft.com/maven2" }
|
|
|
|
maven { url "https://hub.spigotmc.org/nexus/content/groups/public/" }
|
|
|
|
maven { url "http://ci.frostcast.net/plugin/repository/everything" }
|
|
|
|
maven { url "http://maven.sk89q.com/artifactory/repo" }
|
|
|
|
maven { url "http://repo.spongepowered.org/maven" }
|
|
|
|
maven { url "http://dl.bintray.com/tastybento/maven-repo" }
|
|
|
|
maven { url "http://ci.emc.gs/nexus/content/groups/aikar/" }
|
2019-07-18 06:56:57 +00:00
|
|
|
ivy {
|
2019-08-19 18:00:37 +00:00
|
|
|
url "https://ci.athion.net/job"
|
|
|
|
layout "pattern", {
|
|
|
|
artifact "/[organisation]/[revision]/artifact/[module].[ext]"
|
2019-07-18 06:56:57 +00:00
|
|
|
}
|
|
|
|
}
|
2019-06-27 01:34:20 +00:00
|
|
|
}
|
|
|
|
configurations.all {
|
|
|
|
resolutionStrategy {
|
2019-08-19 18:00:37 +00:00
|
|
|
cacheChangingModulesFor 5, "minutes"
|
2019-06-27 01:34:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-08-19 18:00:37 +00:00
|
|
|
configure(["worldedit-core", "worldedit-bukkit"].collect { project("$it") }) {
|
|
|
|
apply plugin: "java"
|
|
|
|
apply plugin: "maven"
|
|
|
|
// apply plugin: "checkstyle"
|
|
|
|
apply plugin: "com.github.johnrengelman.shadow"
|
2018-06-16 06:36:55 +00:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
2018-08-15 14:04:16 +00:00
|
|
|
|
2019-06-27 01:34:20 +00:00
|
|
|
// checkstyle.configFile = new File(rootProject.projectDir, "config/checkstyle/checkstyle.xml")
|
2019-08-19 18:00:37 +00:00
|
|
|
// checkstyle.toolVersion = "7.6.1"
|
2019-06-27 01:34:20 +00:00
|
|
|
|
2019-05-02 17:28:09 +00:00
|
|
|
clean.doFirst {
|
|
|
|
delete "../target"
|
|
|
|
}
|
|
|
|
|
2019-06-27 01:34:20 +00:00
|
|
|
if (JavaVersion.current().isJava8Compatible()) {
|
|
|
|
// Java 8 turns on doclint which we fail
|
|
|
|
tasks.withType(Javadoc) {
|
2019-08-19 18:00:37 +00:00
|
|
|
options.addStringOption("Xdoclint:none", "-quiet")
|
2019-06-27 01:34:20 +00:00
|
|
|
}
|
2014-04-06 02:33:05 +00:00
|
|
|
}
|
|
|
|
|
2019-07-06 00:46:48 +00:00
|
|
|
if (name == "worldedit-core" || name == "worldedit-bukkit") {
|
2016-01-12 23:32:58 +00:00
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
2019-08-19 18:00:37 +00:00
|
|
|
classifier = "sources"
|
2016-01-12 23:32:58 +00:00
|
|
|
from sourceSets.main.allSource
|
|
|
|
}
|
|
|
|
|
|
|
|
artifacts {
|
|
|
|
archives sourcesJar
|
|
|
|
}
|
|
|
|
build.dependsOn(sourcesJar)
|
|
|
|
}
|
|
|
|
|
2019-06-27 01:34:20 +00:00
|
|
|
// build.dependsOn(checkstyleMain)
|
|
|
|
// build.dependsOn(checkstyleTest)
|
2019-07-06 00:46:48 +00:00
|
|
|
// build.dependsOn(javadocJar)
|
2019-06-27 01:34:20 +00:00
|
|
|
|
2019-05-29 03:23:51 +00:00
|
|
|
dependencies {
|
2019-08-19 18:00:37 +00:00
|
|
|
compileOnly "org.jetbrains:annotations:17.0.0"
|
2019-05-29 03:23:51 +00:00
|
|
|
}
|
2019-07-17 09:43:14 +00:00
|
|
|
}
|
2019-05-29 03:23:51 +00:00
|
|
|
|
2019-08-19 18:00:37 +00:00
|
|
|
configure(["bukkit"].collect { project(":worldedit-$it") }) {
|
2019-07-17 09:43:14 +00:00
|
|
|
shadowJar {
|
2019-08-19 18:00:37 +00:00
|
|
|
getArchiveClassifier().set("dist")
|
2019-07-17 09:43:14 +00:00
|
|
|
dependencies {
|
|
|
|
include(project(":worldedit-libs:core"))
|
|
|
|
include(project(":worldedit-libs:${project.name.replace("worldedit-", "")}"))
|
|
|
|
include(project(":worldedit-core"))
|
2019-08-19 18:00:37 +00:00
|
|
|
include(dependency("com.github.luben:zstd-jni:1.1.1"))
|
|
|
|
include(dependency("co.aikar:fastutil-lite:1.0"))
|
2019-05-02 17:28:09 +00:00
|
|
|
}
|
2019-08-19 18:00:37 +00:00
|
|
|
exclude "GradleStart**"
|
|
|
|
exclude ".cache"
|
|
|
|
exclude "LICENSE*"
|
2019-05-02 17:28:09 +00:00
|
|
|
}
|
2019-06-27 01:34:20 +00:00
|
|
|
|
2019-05-02 17:28:09 +00:00
|
|
|
}
|
2019-07-18 06:56:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-19 18:00:37 +00:00
|
|
|
task aggregatedJavadocs(type: Javadoc, description: "Generate javadocs from all child projects as if it was a single project", group: "Documentation") {
|
2019-07-17 09:43:14 +00:00
|
|
|
destinationDir = file("./docs/javadoc")
|
|
|
|
title = "$project.name $version API"
|
|
|
|
options.author true
|
2019-08-19 18:00:37 +00:00
|
|
|
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")
|
2019-07-17 09:43:14 +00:00
|
|
|
|
|
|
|
delete "./docs"
|
|
|
|
|
|
|
|
subprojects.each { proj ->
|
|
|
|
proj.tasks.withType(Javadoc).each { javadocTask ->
|
|
|
|
source += javadocTask.source
|
|
|
|
classpath += javadocTask.classpath
|
|
|
|
excludes += javadocTask.excludes
|
|
|
|
includes += javadocTask.includes
|
|
|
|
}
|
|
|
|
}
|
2019-08-06 15:28:12 +00:00
|
|
|
}
|