2014-04-06 02:33:05 +00:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2018-12-17 12:48:52 +00:00
|
|
|
mavenLocal()
|
2014-04-06 02:33:05 +00:00
|
|
|
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 {
|
2018-08-06 09:08:15 +00:00
|
|
|
force 'com.google.guava:guava:21.0'
|
2017-10-20 00:06:01 +00:00
|
|
|
force 'org.ow2.asm:asm:6.0_BETA'
|
2015-02-12 21:30:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-04-06 02:33:05 +00:00
|
|
|
dependencies {
|
2018-09-25 10:24:10 +00:00
|
|
|
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
|
2018-09-23 10:22:33 +00:00
|
|
|
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.7.5'
|
|
|
|
classpath 'org.ajoberstar:gradle-git:1.7.2'
|
2014-04-06 02:33:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-04 07:29:34 +00:00
|
|
|
plugins {
|
|
|
|
id 'net.minecrell.licenser' version '0.4.1' apply false
|
|
|
|
}
|
|
|
|
|
2018-08-12 14:03:07 +00:00
|
|
|
apply plugin: 'java'
|
|
|
|
clean { delete "target" }
|
2014-04-06 02:33:05 +00:00
|
|
|
|
2018-12-21 20:13:43 +00:00
|
|
|
print new File('splash.txt').text
|
2018-10-04 07:29:34 +00:00
|
|
|
|
2018-08-12 14:03:07 +00:00
|
|
|
group = 'com.boydti.fawe'
|
2019-01-03 11:52:23 +00:00
|
|
|
|
|
|
|
def rootVersion = "1.13"
|
2018-08-12 14:03:07 +00:00
|
|
|
def revision = ""
|
|
|
|
def buildNumber = ""
|
|
|
|
def date = ""
|
|
|
|
ext {
|
2014-11-14 19:27:39 +00:00
|
|
|
try {
|
2018-08-12 14:03:07 +00:00
|
|
|
git = org.ajoberstar.grgit.Grgit.open(file(".git"))
|
|
|
|
date = git.head().date.format("yy.MM.dd")
|
|
|
|
revision = "-${git.head().abbreviatedId}"
|
2019-01-03 12:07:25 +00:00
|
|
|
index = -1960; // Offset to match CI
|
2018-08-14 10:41:52 +00:00
|
|
|
parents = git.head().parentIds;
|
2018-08-12 17:38:20 +00:00
|
|
|
for (; parents != null && !parents.isEmpty(); index++) {
|
|
|
|
commit = git.getResolve().toCommit(parents.get(0));
|
|
|
|
parents = commit.getParentIds()
|
|
|
|
}
|
2019-01-03 11:52:23 +00:00
|
|
|
buildNumber = "${index}"
|
2018-08-12 14:03:07 +00:00
|
|
|
} catch (Throwable ignore) {
|
2018-08-14 10:41:52 +00:00
|
|
|
revision = "-unknown"
|
2014-11-14 19:27:39 +00:00
|
|
|
}
|
|
|
|
}
|
2016-06-18 07:32:17 +00:00
|
|
|
|
2018-08-12 14:03:07 +00:00
|
|
|
if ( project.hasProperty("lzNoVersion") ) { // gradle build -PlzNoVersion
|
2018-08-14 10:41:52 +00:00
|
|
|
version = "unknown"
|
2018-08-15 14:04:16 +00:00
|
|
|
} else {
|
2019-01-03 11:52:23 +00:00
|
|
|
version = String.format("%s.%s", rootVersion, buildNumber)
|
2016-06-18 07:32:17 +00:00
|
|
|
}
|
2018-08-12 14:03:07 +00:00
|
|
|
description = """FastAsyncWorldEdit"""
|
2016-06-18 07:32:17 +00:00
|
|
|
|
2014-11-14 19:27:39 +00:00
|
|
|
subprojects {
|
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'maven'
|
|
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
2018-12-21 20:13:43 +00:00
|
|
|
// Enable this requires putting license header files in many, many FAWE files
|
|
|
|
//apply plugin: 'net.minecrell.licenser'
|
2018-08-12 14:03:07 +00:00
|
|
|
|
|
|
|
ext.internalVersion = version
|
2014-04-06 02:33:05 +00:00
|
|
|
|
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
|
|
|
|
2018-08-21 17:22:37 +00:00
|
|
|
compileJava { options.compilerArgs += ["-parameters"] }
|
|
|
|
|
2014-11-14 19:27:39 +00:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
maven { url "http://maven.sk89q.com/repo/" }
|
|
|
|
maven { url "http://repo.maven.apache.org/maven2" }
|
2018-08-12 14:03:07 +00:00
|
|
|
// 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//"}
|
2019-03-06 16:35:42 +00:00
|
|
|
maven {url "http://ci.athion.net/job/PlotSquared-Breaking/ws/mvn/"}
|
2018-12-17 13:47:29 +00:00
|
|
|
mavenLocal()
|
2018-10-15 15:20:04 +00:00
|
|
|
maven {url "http://empcraft.com/maven2"}
|
2018-08-12 14:03:07 +00:00
|
|
|
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"}
|
2018-08-14 07:18:49 +00:00
|
|
|
maven {url "http://ci.emc.gs/nexus/content/groups/aikar/" }
|
2014-04-06 02:33:05 +00:00
|
|
|
}
|
|
|
|
|
2014-11-14 19:27:39 +00:00
|
|
|
if (JavaVersion.current().isJava8Compatible()) {
|
|
|
|
// Java 8 turns on doclint which we fail
|
|
|
|
tasks.withType(Javadoc) {
|
|
|
|
options.addStringOption('Xdoclint:none', '-quiet')
|
|
|
|
}
|
2014-04-06 02:33:05 +00:00
|
|
|
}
|
|
|
|
|
2014-11-14 19:27:39 +00:00
|
|
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
|
|
|
classifier = 'javadoc'
|
|
|
|
from javadoc.destinationDir
|
2014-05-15 18:41:26 +00:00
|
|
|
}
|
|
|
|
|
2014-11-14 19:27:39 +00:00
|
|
|
artifacts {
|
|
|
|
archives jar
|
|
|
|
archives javadocJar
|
|
|
|
}
|
2014-05-15 18:41:26 +00:00
|
|
|
|
2016-02-02 20:12:54 +00:00
|
|
|
if (!(name.equals('worldedit-forge') || name.equals('worldedit-sponge'))) {
|
2016-01-12 23:32:58 +00:00
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
|
|
classifier = 'sources'
|
|
|
|
from sourceSets.main.allSource
|
|
|
|
}
|
|
|
|
|
|
|
|
artifacts {
|
|
|
|
archives sourcesJar
|
|
|
|
}
|
|
|
|
build.dependsOn(sourcesJar)
|
|
|
|
}
|
|
|
|
|
2014-11-14 19:27:39 +00:00
|
|
|
shadowJar {
|
|
|
|
classifier 'dist'
|
|
|
|
dependencies {
|
|
|
|
include(dependency('com.sk89q:jchronic:0.2.4a'))
|
|
|
|
include(dependency('com.thoughtworks.paranamer:paranamer:2.6'))
|
|
|
|
include(dependency('com.sk89q.lib:jlibnoise:1.0.0'))
|
2018-08-12 14:03:07 +00:00
|
|
|
include(dependency('com.github.luben:zstd-jni:1.1.1'))
|
|
|
|
include(dependency('co.aikar:fastutil-lite:1.0'))
|
2014-11-14 19:27:39 +00:00
|
|
|
}
|
|
|
|
exclude 'GradleStart**'
|
|
|
|
exclude '.cache'
|
|
|
|
exclude 'LICENSE*'
|
|
|
|
}
|
2016-08-06 09:29:56 +00:00
|
|
|
|
2018-12-21 20:13:43 +00:00
|
|
|
// Enable this requires putting license header files in many, many FAWE files
|
|
|
|
//license {
|
|
|
|
// header = rootProject.file("HEADER.txt")
|
|
|
|
// include '**/*.java'
|
|
|
|
//}
|
2015-01-11 01:09:29 +00:00
|
|
|
}
|