-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
99 lines (84 loc) · 2.33 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
buildscript {
repositories {
maven {
url = 'https://plugins.gradle.org/m2'
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:5.1.0'
classpath 'gradle.plugin.net.minecrell:licenser:0.4.1'
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7'
}
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'net.minecrell.licenser'
apply plugin: 'org.sonarqube'
group 'me.piggypiglet'
version '1.8.41'
sourceCompatibility = 1.8
repositories {
mavenCentral()
maven {
url = 'https://repo.piggypiglet.me/repository/maven-releases/'
content {
includeGroup 'me.piggypiglet'
}
}
}
dependencies {
testCompile 'junit:junit:4.12'
}
shadowJar {
exclude 'META-INF/*.SF'
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.RSA'
}
license {
header = file("$rootDir/LICENSE.md")
ext {
year = 2020
}
include '**/*.java'
exclude '**/minecraft/text/Text.java'
}
compileJava.options.encoding = 'UTF-8'
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
}
def exportedProjects = [
":core",
":addons:console",
":addons:mysql",
":addons:logback",
":addons:http",
":addons:jars",
":bindings:minecraft:common",
":bindings:minecraft:bukkit",
":bindings:minecraft:sponge",
":bindings:minecraft:velocity",
":bindings:minecraft:bungeecord",
":bindings:minecraft:nukkit",
":bindings:discord:jda"
]
task allJavadoc(type: Javadoc) {
source exportedProjects.collect {
project(it).sourceSets.main.allJava
}
classpath = files(exportedProjects.collect {
project(it).sourceSets.main.compileClasspath
})
destinationDir = file("${buildDir}/docs/javadoc")
}