-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
60 lines (50 loc) · 1.38 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
plugins {
id 'java-library'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'io.freefair.lombok' version '6.4.3'
}
allprojects {
repositories {
mavenCentral()
}
group = 'me.vaperion.blade'
version = '3.0.15'
// workaround for gradle issue: https://github.com/gradle/gradle/issues/17236#issuecomment-894385386
tasks.withType(Copy).configureEach {
duplicatesStrategy DuplicatesStrategy.INCLUDE
outputs.upToDateWhen { false }
}
}
subprojects {
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'io.freefair.lombok'
apply plugin: 'maven-publish'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
afterEvaluate {
shadowJar {
archiveClassifier.set('')
archiveFileName = 'blade-' + project.name + ".jar"
}
publishing {
publications {
//noinspection all
maven(MavenPublication) {
//noinspection all
artifact shadowJar
}
}
}
tasks.build.dependsOn(shadowJar)
if (project.name != 'core') {
tasks.shadowJar.dependsOn ':core:shadowJar'
}
}
}