-
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.
Signed-off-by: Ahmed Moussa <[email protected]>
- Loading branch information
Showing
4 changed files
with
105 additions
and
130 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ plugins { | |
id("org.jlleitschuh.gradle.ktlint") version "11.6.1" | ||
id("maven-publish") | ||
id("org.jetbrains.kotlinx.kover") version "0.7.4" | ||
id("io.github.gradle-nexus.publish-plugin") version "2.0.0-rc-1" | ||
id("signing") | ||
} | ||
|
||
|
@@ -44,102 +43,99 @@ allprojects { | |
} | ||
|
||
apply(plugin = "org.gradle.maven-publish") | ||
apply(plugin = "org.gradle.signing") | ||
|
||
// Disable Publish Gradle task for the following modules | ||
val disabledProjects = listOf("iOSLibs", "secp256k1-kmp", "native") | ||
if (disabledProjects.contains(project.name)) { | ||
afterEvaluate { | ||
tasks.named("publishAllPublicationsToSonatypeRepository") { | ||
enabled = false | ||
} | ||
} | ||
} | ||
// Allowed projects to publish to maven | ||
val allowedProjectsToPublish = listOf("apollo") | ||
|
||
publishing { | ||
publications { | ||
if (allowedProjectsToPublish.contains(project.name)) { | ||
create<MavenPublication>(project.name) { | ||
groupId = publishedMavenId | ||
artifactId = project.name | ||
version = project.version.toString() | ||
pom { | ||
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/") | ||
if (allowedProjectsToPublish.contains(project.name)) { | ||
publications.withType<MavenPublication> { | ||
groupId = publishedMavenId | ||
artifactId = project.name | ||
version = project.version.toString() | ||
pom { | ||
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/") | ||
} | ||
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") | ||
} | ||
licenses { | ||
license { | ||
name.set("The Apache License, Version 2.0") | ||
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt") | ||
} | ||
developer { | ||
id.set("amagyar-iohk") | ||
name.set("Allain Magyar") | ||
email.set("[email protected]") | ||
organization.set("IOG") | ||
roles.add("qc") | ||
} | ||
developers { | ||
developer { | ||
id.set("hamada147") | ||
name.set("Ahmed Moussa") | ||
email.set("[email protected]") | ||
organization.set("IOG") | ||
roles.add("developer") | ||
} | ||
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("antonbaliasnikov") | ||
name.set("Anton Baliasnikov") | ||
email.set("[email protected]") | ||
organization.set("IOG") | ||
roles.add("qc") | ||
} | ||
scm { | ||
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") | ||
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://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") | ||
} | ||
} | ||
} | ||
} | ||
// repositories { | ||
// // GitHub Maven Repo | ||
repositories { | ||
// Maven Central | ||
maven { | ||
name = "Sonatype" | ||
url = uri("https://oss.sonatype.org/service/local/") | ||
credentials { | ||
username = System.getenv("SONATYPE_USERNAME") | ||
password = System.getenv("SONATYPE_PASSWORD") | ||
} | ||
} | ||
// GitHub Maven Repo | ||
// maven { | ||
// this.name = "GitHubPackages" | ||
// this.url = uri("https://maven.pkg.github.com/input-output-hk/atala-prism-apollo") | ||
|
@@ -148,7 +144,15 @@ allprojects { | |
// this.password = System.getenv("ATALA_GITHUB_TOKEN") | ||
// } | ||
// } | ||
// } | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
val base64EncodedAsciiArmoredSigningKey: String = System.getenv("BASE64_ARMORED_GPG_SIGNING_KEY_MAVEN") ?: "" | ||
val signingKeyPassword: String = System.getenv("SIGNING_KEY_PASSWORD") ?: "" | ||
useInMemoryPgpKeys(String(Base64.getDecoder().decode(base64EncodedAsciiArmoredSigningKey.toByteArray())), signingKeyPassword) | ||
sign(publishing.publications) | ||
} | ||
} | ||
|
||
|
@@ -188,21 +192,3 @@ subprojects { | |
rootProject.plugins.withType(NodeJsRootPlugin::class.java) { | ||
rootProject.extensions.getByType(NodeJsRootExtension::class.java).nodeVersion = "16.17.0" | ||
} | ||
|
||
nexusPublishing { | ||
repositories { | ||
sonatype { | ||
nexusUrl.set(uri("https://oss.sonatype.org/service/local/")) | ||
snapshotRepositoryUrl.set(uri("https://oss.sonatype.org/content/repositories/snapshots/")) | ||
username.set(System.getenv("SONATYPE_USERNAME")) | ||
password.set(System.getenv("SONATYPE_PASSWORD")) | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
val base64EncodedAsciiArmoredSigningKey: String = System.getenv("BASE64_ARMORED_GPG_SIGNING_KEY_MAVEN") ?: "" | ||
val signingKeyPassword: String = System.getenv("SIGNING_KEY_PASSWORD") ?: "" | ||
useInMemoryPgpKeys(String(Base64.getDecoder().decode(base64EncodedAsciiArmoredSigningKey.toByteArray())), signingKeyPassword) | ||
sign(publishing.publications) | ||
} |
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