-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
118 lines (109 loc) · 3.95 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
import groovy.swing.SwingBuilder
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
project.ext {
versionCode = 33
versionName = "2.4.8"
jodelVersionCode = 1000705
jodelVersionName = "4.37.5"
}
android {
compileSdkVersion 23
buildToolsVersion '25.0.0'
repositories {
mavenCentral()
jcenter()
maven { url "https://jitpack.io" }
flatDir { dirs 'src/main/libs' }
}
defaultConfig {
ndk {
abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
}
applicationId "com.jodelXposed"
minSdkVersion 17
targetSdkVersion 23
versionCode project.versionCode
versionName project.versionName
buildConfigField "int", "JODEL_VERSION_CODE", project.jodelVersionCode.toString()
buildConfigField "String", "JODEL_VERSION_NAME", '"' + project.jodelVersionName + '"'
}
signingConfigs {
release {
storeFile file("jodelxposed.keystore")
keyAlias "JodelXposed"
storePassword ''
keyPassword ''
}
}
buildTypes {
release {
minifyEnabled false
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
main.assets.srcDirs += '../hooks'
}
externalNativeBuild {
cmake {
path 'src/main/cpp/CMakeLists.txt'
}
}
}
dependencies {
provided 'de.robv.android.xposed:api:82'
provided 'de.robv.android.xposed:api:82:sources'
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-places:10.2.0'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.GrenderG:Prefs:1.2'
compile 'com.androidadvance:topsnackbar:1.1.1'
compile 'id.zelory:compressor:1.0.4'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "com.github.nisrulz:easydeviceinfo-base:2.3.2"
compile 'com.github.renaudcerrato:static-maps-api:1.0.2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
}
gradle.taskGraph.whenReady { taskGraph ->
if(taskGraph.hasTask(':app:assembleRelease')) {
def storePass = ''
def keyPass = ''
if(System.console() == null) {
new SwingBuilder().edt {
dialog(modal: true, title: 'Enter password', alwaysOnTop: true, resizable: false, locationRelativeTo: null, pack: true, show: true) {
vbox { // Put everything below each other
label(text: "Please enter store passphrase:")
def input1 = passwordField()
label(text: "Please enter key passphrase:")
def input2 = passwordField()
button(defaultButton: true, text: 'OK', actionPerformed: {
storePass = input1.password;
keyPass = input2.password;
dispose();
})
}
}
}
} else {
storePass = System.console().readPassword("\nPlease enter store passphrase: ")
keyPass = System.console().readPassword("\nPlease enter key passphrase: ")
}
if(storePass.size() <= 0 || keyPass.size() <= 0) {
throw new InvalidUserDataException("You must enter the passwords to proceed.")
}
storePass = new String(storePass)
keyPass = new String(keyPass)
android.signingConfigs.release.storePassword = storePass
android.signingConfigs.release.keyPassword = keyPass
}
}
repositories {
mavenCentral()
}