Skip to content

Commit

Permalink
feat: publish update
Browse files Browse the repository at this point in the history
Signed-off-by: Yurii Shynbuiev <[email protected]>
  • Loading branch information
yshyn-iohk committed Aug 6, 2024
1 parent 56824ec commit 2e1ee7d
Showing 1 changed file with 105 additions and 94 deletions.
199 changes: 105 additions & 94 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,108 +38,119 @@ allprojects {
// Allowed projects to publish to maven
val allowedProjectsToPublish = listOf("apollo")
if (allowedProjectsToPublish.contains(project.name) && project.name.contains("androidDebug")) {
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username.set(System.getenv("OSSRH_USERNAME"))
password.set(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("IOG")
url.set("https://iog.io/")
println("!!!!!!!!!!!!!!! Publishing ${project.name} to maven")
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")
}
}
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")
}
issueManagement {
system.set("Github")
url.set("https://github.com/hyperledger/identus-apollo")
developer {
id.set("elribonazo")
name.set("Javier Ribó")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
}
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
}
developer {
id.set("goncalo-frade-iohk")
name.set("Gonçalo Frade")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
}
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")
}
developer {
id.set("curtis-h")
name.set("Curtis Harding")
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")
developer {
id.set("cristianIOHK")
name.set("Cristian Gonzalez")
email.set("[email protected]")
organization.set("IOG")
roles.add("developer")
}
}

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)
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)
}
}
publications {
create<MavenPublication>("jvm") {
from(components["java"])
groupId = publishedMavenId
artifactId = "apollo-jvm"
version = project.version.toString()
}

create<MavenPublication>("androidDebug") {
from(components["androidDebug"])
groupId = publishedMavenId
artifactId = "apollo-android-debug"
version = project.version.toString()
}

create<MavenPublication>("androidRelease") {
from(components["androidRelease"])
groupId = publishedMavenId
artifactId = "apollo-android"
version = project.version.toString()
}
}
}
Expand Down

0 comments on commit 2e1ee7d

Please sign in to comment.