Skip to content

Commit cf466c4

Browse files
committed
Add metadata for publishing.
1 parent 912c3c4 commit cf466c4

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

build.gradle

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ configurations {
4040
integrationTestRuntimeOnly.extendsFrom runtimeOnly
4141
}
4242

43+
java {
44+
withJavadocJar()
45+
withSourcesJar()
46+
}
47+
4348
tasks.register('integrationTest', Test) {
4449
description = 'Runs integration tests (assumes running Docker image or local server)'
4550
group = 'verification'
@@ -67,3 +72,46 @@ dependencies {
6772
integrationTestImplementation "junit:junit:4.12"
6873
integrationTestImplementation "org.hamcrest:hamcrest-all:1.3"
6974
}
75+
76+
nexusPublishing {
77+
repositories {
78+
sonatype {
79+
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
80+
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
81+
}
82+
}
83+
}
84+
85+
publishing {
86+
publications {
87+
mavenJava(MavenPublication) {
88+
from(components.java)
89+
pom {
90+
name = 'typesense-java'
91+
description = 'Typesense Java Client'
92+
url = 'https://github.com/typesense/typesense-java'
93+
licenses {
94+
license {
95+
name = 'GNU General Public License v3.0'
96+
url = 'https://www.gnu.org/licenses/gpl-3.0.en.html'
97+
}
98+
}
99+
developers {
100+
developer {
101+
id = 'typesense'
102+
name = 'Typesense'
103+
}
104+
}
105+
scm {
106+
url = 'https://github.com/typesense/typesense-java'
107+
connection = 'scm:git://github.com/typesense/typesense-java.git'
108+
developerConnection = 'scm:git://github.com/typesense/typesense-java.git'
109+
}
110+
}
111+
}
112+
}
113+
}
114+
115+
signing {
116+
sign publishing.publications.mavenJava
117+
}

0 commit comments

Comments
 (0)