-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
108 lines (93 loc) · 2.85 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
plugins {
`java-library`
checkstyle
`maven-publish`
signing
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
group = "uk.co.conoregan"
version = "1.0.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("org.wiremock:wiremock:3.9.1")
// json
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")
}
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")
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
pom {
name = "watch2getherapi"
description = "A Java wrapper around the JSON API provided by w2g.tv"
url = "https://github.com/c-eg/watch2getherapi"
licenses {
license {
name = "MIT"
url = "https://github.com/c-eg/watch2getherapi/blob/main/LICENSE"
}
}
scm {
connection = "scm:git:github.com/c-eg/watch2getherapi.git"
url = "https://github.com/c-eg/watch2getherapi.git"
}
developers {
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 {
options {
(this as CoreJavadocOptions).addBooleanOption("Xdoclint:none", true)
(this as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
}
}