This repository has been archived by the owner on Aug 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.gradle
70 lines (60 loc) · 1.82 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
buildscript {
repositories {
mavenCentral()
jcenter()
maven { url 'http://download.crashlytics.com/maven' }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.16.0'
}
}
apply plugin: 'com.android.application'
apply plugin: 'crashlytics'
allprojects {
repositories {
jcenter()
maven { url 'http://download.crashlytics.com/maven' }
}
}
android {
compileSdkVersion 22
buildToolsVersion "21.1.2"
defaultConfig {
targetSdkVersion 22
}
sourceSets {
main {
manifest.srcFile 'source/AndroidManifest.xml'
java.srcDirs = ['source/src']
resources.srcDirs = ['source/src']
aidl.srcDirs = ['source/src']
renderscript.srcDirs = ['source/src']
res.srcDirs = ['source/res']
assets.srcDirs = ['source/assets']
}
}
lintOptions {
abortOnError false
}
}
dependencies {
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.crashlytics.android:crashlytics:1.1.13'
compile 'com.android.support:design:22.2.0'
compile 'com.squareup.picasso:picasso:2.5.2'
}
// Custom task to create our oauth.properties file for release
File oauthProperties = file('source/res/raw/oauth.properties')
task createOAuthProperties {
if (!oauthProperties.exists()) {
logger.info('Creating oauth.properties file from environment variables')
ant.propertyfile(file: oauthProperties) {
entry(key: "client_id", value: System.getenv("oauth.client_id"))
entry(key: "client_secret", value: System.getenv("oauth.client_secret"))
}
}
}
gradle.projectsEvaluated {
compileReleaseSources.dependsOn(createOAuthProperties)
}