-
Notifications
You must be signed in to change notification settings - Fork 95
/
build.gradle.kts
134 lines (114 loc) · 3.66 KB
/
build.gradle.kts
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
plugins {
`java-library`
checkstyle
`maven-publish`
signing
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
group = "uk.co.conoregan"
version = "2.2.0"
repositories {
mavenCentral()
}
dependencies {
// logging
implementation(platform("org.slf4j:slf4j-bom:2.0.16"))
implementation("org.slf4j:slf4j-api")
// testing
testImplementation(platform("org.junit:junit-bom:5.11.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation(platform("org.mockito:mockito-bom:5.13.0"))
testImplementation("org.mockito:mockito-core")
// util
compileOnly("org.projectlombok:lombok:1.18.34")
annotationProcessor("org.projectlombok:lombok:1.18.34")
testCompileOnly("org.projectlombok:lombok:1.18.34")
testAnnotationProcessor("org.projectlombok:lombok:1.18.34")
implementation(platform("com.fasterxml.jackson:jackson-bom:2.17.2"))
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.17.0")
testImplementation("commons-io:commons-io:2.16.1")
}
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 {
name = "OSSRH"
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}
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)
}
}
}