Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: revert to github packages #185

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 57 additions & 19 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,45 @@ 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 {
val base64EncodedAsciiArmoredSigningKey: String = System.getenv("BASE64_ARMORED_GPG_SIGNING_KEY_MAVEN") ?: ""
val signingKeyPassword: String = System.getenv("SIGNING_KEY_PASSWORD") ?: ""
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")
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 +205,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
Loading