Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
126 lines (114 loc) · 3.89 KB
/
Copy pathbuild.gradle
File metadata and controls
126 lines (114 loc) · 3.89 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
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
plugins {
id "java-library"
id "maven-publish"
id 'org.jreleaser' version '1.27.0'
}
group = "io.fusionauth"
version = file("VERSION").text.trim()
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
withSourcesJar()
withJavadocJar()
}
dependencies {
api libs.testng.core
// testNG seems to depend on this
runtimeOnly libs.guice
testImplementation libs.mockito.core
}
tasks.named("test") {
useTestNG()
// The testclasses package holds deliberately failing fixtures that the reporter tests run themselves
exclude "**/testclasses/**"
}
tasks.withType(Javadoc).configureEach {
options.addStringOption("Xdoclint:none", "-quiet")
}
// This public library is released to Maven Central with JReleaser (from a developer's machine, never from GitHub Actions).
//
// To release: set centralUsername and centralPassword (a Central Portal user token), signing.gnupg.keyName and, unless the key is
// unlocked in gpg-agent, signing.gnupg.passphrase in your own ~/.gradle/gradle.properties -- never in this repo -- then run:
//
// gradle clean publish jreleaserDeploy
//
// `publish` stages the artifacts in build/staging-deploy; `jreleaserDeploy` signs and uploads them to the Central Portal. A release
// on Central is permanent. To upload without publishing, so you can publish from the Central Portal (Deployments), set
// JRELEASER_MAVENCENTRAL_STAGE=UPLOAD.
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
// Maven Central requires name, description, url, license, developers and scm
name = "testng-markdown-formatter"
description = "A TestNG reporter that writes the test results as markdown"
url = "https://github.com/FusionAuth/testng-markdown-formatter"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "https://www.apache.org/licenses/LICENSE-2.0"
}
}
developers {
developer {
name = "FusionAuth"
url = "https://fusionauth.io"
}
}
scm {
connection = "scm:git:https://github.com/FusionAuth/testng-markdown-formatter.git"
developerConnection = "scm:git:git@github.com:FusionAuth/testng-markdown-formatter.git"
url = "https://github.com/FusionAuth/testng-markdown-formatter"
}
}
}
}
repositories {
maven {
// JReleaser picks the artifacts up from here
name = "staging"
url = layout.buildDirectory.dir("staging-deploy")
}
}
}
jreleaser {
gitRootSearch = true
project {
description = "A TestNG reporter that writes the test results as markdown"
inceptionYear = "2023"
authors = ["FusionAuth"]
license = "Apache-2.0"
links {
homepage = "https://github.com/FusionAuth/testng-markdown-formatter"
}
}
// Artifacts are signed with the local gpg command. The key is personal config: set signing.gnupg.keyName and
// signing.gnupg.passphrase in ~/.gradle/gradle.properties (never in this repo). When unset, JReleaser falls back to
// JRELEASER_GPG_KEYNAME and JRELEASER_GPG_PASSPHRASE.
signing {
active = "ALWAYS"
armored = true
mode = "COMMAND"
passphrase = providers.gradleProperty("signing.gnupg.passphrase").orNull
command {
keyName = providers.gradleProperty("signing.gnupg.keyName").orNull
}
}
deploy {
maven {
mavenCentral {
sonatype {
active = "ALWAYS"
// From ~/.gradle/gradle.properties; when unset, JReleaser falls back to JRELEASER_MAVENCENTRAL_USERNAME and _TOKEN
username = providers.gradleProperty("centralUsername").orNull
password = providers.gradleProperty("centralPassword").orNull
url = "https://central.sonatype.com/api/v1/publisher"
stagingRepository("build/staging-deploy")
applyMavenCentralRules = true
}
}
}
}
}