This repository has been archived by the owner on Jul 30, 2021. It is now read-only.
forked from IntellectualSites/PlotSquared
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
154 lines (132 loc) · 4.75 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
import org.ajoberstar.grgit.Grgit
buildscript {
repositories {
mavenCentral()
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter()
}
dependencies {
classpath("com.github.jengelman.gradle.plugins:shadow:5.0.0")
classpath 'gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.14.0'
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
}
configurations.all {
resolutionStrategy {
force("org.ow2.asm:asm:8.0.1")
force("org.jetbrains:annotations:20.1.0")
}
}
}
plugins {
id "maven-publish"
id "org.ajoberstar.grgit" version "4.0.2"
}
group = "com.plotsquared"
ext {
git = Grgit.open(dir: new File(rootDir.toString() + "/.git"))
}
def ver = "5.13.12"
def versuffix = ""
ext {
if (project.hasProperty("versionsuffix")) {
versuffix = "-$versionsuffix"
}
}
version = ver + versuffix
description = rootProject.name
allprojects {
apply(plugin: 'com.github.hierynomus.license')
apply(plugin: 'com.bmuschko.nexus')
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xmaxerrs" << "1000"
}
}
license {
header rootProject.file('HEADER')
mapping 'java', 'SLASHSTAR_STYLE'
ext.year = 2021
includes(["**/*.java","**/*.js"])
}
nexus {
sign = false
repositoryUrl = 'https://mvn.intellectualsites.com/content/repositories/releases/'
snapshotRepositoryUrl = 'https://mvn.intellectualsites.com/content/repositories/snapshots/'
}
}
subprojects {
apply(plugin: "java")
apply(plugin: "maven")
apply(plugin: "eclipse")
apply(plugin: "idea")
apply(plugin: "com.github.johnrengelman.shadow")
group = "com.plotsquared"
clean.doFirst {
delete("../target")
}
javadoc.options.encoding = 'UTF-8'
dependencies {
compile group: 'org.json', name: 'json', version: '20200518'
implementation("com.sk89q.worldedit:worldedit-core:7.2.0") {
exclude(module: "bukkit-classloader-check")
exclude(module: "mockito-core")
exclude(module: "dummypermscompat")
}
implementation("net.kyori:text-api:3.0.2")
implementation("net.kyori:text-serializer-gson:3.0.2")
implementation("net.kyori:text-serializer-legacy:3.0.2")
implementation("net.kyori:text-serializer-plain:3.0.2")
implementation("com.google.guava:guava:21.0") {
because("Minecraft uses Guava 21 as of 1.13")
}
compileOnly("org.jetbrains:annotations:20.1.0")
compileClasspath("org.projectlombok:lombok:1.18.12")
testCompileOnly("org.projectlombok:lombok:1.18.12")
annotationProcessor("org.projectlombok:lombok:1.18.8")
testAnnotationProcessor("org.projectlombok:lombok:1.18.8")
testImplementation("junit:junit:4.13")
}
configurations.all {
resolutionStrategy {
force("junit:junit:4.12")
force("com.google.guava:guava:21.0")
force("org.jetbrains:annotations:20.1.0")
force("com.google.code.findbugs:jsr305:3.0.2")
}
}
repositories {
mavenCentral()
maven { url = "https://maven.enginehub.org/repo/" }
maven { url = "https://repo.maven.apache.org/maven2" }
maven { url = "https://jitpack.io" }
}
shadowJar {
dependencies {
include(dependency("org.json:json:20200518"))
include(dependency("net.kyori:text-api:3.0.2"))
}
relocate("io.papermc.lib", "com.plotsquared.bukkit.paperlib")
relocate("org.json", "com.plotsquared.json") {
exclude "org/json/simple/**"
}
archiveFileName = "${project.name}-${parent.version}.jar"
destinationDirectory = file "../target"
}
version = rootProject.version
}
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
}
}
}