-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
94 lines (74 loc) · 1.74 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
83
84
85
86
87
88
89
90
91
92
93
import proguard.gradle.ProGuardTask
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'net.sf.proguard:proguard-gradle:5.2.1'
}
}
plugins {
id 'jacoco'
}
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'maven-publish'
group 'com.p4r4d0x'
version '0.0.1'
def javaName = archivesBaseName
def fullJavaName = archivesBaseName + '-full'
sourceSets {
main {
java {
srcDir 'src/main/java'
}
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'fr.delthas:javamp3:1.0.1'
implementation "org.nd4j:nd4j-native-platform:1.0.0-alpha"
implementation "com.github.wendykierp:JTransforms:3.1"
implementation "org.slf4j:slf4j-jdk14:1.7.25"
//JaCoCo
implementation("org.jacoco:org.jacoco.core:0.8.7")
testImplementation 'junit:junit:4.13.1'
}
jar {
archiveBaseName = javaName
manifest {
attributes "Implementation-Title": javaName
attributes "Implementation-Version": archiveVersion
}
}
task fullJavaJar(type: Jar) {
archiveBaseName = fullJavaName
manifest {
attributes "Implementation-Title": archiveBaseName
attributes "Implementation-Version": archiveVersion
}
from sourceSets.main.output
artifacts {
archives fullJavaJar
}
}
task proguard(type: ProGuardTask) {
configuration 'proguard-rules.pro'
injars "$buildDir/libs/${fullJavaName}-${version}.jar"
outjars "$buildDir/libs/${javaName}-${version}.jar"
}
tasks.test {
finalizedBy(tasks.jacocoTestReport)
}
tasks.jacocoTestReport {
dependsOn(tasks.test)
}
tasks.jacocoTestReport {
reports {
xml.enabled = true
csv.enabled = true
html.enabled = true
}
}