-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
55 lines (50 loc) · 1.74 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter() // This is the default repo
mavenCentral() // This is the Maven Central repo
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
}
project.ext {
BUILD_TOOLS_VERSION = "23.0.2"
// dummy keystore configuration if not already defined
if ( !project.properties.containsKey("RELEASE_STORE_FILE")) {
RELEASE_STORE_FILE = "funix-android-release-key.keystore"
RELEASE_STORE_PASSWORD = "*****"
RELEASE_KEY_ALIAS = "funix-android-release"
RELEASE_KEY_PASSWORD = "*****"
}
}
// task that creates 'artifacts' directory
task createBuildArtifactsDirectory << { task ->
def hashPipe = new ByteArrayOutputStream()
task.project.exec {
commandLine = ['git', 'rev-parse', '--verify', 'HEAD']
standardOutput = hashPipe
}
def destDir = "artifacts"
task.project.exec {
commandLine = ['mkdir', '-p', destDir]
}
}
// Copies unit test reports to the 'artifacts' directory
task copyUnitTestBuildArtifacts << { task ->
// copy unit test reports
def srcPath = "VideoLocker/build/reports"
task.project.exec {
commandLine = ['cp', '-R', srcPath, 'artifacts']
}
}
copyUnitTestBuildArtifacts.dependsOn createBuildArtifactsDirectory
// Copies acceptance test reports to the 'artifacts' directory
task copyAcceptanceTestBuildArtifacts << { task ->
// copy acceptance test reports
srcPath = "AcceptanceTests/Test-Reports"
task.project.exec {
commandLine = ['cp', '-R', srcPath, 'artifacts']
}
}
copyAcceptanceTestBuildArtifacts.dependsOn createBuildArtifactsDirectory