-
Notifications
You must be signed in to change notification settings - Fork 89
/
build.gradle
118 lines (98 loc) · 3.44 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
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'org.asciidoctor.jvm.convert' version '3.3.2'
id 'org.ajoberstar.git-publish' version '4.2.1'
}
// See gradle.properties for some dependency version settings
buildScan {
if (System.getenv('CI')) {
publishAlways()
uploadInBackground = false
tag 'CI'
}
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
allprojects {
apply plugin: 'java'
apply plugin: 'groovy'
//apply plugin: 'findbugs'
//apply plugin: 'pmd'
version = omnijVersion
group = 'foundation.omni'
repositories {
mavenCentral()
if (useMavenLocal == "true") {
mavenLocal()
}
maven { url 'https://gitlab.com/api/v4/projects/8482916/packages/maven' } // ConsensusJ (RPC client)
}
// tasks.withType(FindBugs) {
// reports {
// xml.enabled false
// html.enabled true
// }
// }
}
subprojects {
dependencies {
implementation "org.slf4j:slf4j-api:${slf4jVersion}"
testImplementation("org.junit.jupiter:junit-jupiter:${junitJupiterVersion}")
testImplementation ("com.msgilligan:cj-bitcoinj-dsl-gvy:${consensusjVersion}" , {
// These exclusions can be removed when ConsensusJ upgrades to Groovy 4.0
exclude group: 'org.codehaus.groovy', module: 'groovy'
exclude group: 'org.codehaus.groovy', module: 'groovy-json'
})
testImplementation "org.apache.groovy:groovy:${groovyVersion}"
testImplementation("org.spockframework:spock-core:${spockVersion}") {
exclude module: "groovy-all"
}
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}"
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testRuntimeOnly "org.slf4j:slf4j-jdk14:${slf4jVersion}" // Runtime implementation of slf4j for tests
}
configurations.configureEach {
// Ensure usage of Groovy 4.0 which has new Maven co-ordinates
resolutionStrategy.capabilitiesResolution.all {
if (capability.group.equals("org.codehaus.groovy")) {
selectHighestVersion()
}
}
}
java {
withJavadocJar()
withSourcesJar()
}
tasks.withType(JavaCompile).configureEach {
options.release = 11
}
compileJava {
options.compilerArgs << '-Xlint:deprecation' << '-Xlint:unchecked'
}
tasks.withType(AbstractArchiveTask).configureEach {
// This should result in reproducible JAR builds
// See: https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives
preserveFileTimestamps = false
reproducibleFileOrder = true
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
testLogging.showStandardStreams = true
}
}
apply from: 'gradle/idea.gradle'
apply from: 'gradle/groovydoc.gradle'
apply from: 'gradle/javadoc.gradle'
apply from: 'gradle/asciidoctor.gradle'
apply from: 'gradle/maven-publish.gradle'
apply from: 'gradle/github-pages.gradle'
tasks.register('testReport', TestReport) {
destinationDirectory = file("$buildDir/reports/allTests")
// Include the results from the `test` task in all subprojects
reportOn subprojects*.test
}
tasks.register('buildCI') { dependsOn build, testReport, javadocAll, groovydocAll, asciidoctor }