-
Notifications
You must be signed in to change notification settings - Fork 276
/
build.gradle
206 lines (167 loc) · 7.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
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
}
}
apply plugin: "com.android.application"
android {
compileSdkVersion 30
buildToolsVersion '30.0.2'
signingConfigs {
release {
def signingFile = file("signing.properties")
def fakeSigningFile = file("fakeSigning.properties")
def signingProperties = new Properties()
if (signingFile.exists()) {
signingProperties.load(signingFile.newInputStream())
} else {
signingProperties.load(fakeSigningFile.newInputStream())
}
storeFile file(signingProperties["keystore.file"])
storePassword signingProperties["keystore.password"]
keyAlias signingProperties["key.alias"]
keyPassword signingProperties["key.password"]
}
}
dexOptions {
jumboMode true
}
defaultConfig {
def versionMajor = 3
def versionMinor = 2
def versionPatch = 0
versionName buildVersionName(versionMajor, versionMinor, versionPatch)
versionCode buildVersionCode(versionMajor, versionMinor, versionPatch)
minSdkVersion 21
targetSdkVersion 30
def apiFile = file("api.properties")
def apiProperties = new Properties()
// NOTE-cpg: this fakeApi is here for the tests to pass
def fakeApiFile = file("fakeApi.properties")
if (apiFile.exists()) {
apiProperties.load(apiFile.newInputStream())
} else {
apiProperties.load(fakeApiFile.newInputStream())
}
buildConfigField "String", "API_URL_AMAHI", formatStringField(apiProperties["url.amahi"])
buildConfigField "String", "API_URL_PROXY", formatStringField(apiProperties["url.proxy"])
buildConfigField "String", "API_CLIENT_ID", formatStringField(apiProperties["client.id"])
buildConfigField "String", "API_CLIENT_SECRET", formatStringField(apiProperties["client.secret"])
buildConfigField "String", "CHROMECAST_APP_ID", formatStringField(apiProperties["chromecast.app.id"])
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
betaRelease {
signingConfig signingConfigs.debug
debuggable false
}
release {
signingConfig signingConfigs.release
debuggable false
}
}
android {
lintOptions {
abortOnError false
}
}
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
}
ext {
archRoomVersion = "2.2.5"
}
static def buildVersionName(versionMajor, versionMinor, versionPatch) {
return "${versionMajor}.${versionMinor}.${versionPatch}"
}
static def buildVersionCode(versionMajor, versionMinor, versionPatch) {
return versionMajor * 10**2 + versionMinor * 10**1 + versionPatch * 10**0
}
static def formatStringField(field) {
return "\"${field}\""
}
dependencies {
repositories {
google()
mavenCentral()
mavenLocal()
maven { url 'http://dl.bintray.com/megabitdragon/maven' }
maven { url 'https://jitpack.io' }
jcenter()
}
def SUPPORT_LIBRARY_VERSION = "1.0.0"
implementation "androidx.legacy:legacy-support-v4:${SUPPORT_LIBRARY_VERSION}"
implementation "androidx.legacy:legacy-support-v13:${SUPPORT_LIBRARY_VERSION}"
implementation "androidx.appcompat:appcompat:1.2.0"
implementation "com.google.android.material:material:${SUPPORT_LIBRARY_VERSION}"
implementation "androidx.preference:preference:${SUPPORT_LIBRARY_VERSION}"
implementation "androidx.legacy:legacy-preference-v14:${SUPPORT_LIBRARY_VERSION}"
implementation "androidx.browser:browser:${SUPPORT_LIBRARY_VERSION}"
implementation "androidx.leanback:leanback:${SUPPORT_LIBRARY_VERSION}"
implementation "androidx.mediarouter:mediarouter:${SUPPORT_LIBRARY_VERSION}"
implementation "androidx.media:media:${SUPPORT_LIBRARY_VERSION}"
implementation "androidx.cardview:cardview:${SUPPORT_LIBRARY_VERSION}"
implementation 'com.google.android.gms:play-services-cast-framework:12.0.0'
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
implementation 'com.github.dmytrodanylyk.android-process-button:library:1.0.4'
implementation 'com.l4digital.fastscroll:fastscroll:2.0.1'
// Shimmer Effect
implementation 'com.facebook.shimmer:shimmer:0.5.0'
// Otto and Retrofit
implementation 'com.squareup:otto:1.3.8'
implementation 'com.github.apl-devs:appintro:v4.2.3'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.8.0'
implementation 'com.airbnb.android:lottie:3.4.1'
implementation "com.vorlonsoft:androidrate:1.2.1"
implementation 'org.videolan:libvlc:2.1.16'
implementation 'pub.devrel:easypermissions:3.0.0'
testImplementation 'org.robolectric:robolectric:3.1.2'
testImplementation 'junit:junit:4.13'
testImplementation 'org.robolectric:shadows-multidex:3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test:rules:1.3.0'
androidTestImplementation "androidx.annotation:annotation:1.1.0"
// Dagger
implementation 'com.squareup.dagger:dagger:1.2.5'
compileOnly 'com.squareup.dagger:dagger-compiler:1.2.5'
annotationProcessor 'com.squareup.dagger:dagger-compiler:1.2.5'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever:1.0.15'
def EXOPLAYER_VERSION = "2.8.1"
implementation "com.google.android.exoplayer:exoplayer-core:${EXOPLAYER_VERSION}"
implementation "com.google.android.exoplayer:exoplayer-ui:${EXOPLAYER_VERSION}"
def room_version = "2.2.5"
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
// Uncomment the dependencies below to enable Chuck Interceptor for logging
/*
debugImplementation 'com.readystatesoftware.chuck:library:1.1.0'
releaseImplementation 'com.readystatesoftware.chuck:library-no-op:1.1.0'
betaReleaseImplementation 'com.readystatesoftware.chuck:library-no-op:1.1.0'
*/
}
task generateWrapper(type: Wrapper) {
description "Generates Gradle wrapper."
gradleVersion = "2.2.1"
}
android.applicationVariants.all { variant ->
def variantName = variant.name.capitalize()
task("generate${variantName}Javadoc", type: Javadoc) {
description "Generates ${variantName} documentation."
source = files(variant.javaCompiler.source)
ext.androidClasspath = android.getBootClasspath().join(File.pathSeparator)
classpath = files(variant.javaCompiler.classpath, ext.androidClasspath)
options {
linksOffline "http://d.android.com/reference", "${android.sdkDirectory}/docs/reference"
}
}
}