-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
64 lines (51 loc) · 1.41 KB
/
Copy pathbuild.gradle
File metadata and controls
64 lines (51 loc) · 1.41 KB
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
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '6.1.0'
id 'maven'
}
group = 'com.focamacho'
version = '1.4.5'
archivesBaseName = 'SealConfig'
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
//Jankson
implementation 'com.github.falkreon:Jankson:b520ee8e55'
//Other
implementation group: 'org.apache.commons', name: 'commons-text', version: '1.9'
compileOnly group: "com.google.code.findbugs", name: "jsr305", version: "3.0.2"
}
tasks.build.dependsOn(shadowJar)
//Relocate packages to avoid conflicts
shadowJar {
relocate 'org.apache.commons.text', 'com.focamacho.sealconfig.relocated.org.apache.commons.text'
relocate 'blue.endless.jankson', 'com.focamacho.sealconfig.relocated.blue.endless.jankson'
minimize()
}
tasks.shadowJar.configure {
classifier = null
}
tasks.withType(JavaCompile) {
options.encoding('UTF-8')
}
javadoc {
exclude "blue/endless/jankson/*"
}
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
}
shadowJar {
getArchiveFileName().set("${archiveBaseName.get()}-${archiveVersion.get()}.${archiveExtension.get()}")
}
artifacts {
archives sourcesJar
archives javadocJar
archives shadowJar
}