forked from c-eg/themoviedbapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
154 lines (133 loc) · 4.23 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
154 lines (133 loc) · 4.23 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
plugins {
`java-library`
checkstyle
`maven-publish`
signing
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
id("org.jreleaser") version "1.22.0"
}
group = "uk.co.conoregan"
version = "2.5.1"
repositories {
mavenCentral()
}
dependencies {
// logging
implementation(platform("org.slf4j:slf4j-bom:2.0.17"))
implementation("org.slf4j:slf4j-api")
// testing
testImplementation(platform("org.junit:junit-bom:6.0.2"))
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher") // gradle bundled version is incompatible with 5.12
testImplementation(platform("org.mockito:mockito-bom:5.21.0"))
testImplementation("org.mockito:mockito-core")
// util
compileOnly("org.projectlombok:lombok:1.18.42")
annotationProcessor("org.projectlombok:lombok:1.18.42")
testCompileOnly("org.projectlombok:lombok:1.18.42")
testAnnotationProcessor("org.projectlombok:lombok:1.18.42")
implementation(platform("com.fasterxml.jackson:jackson-bom:2.21.0"))
implementation("com.fasterxml.jackson.core:jackson-annotations")
implementation("com.fasterxml.jackson.core:jackson-core")
implementation("com.fasterxml.jackson.core:jackson-databind")
implementation("org.apache.commons:commons-lang3:3.20.0")
testImplementation("commons-io:commons-io:2.21.0")
}
java {
withJavadocJar()
withSourcesJar()
}
tasks.test {
useJUnitPlatform()
}
checkstyle {
toolVersion = "10.17.0"
configFile = file("config/checkstyle/checkstyle.xml")
}
tasks.checkstyleMain {
source = fileTree("src/main/java")
}
tasks.checkstyleTest {
source = fileTree("src/test/java")
}
tasks.withType<Checkstyle>().configureEach {
reports {
html.required = true
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
pom {
name = "themoviedbapi"
description = "A Java-wrapper around the JSON API provided by TMdB, which is an open database for movie and tv content."
url = "https://github.com/c-eg/themoviedbapi"
licenses {
license {
name = "BSD"
url = "https://github.com/c-eg/themoviedbapi/blob/master/LICENCE.txt"
}
}
scm {
connection = "scm:git:github.com/c-eg/themoviedbapi.git"
url = "https://github.com/c-eg/themoviedbapi.git"
}
developers {
developer {
id = "holgerbrandl"
name = "Holger Brandl"
email = "holgerbrandl@gmail.com"
}
developer {
id = "c-eg"
name = "Conor Egan"
email = "17conoregan@gmail.com"
}
}
}
}
}
repositories {
maven {
url = uri(layout.buildDirectory.dir("staging-deploy"))
}
}
}
jreleaser {
signing {
pgp {
active = org.jreleaser.model.Active.ALWAYS
armored = true
mode = org.jreleaser.model.Signing.Mode.FILE
publicKey = "C:/gpg/public.pgp"
secretKey = "C:/gpg/private.pgp"
}
}
deploy {
maven {
mavenCentral {
create("sonatype") {
active = org.jreleaser.model.Active.ALWAYS
url.set("https://central.sonatype.com/api/v1/publisher")
stagingRepository("build/staging-deploy")
}
}
}
}
}
if (project.hasProperty("signing.keyId") && project.hasProperty("signing.password") && project.hasProperty("signing.secretKeyRingFile")) signing {
sign(publishing.publications["mavenJava"])
}
tasks.javadoc {
if (JavaVersion.current().isJava9Compatible) {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
}
tasks {
javadoc {
options {
(this as CoreJavadocOptions).addBooleanOption("Xdoclint:none", true)
}
}
}