-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
196 lines (168 loc) · 5.34 KB
/
Copy pathbuild.gradle
File metadata and controls
196 lines (168 loc) · 5.34 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
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
buildscript {
repositories {
maven {
url 'http://artifactory.krypt.int/artifactory/libs-release/'
}
maven {
url 'http://artifactory.krypt.int/artifactory/libs-snapshot/'
}
maven {
url 'http://artifactory.krypt.int/artifactory/remote-repos/'
}
}
}
plugins {
id 'org.inferred.processors' version '1.1'
}
//Easy semantic version based off describe + tags
def getVersionName = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags', '--dirty', '--long'
standardOutput = stdout
}
def tagVer = stdout.toString().trim()
def semVer = (tagVer =~ /v?([\d\.]+)/)[0][1]
if (tagVer.contains('dev')) {
semVer += "-SNAPSHOT"
}
return semVer
}
description = "Kryptnostic Java Annotations"
group = "com.kryptnostic"
version = getVersionName()
apply plugin: "java"
apply plugin: "maven"
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "jacoco"
apply from: "publish.gradle"
apply plugin: "maven-publish"
sourceCompatibility=JavaVersion.VERSION_1_7
repositories {
maven {
url 'http://artifactory.krypt.int/artifactory/libs-release/'
}
maven {
url 'http://artifactory.krypt.int/artifactory/libs-snapshot/'
}
maven {
url 'http://artifactory.krypt.int/artifactory/remote-repos/'
}
mavenCentral()
mavenLocal()
maven {
url "https://build.shibboleth.net/nexus/content/groups/public/"
}
maven {
url "http://maven.springframework.org/snapshot"
}
maven {
url "http://maven.springframework.org/milestone"
}
maven {
url "http://repo.maven.apache.org/maven2"
}
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
ext.jackson_version='2.4.4'
ext.slf4j_version='1.7.12'
ext.log4j_version='2.4.1'
ext.retrofit_version='1.9.0'
ext.okhttp_version='2.5.0'
ext.immutables_version='2.1.0'
ext.joda_time_version='2.8.2'
ext.guava_version='18.0'
ext.commons_io_version='2.4'
ext.commonslang3_version='3.4'
ext.commons_codec_version='1.10'
ext.codahale_metrics_version='3.0.2'
ext.javax_inject_version='1'
ext.findbugs_version='1.3.9'
dependencies {
// processor comes from org.inferred.processors
processor "org.immutables:value:${immutables_version}"
/*
* SL4J + LOG4J2
*/
compile group: "org.slf4j", name: "slf4j-api", version:"${slf4j_version}"
compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: "${log4j_version}"
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: "${log4j_version}"
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: "${log4j_version}"
/*
* GUAVA
* EventBus, FluentIterables, ListenableFutures and more
*/
compile "com.google.guava:guava:${guava_version}"
/*
JODA TIME - A better datetime class.
*/
compile "joda-time:joda-time:${joda_time_version}"
/*
* @Inject and @Nullable support
*/
compile "javax.inject:javax.inject:${javax_inject_version}"
compile "com.google.code.findbugs:jsr305:${findbugs_version}"
compile "com.fasterxml.jackson.core:jackson-databind:${jackson_version}"
compile "com.fasterxml.jackson.datatype:jackson-datatype-guava:${jackson_version}"
compile "com.fasterxml.jackson.module:jackson-module-jaxb-annotations:${jackson_version}"
compile "com.fasterxml.jackson.module:jackson-module-afterburner:${jackson_version}"
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${jackson_version}"
compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:${jackson_version}"
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:${jackson_version}"
/*
* APACHE COMMONS
* Logging, StringUtils, RandomStringUtils, IOUtils, and more
*/
compile "commons-io:commons-io:${commons_io_version}"
compile "org.apache.commons:commons-lang3:${commonslang3_version}"
compile "commons-codec:commons-codec:${commons_codec_version}"
if( project.hasProperty('developmentMode') && project.developmentMode ) {
logger.quiet("$project.name is using project dependencies.")
} else {
logger.quiet("$project.name is using jar dependencies.")
}
/*
* TESTING
*/
testCompile 'junit:junit:4.12'
}
task sourcesJar(type : Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task testJar(type: Jar, dependsOn: testClasses) {
classifier = 'tests'
from sourceSets.test.output
}
configurations {
tests
published.extendsFrom tests, archives
}
artifacts {
archives sourcesJar
archives jar
archives javadocJar
tests testJar
}
install {
configuration = configurations.published
}
eclipse {
ext.downloadSources = true
ext.downloadJavadoc = true
ext.sourceCompatibility=JavaVersion.VERSION_1_7
classpath {
containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER')
containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7'
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.8'
}