-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.gradle
159 lines (132 loc) · 4.64 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
import java.text.SimpleDateFormat
plugins {
id "com.jfrog.bintray" version "1.4"
}
def getBintrayUser = project.properties.containsKey("bintrayUser") ? project["bintrayUser"] : ""
def getBintrayApiKey = project.properties.containsKey("bintrayApiKey") ? project["bintrayApiKey"] : ""
allprojects {
description "This provides type introspection and generation of GraphQL from Pojos."
group 'com.bretpatterson'
def releaseVersion = project.properties.containsKey("releaseVersion") ? project["releaseVersion"]: "1.1.0-SNAPSHOT"
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
ext {
jacksonVersion = "2.5.1";
graphQLJavaVersion = "2.4.0";
jacocoReportsDir = "$buildDir/reports/jacoco"
junitVersion = "4.12"
mockitoVersion = "1.9.5"
}
version = releaseVersion ? releaseVersion : new SimpleDateFormat('yyyy-MM-dd\'T\'HH-mm-ss').format(new Date())
jar {
from "${project.rootDir}/LICENSE.md"
}
defaultTasks "compileJava", "test", "jacocoTestReport"
jacocoTestReport {
dependsOn build
reports {
xml.enabled false
csv.enabled false
html.destination jacocoReportsDir
}
}
jacoco {
toolVersion = "0.7.6.201602180812"
}
test {
jacoco {
append = false
destinationFile = file("$buildDir/jacoco/jacocoTest.exec")
classDumpFile = file("$buildDir/jacoco/classpathdumps")
}
}
task sourcesJar(type: Jar) {
dependsOn classes
classifier 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives file("build/libs/${project.name}-" + project.version + ".jar")
archives sourcesJar
archives javadocJar
}
repositories {
mavenLocal();
mavenCentral();
maven {
url "https://dl.bintray.com/andimarek/graphql-java"
}
}
publishing {
publications {
schemagenGraphQL(MavenPublication) {
version version
from components.java
artifact sourcesJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name project.name
description project.description
url "https://github.com/bpatters/schemagen-graphql"
scm {
url "https://github.com/bpatters/schemagen-graphql"
connection "https://github.com/bpatters/schemagen-graphql"
developerConnection "https://github.com/bpatters/schemagen-graphql"
}
licenses {
license {
name 'MIT'
url 'https://github.com/bpatters/schemagen-graphql/blob/master/LICENSE.md'
distribution 'repo'
}
}
developers {
developer {
id 'bpatters'
name 'Bret Patterson'
}
}
}
}
}
}
}
bintray {
user = getBintrayUser
key = getBintrayApiKey
publications = ['schemagenGraphQL']
publish = true
pkg {
repo = 'schemagen-graphql'
name = 'schemagen-graphql'
desc = 'GraphQL Schema generation in Java'
licenses = ['MIT']
vcsUrl = 'https://github.com/bpatters/schemagen-graphql'
}
}
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
dependencies {
compile ("com.graphql-java:graphql-java:${graphQLJavaVersion}")
compile 'org.slf4j:slf4j-api:1.7.12'
compile 'com.google.guava:guava:19.0'
testCompile "junit:junit:${junitVersion}"
testCompile "org.mockito:mockito-all:${mockitoVersion}"
testCompile("com.fasterxml.jackson.core:jackson-core:${jacksonVersion}")
testCompile("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}")
}