-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
executable file
·56 lines (46 loc) · 1.43 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
import java.text.SimpleDateFormat
ext.globalProjectName = 'WatchDesigner'
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0'
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: 'com.github.ben-manes.versions'
def gitSha1() {
return 'git rev-parse --short HEAD'.execute().text.trim()
}
def buildDate() {
def dateFormat = new SimpleDateFormat('yyyy-MM-dd\'T\'HH:mm\'Z\'')
dateFormat.setTimeZone(TimeZone.getTimeZone('UTC'))
return dateFormat.format(new Date())
}
// Build properties
ext.buildProperties = new Properties()
buildProperties.load(new FileInputStream(file('build.properties')))
// Build number
ext.buildNumberFile = file('build.number')
ext.buildNumberProperties = new Properties()
buildNumberProperties.load(new FileInputStream(buildNumberFile))
ext.buildNumber = buildNumberProperties['build.number'].toInteger()
// Versions used across modules
ext.buildToolsVersion = '24.0.0'
ext.supportLibVersion = '24.0.0'
ext.playServicesVersion = '9.0.2'