forked from 908Inc/CameraSDK-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
45 lines (38 loc) · 1.29 KB
/
Copy pathbuild.gradle
File metadata and controls
45 lines (38 loc) · 1.29 KB
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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'me.tatarka:gradle-retrolambda:3.1.0'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
def configsPrivateFile = new File('configs.private.properties')
def configsCommonFile = new File('configs.common.properties')
Properties props = new Properties()
try {
if (configsPrivateFile.exists()) {
props.load(configsPrivateFile.newDataInputStream())
} else if (configsCommonFile.exists()) {
props.load(configsCommonFile.newDataInputStream())
} else {
throw new GradleException("Configs file not exists");
}
} catch (Exception ignored) {
throw new GradleException("Can't load configs file");
}
ext.apiKeyProd = props.getProperty("API_KEY_PRODUCTION")
ext.apiKeyDebug = props.getProperty("API_KEY_DEBUG")
ext.fabricApiKey = props.getProperty("FABRIC_API_KEY")