2016-04-02 06:06:24 +02:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
|
|
|
|
jcenter()
|
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
|
2016-05-14 15:38:07 +02:00
|
|
|
classpath 'org.ajoberstar:grgit:1.7.0'
|
2016-04-02 06:06:24 +02:00
|
|
|
}
|
2017-11-09 02:48:53 +01:00
|
|
|
configurations.all {
|
|
|
|
resolutionStrategy {
|
|
|
|
force 'org.ow2.asm:asm:6.0_BETA'
|
|
|
|
}
|
|
|
|
}
|
2016-04-02 06:06:24 +02:00
|
|
|
}
|
|
|
|
|
2017-01-15 15:58:24 +01:00
|
|
|
task setupCIWorkspace {
|
|
|
|
// do nothing, stub method
|
|
|
|
}
|
|
|
|
|
2016-04-30 04:49:23 +02:00
|
|
|
apply plugin: 'java'
|
|
|
|
clean { delete "target" }
|
|
|
|
|
2016-04-02 06:06:24 +02:00
|
|
|
group = 'com.boydti.fawe'
|
2016-08-14 02:26:51 +02:00
|
|
|
|
2016-05-13 10:19:04 +02:00
|
|
|
def revision = ""
|
2016-08-14 02:26:51 +02:00
|
|
|
def buildNumber = ""
|
2016-09-23 09:11:41 +02:00
|
|
|
def semver = ""
|
|
|
|
def date = ""
|
2016-05-13 10:19:04 +02:00
|
|
|
ext {
|
2017-08-12 16:23:55 +02:00
|
|
|
try {
|
|
|
|
git = org.ajoberstar.grgit.Grgit.open(file(".git"))
|
|
|
|
date = git.head().date.format("yy.MM.dd")
|
|
|
|
revision = "-${git.head().abbreviatedId}"
|
|
|
|
parents = git.head().parentIds;
|
2019-04-03 15:42:54 +02:00
|
|
|
index = -67; // Offset to match CI
|
2017-08-12 16:23:55 +02:00
|
|
|
int major, minor, patch;
|
|
|
|
major = minor = patch = 0;
|
|
|
|
for (; parents != null && !parents.isEmpty(); index++) {
|
|
|
|
int majorCount, minorCount, patchCount;
|
|
|
|
patchCount = minor == 0 && major == 0 ? 1 : 0;
|
|
|
|
commit = git.getResolve().toCommit(parents.get(0));
|
|
|
|
for (String line : commit.fullMessage.tokenize("\n")) {
|
|
|
|
switch (line.replaceAll("- ", "").split(" ")[0].toLowerCase()) {
|
|
|
|
case "minor":
|
|
|
|
case "added":
|
|
|
|
case "add":
|
|
|
|
case "change":
|
|
|
|
case "changed":
|
|
|
|
case "changes":
|
|
|
|
if (major == 0) {
|
|
|
|
minorCount = 1; patchCount = 0;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case "refactor":
|
|
|
|
case "remove":
|
|
|
|
case "major":
|
|
|
|
patchCount = minorCount = 0;
|
|
|
|
majorCount = 1;
|
|
|
|
break;
|
|
|
|
}
|
2016-09-23 09:11:41 +02:00
|
|
|
}
|
2017-08-12 16:23:55 +02:00
|
|
|
major += majorCount;
|
|
|
|
minor += minorCount;
|
|
|
|
patch += patchCount;
|
|
|
|
parents = commit.getParentIds()
|
2016-09-23 09:11:41 +02:00
|
|
|
}
|
2017-08-12 16:23:55 +02:00
|
|
|
buildNumber = "-${index}"
|
|
|
|
semver = "-${major}.${minor}.${patch}"
|
|
|
|
} catch (Throwable ignore) {
|
|
|
|
revision = "unknown";
|
2016-08-14 02:26:51 +02:00
|
|
|
}
|
2016-05-13 10:19:04 +02:00
|
|
|
}
|
2016-08-07 01:55:59 +02:00
|
|
|
|
2016-09-23 09:11:41 +02:00
|
|
|
version = date + revision + buildNumber + semver
|
2016-08-16 10:49:56 +02:00
|
|
|
if ( project.hasProperty("lzNoVersion") ) { // gradle build -PlzNoVersion
|
2019-05-02 19:49:10 +02:00
|
|
|
version = "unknown"
|
2016-08-16 10:49:56 +02:00
|
|
|
}
|
2016-04-02 06:06:24 +02:00
|
|
|
description = """FastAsyncWorldEdit"""
|
|
|
|
|
|
|
|
subprojects {
|
2017-07-05 10:53:05 +02:00
|
|
|
|
2016-04-02 06:06:24 +02:00
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'maven'
|
|
|
|
apply plugin: 'eclipse'
|
|
|
|
apply plugin: 'idea'
|
|
|
|
|
2017-02-26 06:39:00 +01:00
|
|
|
sourceCompatibility = 1.8
|
|
|
|
targetCompatibility = 1.8
|
2016-06-10 06:08:37 +02:00
|
|
|
|
2017-08-01 07:42:42 +02:00
|
|
|
compileJava {
|
|
|
|
options.compilerArgs += ["-parameters"]
|
|
|
|
}
|
|
|
|
|
2016-04-02 06:06:24 +02:00
|
|
|
repositories {
|
2018-01-16 02:05:09 +01:00
|
|
|
maven {url "https://mvnrepository.com/artifact/"}
|
2016-04-02 06:06:24 +02:00
|
|
|
mavenCentral()
|
2017-07-05 10:53:05 +02:00
|
|
|
maven {url "http://repo.dmulloy2.net/content/groups/public/"}
|
2017-06-16 07:28:10 +02:00
|
|
|
maven {url "https://repo.destroystokyo.com/repository/maven-public//"}
|
2019-04-22 15:04:38 +02:00
|
|
|
//maven {url "http://ci.emc.gs/nexus/content/groups/aikar/" }
|
2021-03-07 20:34:14 +01:00
|
|
|
maven {url "https://ci.athion.net/plugin/repository/tools/"}
|
2018-12-17 14:44:03 +01:00
|
|
|
mavenLocal()
|
2016-04-02 06:06:24 +02:00
|
|
|
maven {url "https://hub.spigotmc.org/nexus/content/groups/public/"}
|
2020-02-01 14:35:11 +01:00
|
|
|
maven {url "https://maven.enginehub.org/repo/"}
|
|
|
|
maven {url "https://repo.maven.apache.org/maven2"}
|
2016-04-02 06:06:24 +02:00
|
|
|
maven {url "http://ci.frostcast.net/plugin/repository/everything"}
|
|
|
|
maven {url "http://repo.spongepowered.org/maven"}
|
2018-01-15 05:39:55 +01:00
|
|
|
maven {url "http://dl.bintray.com/tastybento/maven-repo"}
|
2019-02-26 15:50:01 +01:00
|
|
|
maven {url "https://repo.inventivetalent.org/content/groups/public/"}
|
2019-04-22 15:04:38 +02:00
|
|
|
maven {url "https://store.ttyh.ru/libraries/"}
|
2020-02-01 14:35:11 +01:00
|
|
|
maven {url "https://repo.dmulloy2.net/nexus/repository/public/"}
|
2021-03-07 20:34:14 +01:00
|
|
|
maven {url "http://maven.elmakers.com/repository/"}
|
|
|
|
maven {url "https://ci.ender.zone/plugin/repository/everything/"}
|
|
|
|
maven {url "https://plotsquared.com/mvn/"}
|
2016-04-02 06:06:24 +02:00
|
|
|
}
|
2016-08-15 00:08:21 +02:00
|
|
|
}
|
2019-05-02 19:49:10 +02:00
|
|
|
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')
|
|
|
|
|
|
|
|
delete "./docs"
|
|
|
|
|
|
|
|
subprojects.each { proj ->
|
|
|
|
proj.tasks.withType(Javadoc).each { javadocTask ->
|
|
|
|
source += javadocTask.source
|
|
|
|
classpath += javadocTask.classpath
|
|
|
|
excludes += javadocTask.excludes
|
|
|
|
includes += javadocTask.includes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|