forked from dropbox/dropbox-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
63 lines (53 loc) · 1.83 KB
/
build.gradle
File metadata and controls
63 lines (53 loc) · 1.83 KB
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
allprojects {
apply plugin: 'maven'
group = 'com.dropbox.core'
version = '0-SNAPSHOT'
}
subprojects {
apply plugin: 'java'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
repositories {
jcenter()
mavenLocal()
mavenCentral()
// Release Staging Testing
// maven { url "..." }
}
dependencies {
compile group: 'com.dropbox.core', name: 'dropbox-core-sdk', version: '0-SNAPSHOT', changing: true
}
compileJava {
options.compilerArgs << '-Xlint:all'
options.warnings = true
options.deprecation = true
options.encoding = 'utf-8'
}
// allow subprojects to run with arbitrary number of arguments specified through project properties:
//
// -Parg0=... -Parg1=... -Parg2=...
//
// This is intended to be used by the ./run script and not through gradle directly
task run(type: JavaExec) {
standardInput = System.in
classpath = sourceSets.main.runtimeClasspath
main = "com.dropbox.core.examples.${project.name.replace('-','_')}.Main"
// convenience for not having to always specify the auth file
def useAuthInfoFileProp = project.properties.get('useAuthInfoFileProp', 'false') == 'true'
if (useAuthInfoFileProp && project.hasProperty('com.dropbox.test.authInfoFile')) {
args project.property('com.dropbox.test.authInfoFile')
}
def failOnError = project.properties.get('failOnError', 'false') == 'true'
ignoreExitValue !failOnError
def argi = 0
while (true) {
def prop = "arg${argi}"
if (project.hasProperty(prop)) {
args project.property(prop)
} else {
break
}
++argi
}
}
}