-
Notifications
You must be signed in to change notification settings - Fork 192
/
Copy pathbuild.gradle
123 lines (107 loc) · 2.8 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
/*
* Copyright (c) 2014, Francis Galiegue ([email protected])
*
* This software is dual-licensed under:
*
* - the Lesser General Public License (LGPL) version 3.0 or, at your option, any
* later version;
* - the Apache Software License (ASL) version 2.0.
*
* The text of this file and of both licenses is available at the root of this
* project or, if you have the jar distribution, in directory META-INF/, under
* the names LGPL-3.0.txt and ASL-2.0.txt respectively.
*
* Direct link to the sources:
*
* - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt
* - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt
*/
buildscript {
repositories {
mavenCentral()
maven {
url "https://repo.springsource.org/plugins-release";
}
}
dependencies {
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:4.2.0'
classpath(group: "org.springframework.build.gradle", name: "propdeps-plugin", version: "0.0.7");
}
};
plugins {
id("net.ltgt.errorprone") version "0.8.1" apply false
id 'net.researchgate.release' version '2.8.1'
}
configure(allprojects) {
apply(plugin: "propdeps");
apply(plugin: "propdeps-maven");
apply(plugin: "propdeps-idea");
apply(plugin: "propdeps-eclipse");
}
apply(plugin: "java");
apply(plugin: "maven");
apply(plugin: "signing");
apply(plugin: "biz.aQute.bnd.builder");
apply(plugin: "idea");
apply(plugin: "eclipse");
apply(plugin: "net.ltgt.errorprone");
apply(from: "project.gradle");
group = "com.github.java-json-tools";
/*
* Repositories to use
*/
repositories {
mavenCentral();
maven {
url "https://pkgs.dev.azure.com/Gravity9Solutions/BT/_packaging/bt/maven/v1"
}
}
/*
* Add errorprone checking.
*/
dependencies {
errorprone("com.google.errorprone:error_prone_core:2.3.3")
errorproneJavac("com.google.errorprone:javac:9+181-r4173-1")
}
/*
* Necessary! Otherwise TestNG will not be used...
*
*/
test {
useTestNG() {
useDefaultListeners = true;
};
}
/*
* Necessary to generate the source and javadoc jars
*/
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources";
from sourceSets.main.allSource;
}
/*
* Lint all the things!
*/
allprojects {
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:all" << "-Xlint:-serial" << "-Werror"
}
tasks.withType(Javadoc) {
options.addStringOption('Xwerror', '-quiet')
}
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = "javadoc";
from javadoc.destinationDir;
}
artifacts {
archives jar;
archives sourcesJar;
archives javadocJar;
}
wrapper {
gradleVersion = "5.6.3";
distributionUrl = "https://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip";
}