-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
66 lines (55 loc) · 1.56 KB
/
build.gradle
File metadata and controls
66 lines (55 loc) · 1.56 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
65
66
import java.text.SimpleDateFormat
plugins {
id 'java-library'
id 'com.github.johnrengelman.shadow' version '6.1.0'
}
def projectName = 'jargs'
group 'com.github.wnebyte'
version '0.0.2'
sourceCompatibility = "1.8";
targetCompatibility = "1.8";
javadoc {
source = sourceSets.main.allJava
}
java {
withJavadocJar()
withSourcesJar()
}
repositories {
mavenCentral()
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
testCompile group: 'junit', name: 'junit', version: '4.12'
}
jar{
manifest{
attributes(
"Name": projectName,
"Implementation-Title": projectName,
"Implementation-Version": project.version,
"Class-Path": configurations.runtimeClasspath.files.collect { it.getName() }.join(' '),
'Build-Timestamp': new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(new Date()),
'Build-Jdk': "${System.properties['java.version']} (${System.properties['java.vendor']}) " +
"${System.properties['java.vm.version']}"
)
}
archiveBaseName.set(projectName)
}
javadocJar {
archiveBaseName.set(projectName)
archiveClassifier.set('javadoc')
archiveVersion.set(project.version)
from(javadoc)
}
sourcesJar {
archiveBaseName.set(projectName)
archiveClassifier.set('sources')
archiveVersion.set(project.version)
from(sourceSets.main.allJava)
}
shadowJar {
archiveBaseName.set(projectName)
archiveClassifier.set('fat')
archiveVersion.set(project.version)
}