forked from facebook/screenshot-tests-for-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
72 lines (61 loc) · 1.51 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
// Copyright (c) Facebook, Inc. and its affiliates.
apply plugin: 'com.github.ben-manes.versions'
buildscript {
apply from: rootProject.file('versions.gradle')
repositories {
jcenter()
google()
}
dependencies {
classpath plugs.agp
classpath plugs.mavenGradle
classpath plugs.versions
}
}
allprojects {
version = property('VERSION_NAME')
repositories {
jcenter()
google()
}
}
def taskLogOutput = new StringBuilder()
gradle.addListener(new TaskExecutionListener() {
def listener = new StandardOutputListener() {
@Override
void onOutput(CharSequence charSequence) {
taskLogOutput.append(charSequence)
}
}
@Override
void beforeExecute(Task task) {
task.logging.addStandardOutputListener(listener)
}
@Override
void afterExecute(Task task, TaskState state) {
task.logging.removeStandardOutputListener(listener)
}
})
task cleanAll(dependsOn: [
':core:clean',
':plugin:clean',
':layout-hierarchy-common:clean',
':layout-hierarchy-litho:clean',
])
task installAll(dependsOn: [
':core:install',
':plugin:install',
':layout-hierarchy-common:install',
':layout-hierarchy-litho:install',
])
task uploadAllArchives(dependsOn: [
':plugin:uploadArchives',
':core:uploadArchives',
':layout-hierarchy-common:install',
':layout-hierarchy-litho:install',
])
task integrationTest(dependsOn: ':sample:runDebugAndroidTestScreenshotTest') {
doLast {
assert taskLogOutput.toString().contains('Found 11 screenshots')
}
}