-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
169 lines (131 loc) · 5.26 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
158
159
160
161
162
163
164
165
166
167
168
/* Copyright (c) 2016
* by Bjönd, Inc., Boston, MA
*
* This software is furnished under a license and may be used only in
* accordance with the terms of such license. This software may not be
* provided or otherwise made available to any other party. No title to
* nor ownership of the software is hereby transferred.
*
* This software is the intellectual property of Bjönd, Inc.,
* and is protected by the copyright laws of the United States of America.
* All rights reserved internationally.
*
*/
apply plugin: 'findbugs'
apply plugin: 'eclipse'
apply plugin: 'groovy'
apply plugin: 'osgi'
apply plugin: 'java'
apply plugin: 'maven-publish'
// For the entire project
repositories {
maven {url 'http://nexus.bjondhealth.com/nexus/content/groups/public'}
maven {url 'http://nexus.bjondhealth.com/nexus/content/groups/private'}
}
defaultTasks 'assemble', 'jar'
configurations {
testManagedCompile { extendsFrom testCompile }
testManagedRuntime { extendsFrom testRuntime }
}
dependencies {
// Critial JSON Web Token RFC-7519 Implementation from Ping Identity.
// https://bitbucket.org/b_c/jose4j/wiki/Home
compile 'org.bitbucket.b_c:jose4j:0.5.1'
testCompile 'org.bitbucket.b_c:jose4j:0.5.1'
// Cryptography
compile 'org.bouncycastle:bcprov-jdk15on:1.54'
compile 'org.bouncycastle:bcprov-ext-jdk15on:1.54'
compile 'org.apache.directory.studio:org.apache.commons.codec:1.8'
compile 'junit:junit:4.12'
compile 'org.apache.directory.studio:org.slf4j.log4j12:1.7.2'
compile 'org.apache.logging.log4j:log4j:2.4.1'
compile 'org.lable.rfc3881.auditlogger.adapter:slf4j:1.3'
testCompile 'log4j:log4j:1.2.17'
testCompile 'org.apache.directory.studio:org.slf4j.log4j12:1.7.2'
testCompile 'org.apache.logging.log4j:log4j:2.4.1'
testCompile 'org.lable.rfc3881.auditlogger.adapter:slf4j:1.3'
// http://joel-costigliola.github.io/assertj/
compile 'org.assertj:assertj-core:3.3.0'
// Lombok
compile 'org.projectlombok:lombok:1.16.8'
// Functional Java. I can't wait for JDK 8 to really use this stuff
// the way the functional Gods intended.
compile 'org.functionaljava:functionaljava-java8:4.4'
// Apache Commons
compile 'org.apache.commons:commons-lang3:3.4'
compile 'org.apache.commons:commons-math3:3.4.1'
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
compile 'commons-beanutils:commons-beanutils:1.9.2'
compile 'commons-dbutils:commons-dbutils:1.6'
// CSV library for export/import of various CSV file formats:
// MSExcel and RFC 4180 for example.
compile 'org.apache.commons:commons-csv:1.1'
compile 'org.apache.commons:commons-collections4:4.0'
// Findbugs
compile 'com.google.code.findbugs:findbugs:3.0.1'
compile 'com.google.code.findbugs:jsr305:3.0.0'
compile 'com.google.code.findbugs:annotations:3.0.0'
}
// I want to see all deprecations.
// Set the proper encoding for Java compiler. Usually this isn't needed, but it is in the
// OpenShift environment.
// Change Compile to JavaCompile when moving to Gradle 2.X
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:all"
options.compilerArgs << "-Xlint:-processing"
options.compilerArgs << "-Xdiags:verbose"
options.encoding = 'UTF-8'
}
jar {
archiveName = 'jwtutil.jar'
manifest {
name = 'jwtutil'
instruction 'Class-Path', '.'
instruction 'Private-Package', 'com.bjond'
instruction 'Bundle-Vendor', 'Bjönd, Inc'
instruction 'Bundle-Description', 'Bjönd Health Server JSON Web Token utility methods'
instruction 'Bundle-DocURL', 'http://www.bjondinc.com'
instruction 'Bundle-Activator', 'com.bjond.demo.SampleActivator'
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// The html report can be found under /bjond-health/clients/server-core/build/reports/findbugs //
// If you want an XML report that can be fed into the findbugs eclipse plugin set xml.enabled = true //
// and html.enabled = false. You can't have both true at the same time which is kinda stupid but //
// there ya go. //
///////////////////////////////////////////////////////////////////////////////////////////////////////
tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
}
}
/////////////////////////////////////////////////////////////////////////
// Maven publication //
/////////////////////////////////////////////////////////////////////////
publishing {
publications {
maven(MavenPublication) {
groupId 'org.bjond.jwtutils'
artifactId 'jwtutils'
version '1.0'
from components.java
}
}
}
// Does nothing. Compatability with my emacs macros
task deployroot (type: Copy){
}
// Dummy task
task war() {
dependsOn jar
}
task all() {
dependsOn build, jar, compileTestJava, findbugsMain, findbugsTest
}
publishToMavenLocal {
doLast {
final File file = new File('build/publications/maven/pom-default.xml');
file.renameTo('build/publications/maven/jwtutil.pom')
}
}