-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
133 lines (116 loc) · 3.7 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
125
126
127
128
129
130
131
132
133
plugins {
id 'java'
id 'jacoco'
id 'maven-publish'
id 'pl.allegro.tech.build.axion-release' version '1.17.0'
id "com.github.ben-manes.versions" version "0.51.0"
id "com.diffplug.spotless" version "6.25.0"
id "com.github.andygoossens.gradle-modernizer-plugin" version "1.9.2"
id 'com.adarshr.test-logger' version '4.0.0'
}
scmVersion {
tag {
prefix = ''
}
hooks {
pre 'fileUpdate', [
file: 'README.md', pattern: {v, c -> /<version>$v/}, replacement: {v, c -> "<version>$v"}
]
pre 'fileUpdate', [
file: 'README.md', pattern: {v, c -> /com.github.atomfrede:jadenticon:$v/}, replacement: {v, c -> "com.github.atomfrede:jadenticon:$v"}
]
pre 'commit'
}
}
spotless {
format 'misc', {
target '**/*.gradle', '**/*.md', '**/*.adoc', '**/.gitignore'
targetExclude 'node_modules/**/*.*', ".gradle/**", "build/**/*.*", "target/**/*.*", "src/test/e2e/node_modules/**"
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
}
test {
include '**/*Test.*'
exclude '**/*Spec.*', '**/*IT.*'
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
java {
withSourcesJar()
withJavadocJar()
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
jacoco {
toolVersion = "0.8.9"
}
ext.moduleName = 'com.github.atomfrede.jadenticon'
group 'com.github.atomfrede'
repositories {
mavenCentral()
}
dependencies {
implementation "commons-io:commons-io:2.15.1"
implementation 'org.apache.xmlgraphics:batik-transcoder:1.17'
implementation 'org.apache.xmlgraphics:xmlgraphics-commons:2.9'
implementation 'org.apache.xmlgraphics:batik-codec:1.17'
implementation 'org.openjdk.nashorn:nashorn-core:15.4'
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
testImplementation 'org.assertj:assertj-core:3.25.3'
testImplementation "com.tngtech.archunit:archunit-junit5-api:1.2.1"
testRuntimeOnly "com.tngtech.archunit:archunit-junit5-engine:1.2.1"
}
jar {
inputs.property("moduleName", moduleName)
manifest {
attributes('Automatic-Module-Name': moduleName)
}
}
jacocoTestReport {
// executionData tasks.withType(Test)
executionData tasks.matching({
it.name.equals("integrationTest") || it.name.equals("test")
})
classDirectories.from = files(sourceSets.main.output.classesDirs)
sourceDirectories.from = files(sourceSets.main.java.srcDirs)
reports {
html.required = true
xml.required = true
csv.required = false
}
}
publishing {
publications {
maven(MavenPublication) {
from components.java
pom {
name = 'jadenticon'
description = 'Jadenticon is a simple java wrapper for the Jdenticon javascript library to create nice looking, random identicons.'
url = 'http://www.example.com/library'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'atomfrede'
name = 'Frederik Hahne'
}
}
scm {
connection = 'scm:git:git://github.com/atomfrede/jadenticon.git'
developerConnection = 'scm:git:ssh://github.com/atomfrede/jadenticon.git'
}
}
}
}
}
project.version = scmVersion.version
check.dependsOn jacocoTestReport