-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
75 lines (66 loc) · 2.01 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
buildscript {
repositories {
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "net.sf.proguard:proguard-gradle:6.2.2"
}
}
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.4.10'
id 'application'
id 'com.github.johnrengelman.shadow' version '6.0.0'
}
group = 'com.gi.plugins'
version = '0.2-beta'
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
implementation 'com.google.code.gson:gson:2.8.6'
implementation group: 'com.android.tools.apkparser', name: 'apkanalyzer', version: '27.1.1'
implementation 'org.celtric.kotlin:kotlin-html:0.1.4'
implementation group: 'com.openhtmltopdf', name: 'openhtmltopdf-pdfbox', version: '1.0.4'
implementation group: 'com.google.archivepatcher', name: 'archive-patch-generator', version: '1.0.4'
implementation group: 'com.google.archivepatcher', name: 'archive-patch-explainer', version: '1.0.4'
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
}
compileKotlin {
kotlinOptions.jvmTarget = '1.8'
}
application {
mainClassName = 'MainKt'
}
shadowJar {
zip64 true
mergeServiceFiles {
exclude "META-INF/*.SF"
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.RSA'
exclude "LICENSE*"
}
}
task minimizedJar(type: proguard.gradle.ProGuardTask, dependsOn: shadowJar) {
injars "build/libs/apkSize-$version-all.jar"
outjars "build/libs/apkSize-$version-min.jar"
libraryjars '/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home' + "/lib/rt.jar"
printmapping "build/libs/apkSize-$version-mapping.map"
ignorewarnings
dontoptimize
dontwarn
//optimizations '!code/allocation/variable'
def keepClasses = [
'MainKt',
'kotlin.text.RegexOption',
'kotlin.** { *; }'
]
for (keepClass in keepClasses) {
keep access: 'public', name: keepClass, {
method access: 'public'
method access: 'private'
}
}
}