This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
forked from IntellectualSites/PlotSquared-Legacy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
98 lines (86 loc) · 2.96 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
import org.ajoberstar.grgit.Grgit
buildscript {
repositories {
mavenCentral()
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url 'https://jitpack.io' }
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:5.2.0'
}
configurations.all {
resolutionStrategy {
force 'org.ow2.asm:asm:8.0.1'
}
}
}
plugins {
id 'maven-publish'
id "org.ajoberstar.grgit" version "4.1.1"
}
group = 'com.intellectualcrafters'
def rootVersion = "3"
def revision = ""
def buildNumber = ""
def date = ""
ext {
git = Grgit.open(dir: new File(rootDir.toString() + '/.git'))
date = git.head().getDate().format("yy.MM.dd")
revision = "-${git.head().abbreviatedId}"
parents = git.head().parentIds
if (project.hasProperty('buildnumber')) {
buildNumber = "$buildnumber"
} else {
index = -1352 // Offset to match CI
for (; parents != null && !parents.isEmpty(); index++) {
parents = git.getResolve().toCommit(parents.get(0)).getParentIds()
}
buildNumber = "${index}"
}
}
version = String.format("%s.%s", rootVersion, buildNumber)
description = rootProject.name
if (project.hasProperty("lzNoVersion")) { // gradle build -PlzNoVersion
version = "unknown"
}
subprojects {
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'com.github.johnrengelman.shadow'
clean.doFirst {
delete "../target"
}
dependencies {
compile(group: 'com.sk89q.worldedit', name: 'worldedit-core', version: '6.1.3-SNAPSHOT') {
exclude(module: 'bukkit-classloader-check')
exclude(module: 'mockito-core')
exclude(module: 'dummypermscompat')
}
implementation 'com.github.Superzock3003:PowerNukkit:v1.18-SNAPSHOT'
compile 'com.google.guava:guava:21.0'
}
repositories {
mavenCentral()
maven { url "https://maven.enginehub.org/repo/" }
maven { url 'https://jitpack.io' }
}
}
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
}
}
}