forked from appium/appium-uiautomator2-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
44 lines (37 loc) · 1.35 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
import groovy.json.JsonSlurper
import org.apache.tools.ant.taskdefs.condition.Os
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
/**
* In Windows OS, gradle can't build the project
* if the project path is containing more than 240 characters.
* As a temporary fix, changing the 'buildDir' to 'windowsBuildDir' property in package.json file
* if the 'windowsBuildDir' property not available it will build the apks in the default value
* of 'buildDir' which is current repo.
* refer: https://code.google.com/p/android/issues/detail?id=187430
*/
def packagejson = new JsonSlurper().parseText(new File('./package.json').text)
if (packagejson.windowsBuildDir) {
buildDir = packagejson.windowsBuildDir + "/${rootProject.name}/${project.name}/build"
}
}
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}