-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
63 lines (50 loc) · 1.35 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
apply plugin: 'scala'
apply plugin: 'com.github.johnrengelman.shadow'
buildscript {
repositories {
flatDir dirs: System.getProperty("user.home") + '/bin/proguard6.0.3/lib/'
jcenter()
}
dependencies {
classpath ':proguard'
classpath 'com.github.jengelman.gradle.plugins:shadow:5.+'
}
}
import proguard.gradle.ProGuardTask
ext.mainClassName = rootProject.name
ext.version = '1.1.1'
ext.jarName = "${name}-bin"
allprojects {
repositories {
jcenter()
}
}
jar {
manifest.attributes 'Main-Class': mainClassName
}
shadowJar {
classifier = 'bin'
archiveName = rootProject.name
version = version
}
dependencies {
implementation "org.scala-lang:scala-library:2.11.+"
implementation "com.github.kevinsawicki:http-request:6.+"
implementation "com.eclipsesource.minimal-json:minimal-json:0.9.+"
testImplementation "org.scalatest:scalatest_2.11:3.+"
}
task proguard(type: ProGuardTask) {
injars "./build/libs/${jarName}.jar".intern()
outjars "./build/libs/${jarName}-mini.jar".intern()
libraryjars "${System.getProperty('java.home')}/lib/rt.jar".intern()
dontwarn
dontnote
ignorewarnings
keepattributes 'SourceFile, LineNumberTable'
keepclasseswithmembers 'public class * { \
public static void main(java.lang.String[]); \
}'
}
task debugInfoProguard(type: ProGuardTask) {
proguard.doFirst { dontobfuscate }
}