forked from TriggerReactor/TriggerReactor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
157 lines (135 loc) · 4.31 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
155
156
157
plugins {
id 'java'
id 'groovy'
}
repositories {
jcenter()
mavenCentral()
}
subprojects {
apply plugin: 'java'
apply plugin: 'java-library'
test {
reports.html.enabled = false
testLogging {
events "failed"
exceptionFormat "full"
}
if(!project.hasProperty("Legacy")){
jvmArgs = [
'--add-opens', 'java.base/java.lang.reflect=ALL-UNNAMED'
]
}
}
ext {
id = 'TriggerReactor'
version = '3.2.3'
description = 'Simple script parser with infinite possibility'
author = 'wysohn'
authors = [
'soliddanii',
'MidnightSugar',
'TheBestNightSky',
'dltks0306',
'RubrumExPlaneta',
'Alex4386',
'RedLime',
'mrandriyg',
'professer_snape',
'gerzytet',
'Kuiprux'
]
}
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
resources {
srcDirs = ['src/main/resources']
include '**/*.js'
include '**/*.yml'
}
}
test {
java {
srcDirs = ['src/test/java/']
}
}
}
repositories {
jcenter()
mavenCentral()
}
dependencies {
// https://mvnrepository.com/artifact/mysql/mysql-connector-java
api group: 'mysql', name: 'mysql-connector-java', version: '5.1.13'
// https://mvnrepository.com/artifact/mysql/mysql-connector-java
api group: 'mysql', name: 'mysql-connector-java', version: '5.1.13'
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
api group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
// https://mvnrepository.com/artifact/org.graalvm.js/js
//implementation group: 'org.graalvm.js', name: 'js', version: '21.1.0'
// https://mvnrepository.com/artifact/org.graalvm.js/js-scriptengine
//implementation group: 'org.graalvm.js', name: 'js-scriptengine', version: '21.1.0'
testImplementation 'junit:junit:4.11'
testImplementation 'org.mockito:mockito-core:3.11.2'
// testImplementation 'org.powermock:powermock-core:2.+'
// testImplementation 'org.powermock:powermock-module-junit4:2.+'
// testImplementation 'org.powermock:powermock-api-mockito2:2.+'
testImplementation 'org.javassist:javassist:3.20.0-GA'
}
java{
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
}
task copyResources(type: Copy) {
from project(":core").sourceSets.main.output.resourcesDir
into "${buildDir}/resources/main"
}
jar.dependsOn copyResources
task copyJars(type: Copy) {
from project.file('build/libs')
include '*.jar'
into rootProject.file('build/libs')
}
build.finalizedBy(copyJars)
javadoc {
failOnError false
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
exclude "**/copy/com/google/**"
exclude "org/apache/**"
}
}
allprojects {
task testLegacy{
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
testLegacy.finalizedBy test
}
def exportedProjects= [
":core",
/*":sponge",*/
":bukkit",
":bukkit:legacy",
":bukkit:latest"
]
javadoc {
failOnError false
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
source exportedProjects.collect { project(it).sourceSets.main.allJava }
classpath = files(exportedProjects.collect { project(it).sourceSets.main.compileClasspath })
options {
links "https://docs.oracle.com/javase/8/docs/api/"
links "https://hub.spigotmc.org/javadocs/bukkit/"
links "https://jd.spongepowered.org/7.0.0/"
}
destinationDir = file("${buildDir}/docs/javadoc")
exclude "**/copy/com/google/**"
exclude "org/apache/**"
}