This repository has been archived by the owner on Aug 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 94
/
build.gradle
74 lines (58 loc) · 1.98 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
useLocalSources = findProperty("we_are_awesome_developers") ?: false
gradleVersion = '2.2.0-beta2'
targetSdk = 24
buildTools = '24.0.1'
supportLibVersion = '24.2.0'
keyGooglePlay = findProperty("api_key_GooglePlay") ?: "\"---\"";
keyPollFish = findProperty("api_key_PollFish") ?: "\"---\"";
}
repositories {
jcenter()
flatDir { dirs "aars" }
maven { url "https://maven.fabric.io/public" }
maven { url "https://jitpack.io" }
}
dependencies {
classpath "com.android.tools.build:gradle:${gradleVersion}"
classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
// fabric
classpath 'io.fabric.tools:gradle:1.21.5'
}
}
allprojects {
repositories {
jcenter()
flatDir { dirs "aars" }
maven { url "https://maven.fabric.io/public" }
maven { url "https://jitpack.io" }
}
}
def getGitCommitHash() {
def gitFolderPath = "$projectDir/.git/"
def gitFolder = new File(gitFolderPath + "HEAD");
if (!gitFolder.exists()) {
return null
}
// how many characters we extract from the hash
def takeFromHash = 6
def head = gitFolder.text.split(":")
def isCommit = (head.length == 1)
if (isCommit) {
return head[0].trim().take(takeFromHash)
}
def refHead = new File(gitFolderPath + head[1].trim())
return refHead.text.trim().take(takeFromHash)
}
task wrapper(type: Wrapper) {
gradleVersion = '3.0'
distributionUrl = "https://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"
}
task clean(type: Delete) {
delete rootProject.buildDir
}