-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle
More file actions
132 lines (108 loc) · 3.37 KB
/
build.gradle
File metadata and controls
132 lines (108 loc) · 3.37 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'me.champeau.gradle:jbake-gradle-plugin:0.2'
classpath 'eu.appsatori:gradle-fatjar-plugin:0.2-rc1'
classpath 'org.ajoberstar:gradle-git:0.4.0'
classpath 'org.pegdown:pegdown:1.4.2'
}
}
group = 'com.orgsync'
version = '0.2.0'
description = 'Java client for the OrgSync API'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'fatjar'
apply plugin: 'github-pages'
apply plugin: 'maven'
apply plugin: 'me.champeau.jbake'
sourceCompatibility = 1.6
targetCompatibility = 1.6
task wrapper(type: Wrapper) {
gradleVersion = '1.10'
}
repositories {
mavenCentral()
}
sourceSets {
examples {
compileClasspath += sourceSets.main.runtimeClasspath
}
integration {
compileClasspath += sourceSets.main.runtimeClasspath
}
}
dependencies {
compile group: 'com.ning', name: 'async-http-client', version: '1.7.17'
compile group: 'com.google.code.gson', name: 'gson', version: '2.2.4'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.5'
testCompile group: 'junit', name: 'junit', version: '4.11'
testCompile group: 'org.mockito', name: 'mockito-core', version: '1.9.5'
examplesCompile configurations.runtime
examplesRuntime group: 'ch.qos.logback', name: 'logback-core', version: '1.0.13'
examplesRuntime group: 'ch.qos.logback', name: 'logback-classic', version: '1.0.13'
integrationCompile group: 'com.typesafe', name: 'config', version: '1.0.1'
integrationCompile configurations.testCompile
integrationRuntime configurations.testRuntime
}
javadoc {
options.links = [
'http://sonatype.github.io/async-http-client/apidocs/reference/',
'http://download.oracle.com/javase/6/docs/api/'
]
}
task simpleRequests(dependsOn: 'classes', type: JavaExec) {
main = 'com.orgsync.api.examples.SimpleRequest'
classpath = sourceSets.main.runtimeClasspath + sourceSets.examples.runtimeClasspath
}
task addAccounts(dependsOn: 'classes', type: JavaExec) {
main = 'com.orgsync.api.examples.AddAccountsRequest'
classpath = sourceSets.main.runtimeClasspath + sourceSets.examples.runtimeClasspath
}
task integrationTest(type: Test) {
outputs.upToDateWhen { false }
testClassesDir = sourceSets.integration.output.classesDir
classpath = sourceSets.main.runtimeClasspath + sourceSets.integration.runtimeClasspath
}
task generateDbTemplate(dependsOn: 'classes', type: JavaExec) {
main = 'com.orgsync.api.integration.DbTemplate'
classpath = sourceSets.main.runtimeClasspath + sourceSets.integration.runtimeClasspath
}
eclipse {
classpath {
plusConfigurations += configurations.examplesRuntime
plusConfigurations += configurations.integrationRuntime
}
}
idea {
module {
scopes.COMPILE.plus += configurations.integrationCompile
}
}
task makeDist(dependsOn: ['clean', 'javadoc'], type: Zip) {
from("README.md")
from("LICENSE")
from jar.outputs.files
into("javadoc/") {
from javadoc.destinationDir
}
into("examples/") {
from("src/examples/java")
}
into("docs/") {
from("docs/")
}
}
apply from: 'gradle/site.gradle'
githubPages {
repoUri = 'https://github.com/orgsync/orgsync-api-java.git'
pages {
from(jbake.output) {
into '.'
}
}
}