-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
124 lines (104 loc) · 3.57 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
122
123
124
plugins {
id 'org.javamodularity.moduleplugin' version '1.8.11' apply false
id 'io.freefair.lombok' version '6.4.1' apply false
id 'org.asciidoctor.jvm.convert' version '3.3.2' apply false
id 'org.ajoberstar.grgit' version '5.0.0'
id 'org.ajoberstar.reckon' version '0.16.1'
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
id 'org.sonarqube' version '3.3'
id 'org.ajoberstar.git-publish' version '4.1.0'
}
group = 'com.github.moaxcp.graphs'
description = 'dynamic graphs supporting streams and observability'
reckon {
snapshots()
scopeCalc = calcScopeFromProp().or(calcScopeFromCommitMessages())
stageCalc = calcStageFromProp()
}
nexusPublishing {
repositories {
sonatype {
//by default value from above 'nexusStaging' closure is used (alternative project properties 'sonatypeUsername' and 'sonatypePassword')
username = project.findProperty("nexus.username")
password = project.findProperty("nexus.password")
}
}
clientTimeout = Duration.ofSeconds(300)
connectTimeout = Duration.ofSeconds(60)
}
gitPublish {
branch = 'gh-pages'
contents {
from 'graphs-manual/build/docs/asciidoc'
}
commitMessage = 'Publishing from gradle.'
}
sonarqube {
properties {
property 'sonar.projectKey', 'com.github.moaxcp.graphs:graphs'
property 'sonar.host.url', 'https://sonarcloud.io'
property 'sonar.organization', 'moaxcp'
property 'sonar.scm.exclusions.disabled', 'true'
property 'sonar.qualitygate.wait', true
}
}
allprojects {
repositories {
mavenCentral()
}
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'jacoco'
//apply plugin: 'checkstyle'
apply plugin: 'org.javamodularity.moduleplugin'
apply plugin: 'io.freefair.lombok'
sourceCompatibility = 17
targetCompatibility = 17
jacoco {
toolVersion = '0.8.7'
}
jacocoTestReport {
reports {
xml.enabled true
}
}
javadoc {
options.addBooleanOption('html5', true)
options.links 'https://docs.oracle.com/en/java/javase/17/docs/api/'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}
task javadocJar(type: Jar) {
from javadoc
archiveClassifier = 'javadoc'
}
dependencies {
//checkstyle 'com.puppycrawl.tools:checkstyle:8.12'
testImplementation enforcedPlatform('org.junit:junit-bom:5.8.2')
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-params'
testImplementation 'com.google.truth:truth:1.1.3'
testImplementation 'com.google.truth.extensions:truth-java8-extension:1.1.3'
testImplementation 'nl.jqno.equalsverifier:equalsverifier:3.9'
testImplementation 'org.assertj:assertj-core:3.22.0'
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
//https://github.com/openjdk/skara/pull/66
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
test {
useJUnitPlatform()
reports {
html.enabled = true
}
systemProperty "com.google.common.truth.disable_stack_trace_cleaning", "true"
moduleOptions {
addOpens = [
'com.github.moaxcp.graphs.core/com.github.moaxcp.graphs' : 'nl.jqno.equalsverifier',
'com.github.moaxcp.graphs.core/com.github.moaxcp.graphs.events': 'nl.jqno.equalsverifier'
]
}
}
}