-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
49 lines (39 loc) · 1.13 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
import proguard.gradle.ProGuardTask
buildscript {
repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.guardsquare:proguard-gradle:7.5.0'
}
}
plugins {
id 'java'
}
group = 'ir.reyminsoft'
version = '1.0'
jar {
manifest {
attributes(
'Implementation-Title': project.name,
'Implementation-Version': project.version,
)
}
}
tasks.register('proguard', ProGuardTask) {
if (System.getProperty('java.version').startsWith('1.')) {
//Before Java 9, the runtime classes were packaged in a single jar file
libraryjars "${System.getProperty('java.home')}/lib/rt.jar"
} else {
//As of Java 9, the runtime classes are packaged in modular jmod files
libraryjars "${System.getProperty('java.home')}/jmods/java.base.jmod", jarfilter: '!**.jar', filter: '!module-info.class'
}
injars './build/libs/JSON-Parser-1.0.jar'
outjars './build/libs/release.jar'
renamesourcefileattribute 'SourceFile'
keepattributes '*Annotation*'
keep 'public class * { \
public protected *; \
}'
}