From 5f711e23f9b26d244b2037b3e82f13d8052e4f03 Mon Sep 17 00:00:00 2001 From: Cristian G Date: Thu, 18 Jul 2024 13:24:59 -0400 Subject: [PATCH] refactor: revert to github packages Signed-off-by: Cristian G --- build.gradle.kts | 73 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 52 insertions(+), 21 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 654e770de..47c4dca72 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,5 @@ +import java.util.Base64 + val publishedMavenId: String = "org.hyperledger.identus.apollo" plugins { @@ -39,24 +41,36 @@ 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 { 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") @@ -64,7 +78,7 @@ allprojects { } 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 { @@ -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") + } + } + } } } } @@ -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")