-
Notifications
You must be signed in to change notification settings - Fork 119
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
77 lines (66 loc) · 2.13 KB
/
build.gradle.kts
File metadata and controls
77 lines (66 loc) · 2.13 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
plugins {
java
`java-library`
alias(libs.plugins.nexus.publish)
alias(libs.plugins.kotlin.jvm) apply false
}
allprojects {
group = "com.navercorp.fixturemonkey"
version = findProperty("fixtureMonkeyVersion") as String
}
subprojects {
apply {
plugin("java")
plugin("java-library")
plugin("com.navercorp.fixturemonkey.gradle.plugin.optional-dependencies")
}
dependencies {
val libs = rootProject.libs
api(libs.google.jsr305)
implementation(libs.google.findbugs.annotations)
implementation(libs.jspecify)
compileOnly(libs.slf4j.api)
testImplementation(libs.logback.classic)
}
tasks.javadoc { enabled = false }
java {
toolchain { languageVersion = JavaLanguageVersion.of(8) }
withJavadocJar()
withSourcesJar()
}
tasks.jar {
val artifactName: String? by project
if (artifactName == null) {
return@jar
}
manifest {
attributes(
"Specification-Title" to artifactName,
"Specification-Version" to project.version,
"Specification-Vendor" to "com.navercorp",
"Implementation-Title" to artifactName,
"Implementation-Version" to project.version,
"Implementation-Vendor" to "com.navercorp",
)
}
}
if (!name.endsWith("tests")) {
tasks.withType<Test> {
useJUnitPlatform {
includeEngines("jqwik")
}
}
}
}
nexusPublishing {
repositories {
sonatype { // only for users registered in Sonatype after 24 Feb 2021
val ossrhUsernameToken: String = System.getenv("OSSRH_USERNAME_TOKEN") ?: ""
val ossrhPasswordToken: String = System.getenv("OSSRH_PASSWORD_TOKEN") ?: ""
nexusUrl = uri("https://ossrh-staging-api.central.sonatype.com/service/local/")
snapshotRepositoryUrl = uri("https://central.sonatype.com/repository/maven-snapshots/")
username = ossrhUsernameToken
password = ossrhPasswordToken
}
}
}