Skip to content

Commit

Permalink
refactor: revert to github packages
Browse files Browse the repository at this point in the history
Signed-off-by: Cristian G <cristian.castro@iohk.io>
  • Loading branch information
cristianIOHK committed Jul 18, 2024
1 parent 39a3d0b commit 5f711e2
Showing 1 changed file with 52 additions and 21 deletions.
73 changes: 52 additions & 21 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import java.util.Base64

val publishedMavenId: String = "org.hyperledger.identus.apollo"

plugins {
Expand Down Expand Up @@ -39,32 +41,44 @@ allprojects {
val allowedProjectsToPublish = listOf("apollo")
if (allowedProjectsToPublish.contains(project.name) && project.name.contains("androidDebug")) {
publishing {
repositories {
maven {
name = "OSSRH"
url = uri("https://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")
}
}
}
// repositories {
// maven {
// name = "OSSRH"
// url = uri("https://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")
// }
// }
// }
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")
// 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")
// }
name.set("Atala PRISM Apollo")
description.set("Collection of the cryptographic methods used all around Atala PRISM")
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")
url.set("https://github.com/input-output-hk/atala-prism-apollo")
}
licenses {
license {
Expand Down Expand Up @@ -125,21 +139,38 @@ allprojects {
}
}
scm {
connection.set("scm:git:git://git@github.com/hyperledger/identus-apollo.git")
developerConnection.set("scm:git:ssh://git@github.com/hyperledger/identus-apollo.git")
url.set("https://github.com/hyperledger/identus-apollo")
// connection.set("scm:git:git://git@github.com/hyperledger/identus-apollo.git")
// developerConnection.set("scm:git:ssh://git@github.com/hyperledger/identus-apollo.git")
// url.set("https://github.com/hyperledger/identus-apollo")
connection.set("scm:git:git://input-output-hk/atala-prism-apollo.git")
developerConnection.set("scm:git:ssh://input-output-hk/atala-prism-apollo.git")
url.set("https://github.com/input-output-hk/atala-prism-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")
)
useInMemoryPgpKeys(String(Base64.getDecoder().decode(base64EncodedAsciiArmoredSigningKey.toByteArray())), signingKeyPassword)
// 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)
}
}
}
repositories {
// GitHub Maven Repo
maven {
this.name = "GitHubPackages"
this.url = uri("https://maven.pkg.github.com/input-output-hk/atala-prism-apollo")
credentials {
this.username = System.getenv("ATALA_GITHUB_ACTOR")
this.password = System.getenv("ATALA_GITHUB_TOKEN")
}
}
}
}
}
}
Expand Down Expand Up @@ -167,7 +198,7 @@ subprojects {
}
exclude {
it.file.toString() == "BNjs.kt" || it.file.toString() == "Curve.kt" || it.file.toString() == "PresetCurve.kt" ||
it.file.toString() == "Ellipticjs.kt" || it.file.toString() == "secp256k1js.kt"
it.file.toString() == "Ellipticjs.kt" || it.file.toString() == "secp256k1js.kt"
}
exclude {
it.file.toString().contains("external")
Expand Down

0 comments on commit 5f711e2

Please sign in to comment.