-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
128 lines (109 loc) · 3.92 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
119
120
121
122
123
124
125
126
127
128
buildscript {
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
}
}
apply plugin: 'com.android.application'
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
google()
}
dependencies {
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.android.material:material:1.3.0-alpha04'
implementation 'org.thoughtcrime.ssl.pinning:AndroidPinning:1.0.0'
implementation 'com.google.android.gms:play-services-location:17.1.0'
implementation 'joda-time:joda-time:2.10.6'
implementation 'com.google.guava:guava:30.0-jre'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'org.thoughtcrime.ssl.pinning:AndroidPinning:1.0.0'
}
android {
compileSdkVersion 29
buildToolsVersion '29.0.3'
useLibrary 'org.apache.http.legacy'
buildFeatures {
dataBinding true
// for view binding:
// viewBinding true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
minSdkVersion 28
targetSdkVersion 29
//noinspection AccidentalOctal,HighAppVersionCode
versionCode 100
versionName "1.0.0"
multiDexEnabled false
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
signingConfigs {
debug {
storeFile file("${System.properties['user.home']}" + "/.android/debug.keystore")
}
/* note: To build a signed version of NetHunter:
1. Put your keystore in ~/.android/release-keystore and set up a key "NetHunter"
2. set KEYSTORE_PASSWORD and KEY_PASSWORD environment variables before running gradle. this
can be done easily by adding them to .bashrc
(or change the below values, hard-coding or whatever...)
3. Don't forget to create a proguard.cfg file. You can find a sample one in the sdk or
point to it directly.
release {
storePassword System.getenv("KEYSTORE_PASSWORD")
storeFile file("${System.properties['user.home']}" + "/.android/release.keystore")
keyAlias "NetHunter"
keyPassword System.getenv("KEY_PASSWORD")
}
*/
}
buildTypes {
debug {
minifyEnabled false
buildConfigField "java.util.Date", "BUILD_TIME", "new java.util.Date(" + System.currentTimeMillis() + "L)"
buildConfigField "String", "BUILD_NAME", "\"" + System.getenv("USER") + "\""
return true
}
release {
//signingConfig signingConfigs.release
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt')
debuggable false
jniDebuggable false
zipAlignEnabled true
buildConfigField "java.util.Date", "BUILD_TIME", "new java.util.Date(" + System.currentTimeMillis() + "L)"
buildConfigField "String", "BUILD_NAME", "\"" + System.getenv("USER") + "\""
signingConfig signingConfigs.debug
multiDexEnabled false
return true
}
}
ndkVersion '22.0.6917172 rc1'
dependenciesInfo {
includeInApk true
includeInBundle true
}
}