Skip to content

Commit fccb431

Browse files
committed
Java 7, lint, signing updates.
1 parent 9b14d38 commit fccb431

File tree

1 file changed

+35
-14
lines changed

1 file changed

+35
-14
lines changed

build.gradle

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,23 @@
1616
* - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt
1717
*/
1818

19+
plugins {
20+
id("net.ltgt.errorprone") version "0.8.1" apply false
21+
}
22+
1923
apply(plugin: "java");
2024
apply(plugin: "maven");
2125
apply(plugin: "signing");
2226
apply(plugin: "osgi");
2327
apply(plugin: "idea");
2428
apply(plugin: "eclipse");
29+
apply(plugin: "net.ltgt.errorprone");
30+
31+
group = "com.github.java-json-tools";
2532

26-
group = "com.github.fge";
2733
version = "0.8.2-SNAPSHOT";
28-
sourceCompatibility = "1.6";
29-
targetCompatibility = "1.6"; // defaults to sourceCompatibility
34+
sourceCompatibility = JavaVersion.VERSION_1_7;
35+
targetCompatibility = JavaVersion.VERSION_1_7; // defaults to sourceCompatibility
3036

3137
project.ext {
3238
description = "Sample JSON Schema related processors using json-schema-core and various external libraries";
@@ -45,6 +51,8 @@ repositories {
4551
* List of dependencies
4652
*/
4753
dependencies {
54+
errorprone("com.google.errorprone:error_prone_core:2.3.3")
55+
errorproneJavac("com.google.errorprone:javac:9+181-r4173-1")
4856
compile(group: "com.github.fge", name: "json-schema-validator",
4957
version: "2.2.6");
5058
compile(group: "com.github.reinert", name: "jjschema", version: "0.6") {
@@ -73,9 +81,9 @@ javadoc {
7381
def currentJavaVersion = org.gradle.api.JavaVersion.current()
7482
// FIXME: https://github.com/gradle/gradle/issues/11182
7583
if (currentJavaVersion.compareTo(org.gradle.api.JavaVersion.VERSION_1_9) >= 0) {
76-
addStringOption("-release", "6");
84+
addStringOption("-release", "7");
7785
}
78-
links("https://docs.oracle.com/javase/6/docs/api/");
86+
links("https://docs.oracle.com/javase/7/docs/api/");
7987
links("https://www.javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.1/");
8088
links("https://fasterxml.github.com/jackson-databind/javadoc/2.2.0/");
8189
links("https://www.javadoc.io/doc/com.google.guava/guava/16.0.1/");
@@ -121,6 +129,20 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
121129
// classifier = "full";
122130
//}
123131

132+
/*
133+
* Lint all the things!
134+
*/
135+
allprojects {
136+
gradle.projectsEvaluated {
137+
tasks.withType(JavaCompile) {
138+
options.compilerArgs << "-Xlint:all" << "-Xlint:-serial" << "-Werror"
139+
}
140+
tasks.withType(Javadoc) {
141+
options.addStringOption('Xwerror', '-quiet')
142+
}
143+
}
144+
}
145+
124146
artifacts {
125147
archives jar;
126148
archives sourcesJar;
@@ -144,9 +166,8 @@ task pom {
144166
*/
145167

146168
project.ext {
147-
gitrwscm = sprintf("[email protected]:fge/%s", name);
148-
gitroscm = sprintf("https://github.com/fge/%s.git", name);
149-
projectURL = sprintf("https://github.com/fge/%s", name);
169+
scmUrl = sprintf("[email protected]:java-json-tools/%s.git", name)
170+
projectURL = sprintf("https://github.com/java-json-tools/%s", name);
150171
sonatypeStaging = "https://oss.sonatype.org/service/local/staging/deploy/maven2/";
151172
sonatypeSnapshots = "https://oss.sonatype.org/content/repositories/snapshots/";
152173
};
@@ -206,9 +227,9 @@ uploadArchives {
206227
url "${projectURL}";
207228

208229
scm {
209-
url "${gitrwscm}";
210-
connection "${gitrwscm}";
211-
developerConnection "${gitroscm}";
230+
url "${scmUrl}";
231+
connection "${scmUrl}";
232+
developerConnection "scm:git:${scmUrl}";
212233
}
213234

214235
licenses {
@@ -226,9 +247,9 @@ uploadArchives {
226247

227248
developers {
228249
developer {
229-
id "fge";
230-
name "Francis Galiegue";
231-
email "fgaliegue@gmail.com";
250+
id "huggsboson";
251+
name "John Huffaker";
252+
email "jhuffaker+java-json-tools@gmail.com";
232253
}
233254
}
234255
}

0 commit comments

Comments
 (0)