1+ import java.util.Base64
2+ import kotlin.text.String
13/*
24 * Copyright 2020 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
35 */
@@ -6,13 +8,14 @@ plugins {
68 id(" kotlin-kapt" )
79 id(" maven-publish" )
810 id(" java-library" )
11+ id(" signing" )
912}
1013
1114apply (plugin = " java" )
1215apply (plugin = " kotlin" )
1316
1417group = " com.icerockdev"
15- version = " 0.5.0 "
18+ version = " 0.5.1 "
1619
1720val sourcesJar by tasks.registering(Jar ::class ) {
1821 archiveClassifier.set(" sources" )
@@ -39,6 +42,7 @@ dependencies {
3942java {
4043 sourceCompatibility = JavaVersion .VERSION_11
4144 targetCompatibility = JavaVersion .VERSION_11
45+ withJavadocJar()
4246}
4347
4448tasks.withType< org.jetbrains.kotlin.gradle.tasks.KotlinCompile > {
@@ -52,18 +56,64 @@ repositories {
5256}
5357
5458publishing {
55- repositories.maven(" https://api.bintray.com/maven/icerockdev/backend/storage-service/;publish=1 " ) {
56- name = " bintray "
59+ repositories.maven(" https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ " ) {
60+ name = " OSSRH "
5761
5862 credentials {
59- username = System .getProperty( " BINTRAY_USER " )
60- password = System .getProperty( " BINTRAY_KEY " )
63+ username = System .getenv( " OSSRH_USER " )
64+ password = System .getenv( " OSSRH_KEY " )
6165 }
6266 }
6367 publications {
6468 register(" mavenJava" , MavenPublication ::class ) {
6569 from(components[" java" ])
6670 artifact(sourcesJar.get())
71+ pom {
72+ name.set(" Storage service" )
73+ description.set(" Tools for work with s3 storage and generate preview" )
74+ url.set(" https://github.com/icerockdev/storage-service" )
75+ licenses {
76+ license {
77+ url.set(" https://github.com/icerockdev/storage-service/blob/master/LICENSE.md" )
78+ }
79+ }
80+
81+ developers {
82+ developer {
83+ id.set(" YokiToki" )
84+ name.set(" Stanislav" )
85+ email.set(" skarakovski@icerockdev.com" )
86+ }
87+
88+ developer {
89+ id.set(" AlexeiiShvedov" )
90+ name.set(" Alex Shvedov" )
91+ email.set(" ashvedov@icerockdev.com" )
92+ }
93+
94+ developer {
95+ id.set(" oyakovlev" )
96+ name.set(" Oleg Yakovlev" )
97+ email.set(" oyakovlev@icerockdev.com" )
98+ }
99+ }
100+
101+ scm {
102+ connection.set(" scm:git:ssh://github.com/icerockdev/storage-service.git" )
103+ developerConnection.set(" scm:git:ssh://github.com/icerockdev/storage-service.git" )
104+ url.set(" https://github.com/icerockdev/storage-service" )
105+ }
106+ }
107+ }
108+
109+ signing {
110+ val signingKeyId: String? = System .getenv(" SIGNING_KEY_ID" )
111+ val signingPassword: String? = System .getenv(" SIGNING_PASSWORD" )
112+ val signingKey: String? = System .getenv(" SIGNING_KEY" )?.let { base64Key ->
113+ String (Base64 .getDecoder().decode(base64Key))
114+ }
115+ useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
116+ sign(publishing.publications[" mavenJava" ])
67117 }
68118 }
69119}
0 commit comments