Skip to content

Commit 33abfca

Browse files
committed
Gradle and build updates
1 parent ee09b5b commit 33abfca

File tree

3 files changed

+58
-79
lines changed

3 files changed

+58
-79
lines changed

build.gradle

Lines changed: 40 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -17,41 +17,18 @@
1717
* - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt
1818
*/
1919

20-
/*
21-
* This has to be here... It will not be taken into account in common.gradle!
22-
*
23-
* Looks like a serious bug... See also:
24-
*
25-
* http://forums.gradle.org/gradle/topics/buildscript_in_subprojects_ignored
26-
*/
27-
/*
28-
* This has to be here... It will not be taken into account in common.gradle!
29-
*
30-
* Looks like a serious bug... See also:
31-
*
32-
* http://forums.gradle.org/gradle/topics/buildscript_in_subprojects_ignored
33-
*
34-
* We also use Spring's propdeps plugin to have a _real_ provided scope. See:
35-
*
36-
* https://github.com/spring-projects/gradle-plugins/tree/master/propdeps-plugin
37-
*/
38-
3920
apply(plugin: "java");
4021
apply(plugin: "maven");
4122
apply(plugin: "signing");
4223
apply(plugin: "osgi");
4324
apply(plugin: "idea");
4425
apply(plugin: "eclipse");
4526

46-
group = "com.github.fge";
47-
version = "2.2.6";
27+
group = "com.github.java-json-tools";
28+
version = "2.2.7";
4829
sourceCompatibility = "1.6";
4930
targetCompatibility = "1.6"; // defaults to sourceCompatibility
5031

51-
project.ext {
52-
description = "A Java implementation of the JSON Schema specification";
53-
};
54-
5532
/*
5633
* Repositories to use
5734
*/
@@ -63,8 +40,7 @@ repositories {
6340
* List of dependencies
6441
*/
6542
dependencies {
66-
compile(group: "com.github.fge", name: "json-schema-core",
67-
version: "1.2.5");
43+
compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.8");
6844
compile(group: "javax.mail", name: "mailapi", version: "1.4.3");
6945
compile(group: "joda-time", name: "joda-time", version: "2.3");
7046
compile(group: "com.googlecode.libphonenumber", name: "libphonenumber",
@@ -90,7 +66,7 @@ javadoc.options.links("http://fge.github.io/btf/");
9066
javadoc.options.links("http://fge.github.io/msg-simple/");
9167
javadoc.options.links("http://fge.github.io/jackson-coreutils/");
9268
javadoc.options.links("http://fge.github.io/uri-template/");
93-
javadoc.options.links("http://fge.github.io/json-schema-core/1.2.x/");
69+
javadoc.options.links("http://java-json-tools.github.io/json-schema-core/1.2.x/");
9470

9571

9672
/*
@@ -128,12 +104,14 @@ javadoc.options {
128104
* Equally annoyingly, the docFilesSubDirs option above does not seem to have
129105
* any effect :/
130106
*/
131-
task copyDocFiles(dependsOn: javadoc) << {
132-
copy {
133-
from("src/main/javadoc") {
134-
include "**/doc-files/**";
135-
};
136-
into javadoc.destinationDir;
107+
task copyDocFiles(dependsOn: javadoc) {
108+
doLast {
109+
copy {
110+
from("src/main/javadoc") {
111+
include "**/doc-files/**";
112+
};
113+
into javadoc.destinationDir;
114+
}
137115
}
138116
}
139117

@@ -167,38 +145,42 @@ artifacts {
167145
}
168146

169147
task wrapper(type: Wrapper) {
170-
gradleVersion = "1.11";
148+
gradleVersion = "3.5";
171149
distributionUrl = "http://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip";
172150
}
173151

174-
task pom << {
175-
pom {}.writeTo("${projectDir}/pom.xml");
152+
task pom {
153+
doLast {
154+
pom {}.writeTo("${projectDir}/pom.xml");
155+
}
176156
}
177157

178158
/*
179159
* SIGNING
180160
*/
181161

182162
project.ext {
183-
gitrwscm = sprintf("git@github.com:fge/%s", name);
184-
gitroscm = sprintf("https://github.com/fge/%s.git", name);
185-
projectURL = sprintf("https://github.com/fge/%s", name);
163+
description = "A Java implementation of the JSON Schema specification";
164+
scmUrl = sprintf("git@github.com:box-metadata/%s", name);
165+
projectURL = sprintf("https://github.com/box-metadata/%s", name);
186166
sonatypeStaging = "https://oss.sonatype.org/service/local/staging/deploy/maven2/";
187167
sonatypeSnapshots = "https://oss.sonatype.org/content/repositories/snapshots/";
188168
};
189169

190-
task checkSigningRequirements << {
191-
def requiredProperties = [ "sonatypeUsername", "sonatypePassword" ];
192-
def noDice = false;
193-
requiredProperties.each {
194-
if (project.properties[it] == null) {
195-
noDice = true;
196-
System.err.printf("property \"%s\" is not defined!", it);
170+
task checkSigningRequirements {
171+
doLast {
172+
def requiredProperties = [ "sonatypeUsername", "sonatypePassword" ];
173+
def noDice = false;
174+
requiredProperties.each {
175+
if (project.properties[it] == null) {
176+
noDice = true;
177+
System.err.printf("property \"%s\" is not defined!", it);
178+
}
197179
}
180+
if (noDice)
181+
throw new IllegalStateException("missing required properties for " +
182+
"upload");
198183
}
199-
if (noDice)
200-
throw new IllegalStateException("missing required properties for " +
201-
"upload");
202184
}
203185

204186
uploadArchives {
@@ -234,15 +216,15 @@ uploadArchives {
234216
uploadArchives.repositories.mavenDeployer
235217
]*.pom*.whenConfigured { pom ->
236218
pom.project {
237-
name "${name}";
219+
name "${project.name}";
238220
packaging "jar";
239-
description "${description}";
221+
description "${project.ext.description}";
240222
url "${projectURL}";
241223

242224
scm {
243-
url "${gitrwscm}";
244-
connection "${gitrwscm}";
245-
developerConnection "${gitroscm}";
225+
url "${scmUrl}";
226+
connection "scm:git:${scmUrl}";
227+
developerConnection "scm:git:${scmUrl}";
246228
}
247229

248230
licenses {
@@ -260,9 +242,9 @@ uploadArchives {
260242

261243
developers {
262244
developer {
263-
id "fge";
264-
name "Francis Galiegue";
265-
email "fgaliegue@gmail.com";
245+
id "huggsboson";
246+
name "John Huffaker";
247+
email "jhuffaker+java-json-tools@gmail.com";
266248
}
267249
}
268250
}

dorelease.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
#!/bin/bash
22

3+
# Release instructions
4+
# 1. Follow the gpg setup instructions: http://central.sonatype.org/pages/working-with-pgp-signatures.html
5+
# a. gpg2 --export-secret-keys > ~/.gnupg/secring.gpg
6+
# 2. In ~/.gradle add:
7+
# sonatypeUsername=your sonatype user name
8+
# sonatypePassword=password in vault for oss sonatype<ensure newline>
9+
#
10+
# signing.keyId=generated key
11+
# signing.password=password for gpg key
12+
# signing.secretKeyRingFile=/Users/username/.gnupg/secring.gpg
13+
#
14+
# 3. ./dorelease.sh
15+
# 4. Go to UI at: https://oss.sonatype.org
16+
# 5. Login as sonatypeUsername
17+
# 6. Follow the instructions here: http://central.sonatype.org/pages/releasing-the-deployment.html
18+
319
./gradlew --recompile-scripts clean test uploadArchives
420

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,6 @@
1-
#
2-
# Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com)
3-
#
4-
# This software is dual-licensed under:
5-
#
6-
# - the Lesser General Public License (LGPL) version 3.0 or, at your option, any
7-
# later version;
8-
# - the Apache Software License (ASL) version 2.0.
9-
#
10-
# The text of this file and of both licenses is available at the root of this
11-
# project or, if you have the jar distribution, in directory META-INF/, under
12-
# the names LGPL-3.0.txt and ASL-2.0.txt respectively.
13-
#
14-
# Direct link to the sources:
15-
#
16-
# - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt
17-
# - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt
18-
#
19-
20-
#Mon Apr 14 09:45:58 CEST 2014
1+
#Fri Jun 02 16:48:25 PDT 2017
212
distributionBase=GRADLE_USER_HOME
223
distributionPath=wrapper/dists
234
zipStoreBase=GRADLE_USER_HOME
245
zipStorePath=wrapper/dists
25-
distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip
6+
distributionUrl=http\://services.gradle.org/distributions/gradle-3.5-all.zip

0 commit comments

Comments
 (0)