-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: publish to OSSHR repository (#188)
Signed-off-by: Yurii Shynbuiev <[email protected]> Signed-off-by: Hyperledger Bot <[email protected]> Co-authored-by: Hyperledger Bot <[email protected]>
- Loading branch information
1 parent
635db86
commit 8f98b5a
Showing
5 changed files
with
101 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ plugins { | |
id("org.jlleitschuh.gradle.ktlint") version "11.6.1" | ||
id("maven-publish") | ||
id("org.jetbrains.kotlinx.kover") version "0.7.5" | ||
id("io.github.gradle-nexus.publish-plugin") version "2.0.0-rc-1" | ||
id("io.github.gradle-nexus.publish-plugin") version "2.0.0" | ||
id("signing") | ||
id("com.android.library") version "8.1.4" apply false | ||
} | ||
|
@@ -35,111 +35,102 @@ allprojects { | |
apply(plugin = "org.gradle.maven-publish") | ||
apply(plugin = "org.gradle.signing") | ||
|
||
// Allowed projects to publish to maven | ||
val allowedProjectsToPublish = listOf("apollo") | ||
if (allowedProjectsToPublish.contains(project.name) && project.name.contains("androidDebug")) { | ||
publishing { | ||
repositories { | ||
maven { | ||
name = "OSSRH" | ||
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") | ||
credentials { | ||
username = project.findProperty("sonatypeUsername") as String? ?: System.getenv("OSSRH_USERNAME") | ||
password = project.findProperty("sonatypePassword") as String? ?: System.getenv("OSSRH_TOKEN") | ||
publishing { | ||
publications.withType<MavenPublication> { | ||
groupId = publishedMavenId | ||
artifactId = project.name | ||
version = project.version.toString() | ||
pom { | ||
name.set("Identus Apollo") | ||
description.set("Collection of the cryptographic methods used all around Identus platform") | ||
url.set("https://docs.atalaprism.io/") | ||
organization { | ||
name.set("Hyperledger") | ||
url.set("https://www.hyperledger.org/") | ||
} | ||
issueManagement { | ||
system.set("Github") | ||
url.set("https://github.com/hyperledger/identus-apollo") | ||
} | ||
licenses { | ||
license { | ||
name.set("The Apache License, Version 2.0") | ||
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt") | ||
} | ||
} | ||
} | ||
publications { | ||
withType<MavenPublication> { | ||
groupId = publishedMavenId | ||
artifactId = project.name | ||
version = project.version.toString() | ||
pom { | ||
name.set("Identus Apollo") | ||
description.set("Collection of the cryptographic methods used all around Identus platform") | ||
url.set("https://docs.atalaprism.io/") | ||
organization { | ||
name.set("IOG") | ||
url.set("https://iog.io/") | ||
} | ||
issueManagement { | ||
system.set("Github") | ||
url.set("https://github.com/hyperledger/identus-apollo") | ||
} | ||
licenses { | ||
license { | ||
name.set("The Apache License, Version 2.0") | ||
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt") | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set("hamada147") | ||
name.set("Ahmed Moussa") | ||
email.set("[email protected]") | ||
organization.set("IOG") | ||
roles.add("developer") | ||
url.set("https://github.com/hamada147") | ||
} | ||
developer { | ||
id.set("amagyar-iohk") | ||
name.set("Allain Magyar") | ||
email.set("[email protected]") | ||
organization.set("IOG") | ||
roles.add("qc") | ||
} | ||
developer { | ||
id.set("antonbaliasnikov") | ||
name.set("Anton Baliasnikov") | ||
email.set("[email protected]") | ||
organization.set("IOG") | ||
roles.add("qc") | ||
} | ||
developer { | ||
id.set("elribonazo") | ||
name.set("Javier Ribó") | ||
email.set("[email protected]") | ||
organization.set("IOG") | ||
roles.add("developer") | ||
} | ||
developer { | ||
id.set("goncalo-frade-iohk") | ||
name.set("Gonçalo Frade") | ||
email.set("[email protected]") | ||
organization.set("IOG") | ||
roles.add("developer") | ||
} | ||
developer { | ||
id.set("curtis-h") | ||
name.set("Curtis Harding") | ||
email.set("[email protected]") | ||
organization.set("IOG") | ||
roles.add("developer") | ||
} | ||
developer { | ||
id.set("cristianIOHK") | ||
name.set("Cristian Gonzalez") | ||
email.set("[email protected]") | ||
organization.set("IOG") | ||
roles.add("developer") | ||
} | ||
} | ||
scm { | ||
connection.set("scm:git:git://[email protected]/hyperledger/identus-apollo.git") | ||
developerConnection.set("scm:git:ssh://[email protected]/hyperledger/identus-apollo.git") | ||
url.set("https://github.com/hyperledger/identus-apollo") | ||
} | ||
developers { | ||
developer { | ||
id.set("hamada147") | ||
name.set("Ahmed Moussa") | ||
email.set("[email protected]") | ||
organization.set("IOG") | ||
roles.add("developer") | ||
url.set("https://github.com/hamada147") | ||
} | ||
|
||
signing { | ||
useInMemoryPgpKeys( | ||
project.findProperty("signing.signingSecretKey") as String? ?: System.getenv("OSSRH_GPG_SECRET_KEY"), | ||
project.findProperty("signing.signingSecretKeyPassword") as String? ?: System.getenv("OSSRH_GPG_SECRET_KEY_PASSWORD") | ||
) | ||
sign(this@withType) | ||
developer { | ||
id.set("amagyar-iohk") | ||
name.set("Allain Magyar") | ||
email.set("[email protected]") | ||
organization.set("IOG") | ||
roles.add("qc") | ||
} | ||
developer { | ||
id.set("antonbaliasnikov") | ||
name.set("Anton Baliasnikov") | ||
email.set("[email protected]") | ||
organization.set("IOG") | ||
roles.add("qc") | ||
} | ||
developer { | ||
id.set("elribonazo") | ||
name.set("Javier Ribó") | ||
email.set("[email protected]") | ||
organization.set("IOG") | ||
roles.add("developer") | ||
} | ||
developer { | ||
id.set("goncalo-frade-iohk") | ||
name.set("Gonçalo Frade") | ||
email.set("[email protected]") | ||
organization.set("IOG") | ||
roles.add("developer") | ||
} | ||
developer { | ||
id.set("curtis-h") | ||
name.set("Curtis Harding") | ||
email.set("[email protected]") | ||
organization.set("IOG") | ||
roles.add("developer") | ||
} | ||
developer { | ||
id.set("cristianIOHK") | ||
name.set("Cristian Gonzalez") | ||
email.set("[email protected]") | ||
organization.set("IOG") | ||
roles.add("developer") | ||
} | ||
developer { | ||
id.set("yshyn-iohk") | ||
name.set("Yurii Shynbuiev") | ||
email.set("[email protected]") | ||
organization.set("IOG") | ||
roles.add("developer") | ||
} | ||
} | ||
scm { | ||
connection.set("scm:git:git://[email protected]/hyperledger/identus-apollo.git") | ||
developerConnection.set("scm:git:ssh://[email protected]/hyperledger/identus-apollo.git") | ||
url.set("https://github.com/hyperledger/identus-apollo") | ||
} | ||
} | ||
|
||
signing { | ||
useInMemoryPgpKeys( | ||
project.findProperty("signing.signingSecretKey") as String? ?: System.getenv("OSSRH_GPG_SECRET_KEY"), | ||
project.findProperty("signing.signingSecretKeyPassword") as String? ?: System.getenv("OSSRH_GPG_SECRET_KEY_PASSWORD") | ||
) | ||
sign(this@withType) | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters