3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-09 21:10:05 +01:00
FastAsyncWorldEdit/build.gradle

181 Zeilen
5.9 KiB
Groovy

2019-04-09 17:03:39 +02:00
import org.ajoberstar.grgit.Grgit
buildscript {
repositories {
mavenCentral()
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter()
}
2015-02-12 22:30:49 +01:00
configurations.all {
resolutionStrategy {
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-09 17:03:39 +02:00
id "org.ajoberstar.grgit" version "3.1.1"
2018-10-04 09:29:34 +02:00
}
2019-06-27 03:34:20 +02:00
println """
*******************************************
You are building WorldEdit!
2019-06-27 03:34:20 +02:00
If you encounter trouble:
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
Output files will be in /target
*******************************************
"""
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 {
2019-04-09 17:03:39 +02:00
git = Grgit.open(dir: '.git')
date = git.head().getDate().format("yy.MM.dd")
revision = "-${git.head().abbreviatedId}"
parents = git.head().parentIds;
2019-04-22 16:11:43 +02:00
if (project.hasProperty('buildnumber')) {
buildNumber = "$buildnumber"
} else {
index = -2109; // Offset to match CI
2018-08-12 19:38:20 +02:00
for (; parents != null && !parents.isEmpty(); index++) {
2019-04-22 16:11:43 +02:00
parents = git.getResolve().toCommit(parents.get(0)).getParentIds()
2018-08-12 19:38:20 +02:00
}
2019-01-03 12:52:23 +01:00
buildNumber = "${index}"
}
}
2019-05-02 19:28:09 +02:00
version = String.format("%s.%s", rootVersion, buildNumber)
description = rootProject.name
subprojects {
2019-06-27 03:34:20 +02: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/" }
}
configurations.all {
resolutionStrategy {
cacheChangingModulesFor 5, 'minutes'
}
}
}
configure(['worldedit-core', 'worldedit-bukkit', 'favs'].collect { project("$it") }) {
apply plugin: 'java'
apply plugin: 'maven'
2019-06-27 03:34:20 +02:00
// apply plugin: 'checkstyle'
apply plugin: 'com.github.johnrengelman.shadow'
2019-06-27 03:34:20 +02:00
// Enable this requires putting license header files in many, many FAWE files
// apply plugin: 'net.minecrell.licenser'
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
2019-06-27 03:34:20 +02:00
// checkstyle.configFile = new File(rootProject.projectDir, "config/checkstyle/checkstyle.xml")
// checkstyle.toolVersion = '7.6.1'
2019-05-02 19:28:09 +02:00
clean.doFirst {
delete "../target"
}
2019-06-27 03:34:20 +02:00
if (JavaVersion.current().isJava8Compatible()) {
// Java 8 turns on doclint which we fail
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
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)
}
2019-06-27 03:34:20 +02:00
// build.dependsOn(checkstyleMain)
// build.dependsOn(checkstyleTest)
2019-05-29 05:23:51 +02:00
dependencies {
compileOnly 'org.jetbrains:annotations:17.0.0'
}
2019-06-27 03:34:20 +02:00
configure(['bukkit'].collect { project(":worldedit-$it") }) {
shadowJar {
classifier 'dist'
dependencies {
include(project(":worldedit-libs:core"))
include(project(":worldedit-libs:${project.name.replace("worldedit-", "")}"))
include(project(":worldedit-core"))
2019-06-27 18:09:41 +02:00
include(dependency('com.github.luben:zstd-jni:1.1.1'))
2019-06-28 14:39:09 +02:00
include(dependency('co.aikar:fastutil-lite:1.0'))
2019-06-27 03:34:20 +02:00
}
exclude 'GradleStart**'
exclude '.cache'
exclude 'LICENSE*'
}
2019-06-27 03:34:20 +02:00
// 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') {
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
}
2019-05-02 19:28:09 +02:00
}
}
2019-06-27 03:34:20 +02:00
2019-05-02 19:28:09 +02:00
}