This repository was archived by the owner on May 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
82 lines (63 loc) · 1.77 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
import org.gradle.internal.jvm.Jvm
plugins {
id 'java'
id 'maven-publish'
id 'com.jfrog.bintray' version '1.8.4'
id "com.jfrog.artifactory" version "4.7.5"
}
group = 'de.hhu.bsinfo'
version = '0.4.0' + (Boolean.valueOf(System.getProperty('release')) ? '' : '-SNAPSHOT')
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
maven {
url "https://dl.bintray.com/hhu-bsinfo/dxram"
}
maven {
url 'https://oss.jfrog.org/artifactory/oss-snapshot-local'
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
dependencies {
implementation files(Jvm.current().toolsJar)
implementation 'de.hhu.bsinfo:dxutils:0.7.0' + (Boolean.valueOf(System.getProperty('release')) ? '' : '-SNAPSHOT')
testCompile group: 'junit', name: 'junit', version: '4.12'
}
task fatJar(type: Jar) {
manifest {
attributes(
'BuildUser': System.properties['user.name'],
'BuildDate': new Date().format("yyyy-MM-dd HH:mm:ss"),
'Class-Path': configurations.compileClasspath.files.collect { "$it.name" }.join(' '),
)
}
baseName = project.name
from {
configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
with jar
}
artifacts {
archives sourcesJar
archives javadocJar
}
apply from: 'publish.gradle'
apply from: 'bintray.gradle'
apply from: 'artifactory.gradle'
task wrapper(type: Wrapper) {
gradleVersion = "4.10"
}