-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
59 lines (46 loc) · 1.06 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
import proguard.gradle.ProGuardTask
apply plugin: 'java'
apply plugin:"jacoco"
repositories {
jcenter()
}
javadoc {
options.stylesheetFile = new File(projectDir, "stylesheet.css");
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
dependencies {
testCompile 'junit:junit:4.12'
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
check.dependsOn jacocoTestReport
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'net.sf.proguard:proguard-gradle:5.3.2'
}
}
task proguard(type: ProGuardTask, dependsOn: 'jar') {
configuration 'proguard.txt'
injars jar.archivePath
outjars "$buildDir/libs/${archivesBaseName}-proguard.jar"
libraryjars "${System.getProperty('java.home')}/lib/rt.jar"
}
build.dependsOn proguard