-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
111 lines (86 loc) · 2.68 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
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
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'com.github.ben-manes.versions'
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.14.0'
}
}
repositories {
mavenCentral()
}
if (hasProperty('nexusUsername')) {
apply from: 'gradle/publish.gradle'
}
apply from: 'gradle/jacoco.gradle'
defaultTasks 'build'
compileJava {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
configurations {
jaxDoclet
compile
runtime
}
dependencies {
// Logging
compile 'org.slf4j:slf4j-api:1.7.22'
// Configuration
compile 'com.typesafe:config:1.3.1'
// Http
compile 'com.google.http-client:google-http-client:1.22.0'
compile 'com.google.oauth-client:google-oauth-client:1.22.0'
// Common utils
compile 'commons-validator:commons-validator:1.5.1'
compile 'org.apache.commons:commons-lang3:3.5'
compile 'de.danielbechler:java-object-diff:0.94'
// Testing
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:2.7.5'
testCompile 'com.google.http-client:google-http-client-jackson2:1.22.0'
// Test logging
testCompile 'ch.qos.logback:logback-classic:1.1.10'
testCompile 'org.slf4j:jul-to-slf4j:1.7.22'
// Cache
testCompile 'com.integralblue:httpresponsecache:1.3'
// Utils
testCompile 'org.apache.commons:commons-io:1.3.2'
testCompile 'nl.jqno.equalsverifier:equalsverifier:2.2.1'
// JavaDoc
jaxDoclet("com.google.doclava:doclava:1.0.6")
}
test {
testLogging {
exceptionFormat = 'full'
}
}
task generateDoclava(type: Javadoc) {
description = "Build the Doclava Javadocs"
source = sourceSets.main.allJava
options.docletpath = configurations.jaxDoclet.files.asType(List)
maxMemory = "1024m"
classpath = configurations.compile
destinationDir = file("${project.docsDir}/apidocs")
title = ""
options {
doclet = "com.google.doclava.Doclava"
classpath new File(System.getenv('JAVA_HOME') + "/jre/lib/rt.jar")
addStringOption("quiet")
addStringOption("hdf", "project.name ${project.name}")
addStringOption("stubs", "${project.docsDir}/stubs")
addStringOption("apixml", "${project.docsDir}/apidocs/api.xml")
addStringOption("stubs", "${project.docsDir}/apidocs")
addStringOption("templatedir", "${rootDir}/src/javadoc")
}
}
task getVersion << {
println version
}
javadoc.dependsOn 'generateDoclava'
apply from: 'gradle/idea.gradle'