-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
65 lines (46 loc) · 1.78 KB
/
build.gradle
File metadata and controls
65 lines (46 loc) · 1.78 KB
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
/*
* Gradle script for the Thrice project
*/
plugins
{
id 'com.github.spotbugs' version '6.4.2'
id "org.myire.quill.core" version "3.3"
id "org.myire.quill.moduleinfo" version "3.3"
id "org.myire.quill.jol" version "3.3"
}
// Build for compatibility with Java 8
java
{
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
// Load project meta data and version from the files in the meta data directory, and set the
// project's group and version from the loaded values.
projectMetaData.from('meta/project-meta.json').applyGroupToProject()
semanticVersion.from('meta/version.json').applyLongVersionToProject()
// Load dependencies from the external file.
apply from: 'dependencies.gradle'
// Use Maven central to retrieve dependencies.
repositories.mavenCentral()
// Configure all Jar tasks to add a build info section to the manifest.
tasks.withType(Jar).configureEach
{
manifest.addBuildInfoSection()
}
// Configure the main jar to add a package section to the manifest.
jar.manifest
{
addPackageSection()
}
// Add static data from the pom template and remove test dependencies when the pom file is created.
createPom.from(file('meta/pom-template.xml')).withoutScope('test')
// Run tests with JUnit 5.
test.useJUnitPlatform()
// Specify the JavaDoc html version to avoid warnings when building with JDK 9 or 10.
javadoc.options.addBooleanOption('html5', true)
// Configure project specific exclusion/suppressions/filter files for the static analysis tasks.
spotbugs.excludeFilter = file('gradle/spotbugs_excludes.xml')
checkstyle.configProperties.put('suppressions.file', file('gradle/checkstyle_suppressions.xml'))
pmdMain.filter.file = 'gradle/pmd_filter.xml'
// Disable code quality analysis of the test sources.
[spotbugs, checkstyle, pmd]*.disableTestChecks()