-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
58 lines (48 loc) · 1.37 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
plugins {
id 'java-library-distribution'
}
description = "WS3D-Proxy"
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
version = '0.0.3'
repositories {
mavenCentral()
}
dependencies {
implementation group: 'org.json', name: 'json', version: '20160212'
testImplementation group: 'junit', name: 'junit', version: '4.12'
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from {
//configurations.extraLibs.collect { it.isDirectory() ? it : zipTree(it) }
configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) }
}
manifest {
attributes(
'Class-Path': configurations.runtimeClasspath.collect { it.getName() }.join(' '),
)
}
}
task javadocJar(type: Jar) {
archiveClassifier = 'javadoc'
from javadoc
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
javadoc.options.addStringOption('Xdoclint:none', '-quiet') // this is to avoid complaints about documentation missing parameter description
}
task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
artifacts
{
//archives javadocJar, sourcesJar
archives sourcesJar
}