FastAsyncWorldEdit/build.gradle

150 Zeilen
4.5 KiB
Groovy

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