Skip to content

Commit cabc332

Browse files
committed
Split monolithic build.gradle into project and settings files.
1 parent 047f4b2 commit cabc332

File tree

3 files changed

+90
-45
lines changed

3 files changed

+90
-45
lines changed

Diff for: build.gradle

+3-45
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ apply(plugin: "idea");
3838
apply(plugin: "eclipse");
3939
apply(plugin: "net.ltgt.errorprone");
4040

41+
apply(from: "project.gradle");
42+
4143
group = "com.github.java-json-tools";
42-
version = "1.2.13-SNAPSHOT";
43-
sourceCompatibility = JavaVersion.VERSION_1_7;
44-
targetCompatibility = JavaVersion.VERSION_1_7; // defaults to sourceCompatibility
4544

4645
ext.forRelease = !version.endsWith("-SNAPSHOT");
4746

@@ -75,47 +74,6 @@ dependencies {
7574
errorproneJavac("com.google.errorprone:javac:9+181-r4173-1")
7675
}
7776

78-
/*
79-
* List of dependencies
80-
*/
81-
dependencies {
82-
compile(group: "com.fasterxml.jackson.core", name: "jackson-databind", version: "2.9.9");
83-
compile(group: "com.google.guava", name: "guava", version: "28.1-android");
84-
compile(group: "com.github.java-json-tools", name: "jackson-coreutils", version: "1.11");
85-
compile(group: "com.github.java-json-tools", name: "uri-template", version: "0.10");
86-
// FIXME: no javadoc
87-
// FIXME: update beyond 1.7.7.x once we're Java 8 or better.
88-
compile(group: "org.mozilla", name: "rhino", version: "1.7.7.2");
89-
compile(group: "com.google.code.findbugs", name: "jsr305", version: "3.0.2");
90-
testCompile(group: "org.testng", name: "testng", version: "6.10") {
91-
exclude(group: "junit", module: "junit");
92-
exclude(group: "org.beanshell", module: "bsh");
93-
exclude(group: "org.yaml", module: "snakeyaml");
94-
};
95-
testCompile(group: "org.mockito", name: "mockito-core", version: "2.4.2");
96-
// FIXME: update to 3.x once we're off of Java 7.
97-
testCompile(group: "org.assertj", name: "assertj-core", version: "2.9.1");
98-
}
99-
100-
javadoc {
101-
options {
102-
def currentJavaVersion = org.gradle.api.JavaVersion.current()
103-
// FIXME: https://github.com/gradle/gradle/issues/11182
104-
if (currentJavaVersion.compareTo(org.gradle.api.JavaVersion.VERSION_1_9) >= 0) {
105-
addStringOption("-release", "7");
106-
}
107-
links("https://docs.oracle.com/javase/7/docs/api/");
108-
links("https://www.javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.1/");
109-
links("https://fasterxml.github.io/jackson-databind/javadoc/2.2.0/");
110-
links("https://fasterxml.github.io/jackson-core/javadoc/2.2.0/");
111-
links("https://www.javadoc.io/doc/com.google.guava/guava/28.1-android/");
112-
links("https://java-json-tools.github.io/btf/");
113-
links("https://java-json-tools.github.io/msg-simple/");
114-
links("https://java-json-tools.github.io/jackson-coreutils/");
115-
links("https://java-json-tools.github.io/uri-template/");
116-
}
117-
}
118-
11977
/*
12078
* Necessary! Otherwise TestNG will not be used...
12179
*
@@ -251,7 +209,7 @@ uploadArchives {
251209

252210
scm {
253211
url "${scmUrl}";
254-
connection "scm:git:${scmUrl}";
212+
connection "${scmUrl}";
255213
developerConnection "scm:git:${scmUrl}";
256214
}
257215

Diff for: project.gradle

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/*
2+
* Copyright (c) 2014, Francis Galiegue ([email protected])
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+
/*
21+
* Project-specific settings. Unfortunately we cannot put the name in there!
22+
*/
23+
group = "com.github.java-json-tools";
24+
version = "1.2.13-SNAPSHOT";
25+
sourceCompatibility = JavaVersion.VERSION_1_7;
26+
targetCompatibility = JavaVersion.VERSION_1_7; // defaults to sourceCompatibility
27+
28+
/*
29+
* List of dependencies
30+
*/
31+
dependencies {
32+
compile(group: "com.fasterxml.jackson.core", name: "jackson-databind", version: "2.9.9");
33+
compile(group: "com.google.guava", name: "guava", version: "28.1-android");
34+
compile(group: "com.github.java-json-tools", name: "jackson-coreutils", version: "1.11");
35+
compile(group: "com.github.java-json-tools", name: "uri-template", version: "0.10");
36+
// FIXME: no javadoc
37+
// FIXME: update beyond 1.7.7.x once we're Java 8 or better.
38+
compile(group: "org.mozilla", name: "rhino", version: "1.7.7.2");
39+
compile(group: "com.google.code.findbugs", name: "jsr305", version: "3.0.2");
40+
testCompile(group: "org.testng", name: "testng", version: "6.10") {
41+
exclude(group: "junit", module: "junit");
42+
exclude(group: "org.beanshell", module: "bsh");
43+
exclude(group: "org.yaml", module: "snakeyaml");
44+
};
45+
testCompile(group: "org.mockito", name: "mockito-core", version: "2.4.2");
46+
// FIXME: update to 3.x once we're off of Java 7.
47+
testCompile(group: "org.assertj", name: "assertj-core", version: "2.9.1");
48+
}
49+
50+
javadoc {
51+
options {
52+
def currentJavaVersion = org.gradle.api.JavaVersion.current()
53+
// FIXME: https://github.com/gradle/gradle/issues/11182
54+
if (currentJavaVersion.compareTo(org.gradle.api.JavaVersion.VERSION_1_9) >= 0) {
55+
addStringOption("-release", "7");
56+
}
57+
links("https://docs.oracle.com/javase/7/docs/api/");
58+
links("https://www.javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.1/");
59+
links("https://fasterxml.github.io/jackson-databind/javadoc/2.2.0/");
60+
links("https://fasterxml.github.io/jackson-core/javadoc/2.2.0/");
61+
links("https://www.javadoc.io/doc/com.google.guava/guava/28.1-android/");
62+
links("https://java-json-tools.github.io/btf/");
63+
links("https://java-json-tools.github.io/msg-simple/");
64+
links("https://java-json-tools.github.io/jackson-coreutils/");
65+
links("https://java-json-tools.github.io/uri-template/");
66+
}
67+
}

Diff for: settings.gradle

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright (c) 2014, Francis Galiegue ([email protected])
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+
rootProject.name = "json-schema-core";

0 commit comments

Comments
 (0)