-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
99 lines (86 loc) · 3.48 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
group = "tech.figure.objectstore.gateway"
version = project.property("version")?.takeIf { it != "unspecified" } ?: "1.0-SNAPSHOT"
plugins {
kotlin("jvm")
id("idea")
id("maven-publish")
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
id("signing")
id("org.jlleitschuh.gradle.ktlint")
id("com.adarshr.test-logger")
}
repositories {
mavenCentral()
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username.set(findProject("ossrhUsername")?.toString() ?: System.getenv("OSSRH_USERNAME"))
password.set(findProject("ossrhPassword")?.toString() ?: System.getenv("OSSRH_PASSWORD"))
stagingProfileId.set("858b6e4de4734a") // tech.figure staging profile id
}
}
}
subprojects {
val projectName = name
if (projectName in listOf("client", "server", "shared")) {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
apply(plugin = "com.adarshr.test-logger")
}
if (projectName in listOf("client", "proto", "shared")) {
apply(plugin = "maven-publish")
apply(plugin = "signing")
apply(plugin = "java-library")
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = "tech.figure.objectstore.gateway"
artifactId = projectName
from(components["java"])
pom {
name.set("Figure Tech Object Store Gateway Client Library")
description.set("A library for interacting with the Figure Tech Object Store Gateway")
url.set("https://figure.tech")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("piercetrey-figure")
name.set("Pierce Trey")
email.set("[email protected]")
}
developer {
id.set("hyperschwartz")
name.set("Jake Schwartz")
email.set("[email protected]")
}
}
scm {
connection.set("[email protected]:FigureTechnologies/object-store-gateway.git")
developerConnection.set("[email protected]:FigureTechnologies/object-store-gateway.git")
url.set("https://github.com/FigureTechnologies/object-store-gateway")
}
}
}
}
signing {
sign(publishing.publications["maven"])
}
tasks.javadoc {
if (JavaVersion.current().isJava9Compatible) {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
}
}
}
}