Skip to content

Commit

Permalink
Merge branch 'main' into tests/update
Browse files Browse the repository at this point in the history
  • Loading branch information
amagyar-iohk authored Feb 28, 2024
2 parents 7d6d43f + 757e68e commit 2b8fb0f
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 30 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Atala Prism Wallet SDK - Kotlin Multiplatform (Android/JVM)

[![Kotlin](https://img.shields.io/badge/kotlin-1.9.22-blue.svg?logo=kotlin)](http://kotlinlang.org)
![android](https://camo.githubusercontent.com/b1d9ad56ab51c4ad1417e9a5ad2a8fe63bcc4755e584ec7defef83755c23f923/687474703a2f2f696d672e736869656c64732e696f2f62616467652f706c6174666f726d2d616e64726f69642d3645444238442e7376673f7374796c653d666c6174)
![jvm](https://camo.githubusercontent.com/700f5dcd442fd835875568c038ae5cd53518c80ae5a0cf12c7c5cf4743b5225b/687474703a2f2f696d672e736869656c64732e696f2f62616467652f706c6174666f726d2d6a766d2d4442343133442e7376673f7374796c653d666c6174)
![badge-platform-android]
![badge-platform-jvm]

![Atala Prism Logo](Logo.png)

Expand Down Expand Up @@ -42,11 +41,17 @@ Atala PRISM Kotlin multiplatform SDK provides the following building blocks to c
To get started with the Atala PRISM kotlin multiplatform SDK, you can set up the SDK and start a new project or integrate it into an existing project. Before you start, make sure you have the following installed on your development machine:

- Android: API level 21 and above.
- Kotlin 1.9.10 or later.
- Kotlin 1.9.22 or later.
- JVM: 17 or later.

### Integrating the SDK in an existing project

To integrate the SDK into an existing project, you have to import the SDK into your project:

`implementation("io.iohk.atala.prism:walletsdk:$sdk_version")`
```kotlin
implementation("io.iohk.atala.prism.walletsdk:atala-prism-sdk:<latest version>")
```

<!-- TAG_PLATFORMS -->
[badge-platform-android]: http://img.shields.io/badge/-android-6EDB8D.svg?style=flat
[badge-platform-jvm]: http://img.shields.io/badge/-jvm-DB413D.svg?style=flat
4 changes: 3 additions & 1 deletion atala-prism-sdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ kotlin {
useJUnitPlatform()
}
}
applyDefaultHierarchyTemplate()

sourceSets {
val commonMain by getting {
Expand Down Expand Up @@ -141,6 +142,7 @@ kotlin {
android {
compileSdk = 33
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
namespace = "io.iohk.atala.prism.walletsdk"
defaultConfig {
minSdk = 21
targetSdk = 33
Expand Down Expand Up @@ -189,7 +191,7 @@ tasks.withType<DokkaTask>().configureEach {
dokkaSourceSets {
configureEach {
jdkVersion.set(11)
languageVersion.set("1.7.20")
languageVersion.set("1.9.22")
apiVersion.set("2.0")
includes.from(
"docs/AtalaPrismSDK.md",
Expand Down
157 changes: 133 additions & 24 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
import java.util.Base64

val publishedMavenId = "io.iohk.atala.prism.walletsdk"

plugins {
id("org.jetbrains.kotlin.android") version "1.9.22" apply false
kotlin("jvm") version "1.9.22"
kotlin("plugin.serialization") version "1.8.20"
id("maven-publish")
id("org.jlleitschuh.gradle.ktlint") version "11.5.1"
id("org.jetbrains.dokka") version "1.9.0"
id("org.jetbrains.kotlin.kapt") version "1.9.10"
id("maven-publish")
id("signing")
id("io.github.gradle-nexus.publish-plugin") version "2.0.0-rc-1"
}

buildscript {
Expand All @@ -31,7 +37,7 @@ java {
}

allprojects {
this.group = "io.iohk.atala.prism.walletsdk"
this.group = publishedMavenId

repositories {
mavenLocal()
Expand All @@ -56,13 +62,6 @@ allprojects {
this.password = System.getenv("ATALA_GITHUB_TOKEN")
}
}
maven {
this.url = uri("https://github.com/input-output-hk/anoncreds-rs/")
credentials {
this.username = System.getenv("ATALA_GITHUB_ACTOR")
this.password = System.getenv("ATALA_GITHUB_TOKEN")
}
}
}

configurations.all {
Expand All @@ -81,21 +80,6 @@ allprojects {
}
}
}

apply(plugin = "org.gradle.maven-publish")

publishing {
repositories {
maven {
this.name = "GitHubPackages"
this.url = uri("https://maven.pkg.github.com/input-output-hk/atala-prism-wallet-sdk-kmm/")
credentials {
this.username = System.getenv("ATALA_GITHUB_ACTOR")
this.password = System.getenv("ATALA_GITHUB_TOKEN")
}
}
}
}
}

subprojects {
Expand All @@ -119,8 +103,133 @@ subprojects {
}
}
}

if (this.name == "atala-prism-sdk") {
apply(plugin = "org.gradle.maven-publish")
apply(plugin = "org.gradle.signing")

publishing {
publications {
withType<MavenPublication> {
groupId = publishedMavenId
artifactId = project.name
version = project.version.toString()
pom {
name.set("Atala PRISM Wallet SDK")
description.set("Atala Prism Wallet SDK - Kotlin Multiplatform (Android/JVM)")
url.set("https://docs.atalaprism.io/")
organization {
name.set("IOG")
url.set("https://iog.io/")
}
issueManagement {
system.set("Github")
url.set("https://github.com/input-output-hk/atala-prism-wallet-sdk-kmm")
}
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("ahmed.moussa@iohk.io")
organization.set("IOG")
roles.add("developer")
url.set("https://github.com/hamada147")
}
developer {
id.set("elribonazo")
name.set("Javier Ribó")
email.set("javier.ribo@iohk.io")
organization.set("IOG")
roles.add("developer")
}
developer {
id.set("cristianIOHK")
name.set("Cristian Gonzalez")
email.set("cristian.castro@iohk.io")
organization.set("IOG")
roles.add("developer")
url.set("https://github.com/cristianIOHK")
}
developer {
id.set("amagyar-iohk")
name.set("Allain Magyar")
email.set("allain.magyar@iohk.io")
organization.set("IOG")
roles.add("qc")
}
developer {
id.set("antonbaliasnikov")
name.set("Anton Baliasnikov")
email.set("anton.baliasnikov@iohk.io")
organization.set("IOG")
roles.add("qc")
}
developer {
id.set("goncalo-frade-iohk")
name.set("Gonçalo Frade")
email.set("goncalo.frade@iohk.io")
organization.set("IOG")
roles.add("developer")
}
}
scm {
connection.set("scm:git:git://input-output-hk/atala-prism-wallet-sdk-kmm.git")
developerConnection.set("scm:git:ssh://input-output-hk/atala-prism-wallet-sdk-kmm.git")
url.set("https://github.com/input-output-hk/atala-prism-wallet-sdk-kmm")
}
}
if (System.getenv("BASE64_ARMORED_GPG_SIGNING_KEY_MAVEN") != null) {
if (System.getenv("BASE64_ARMORED_GPG_SIGNING_KEY_MAVEN").isNotBlank()) {
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(this@withType)
}
}
}
}
}
repositories {
// maven {
// this.name = "GitHubPackages"
// this.url = uri("https://maven.pkg.github.com/input-output-hk/atala-prism-wallet-sdk-kmm")
// credentials {
// this.username = System.getenv("ATALA_GITHUB_ACTOR")
// this.password = System.getenv("ATALA_GITHUB_TOKEN")
// }
// }
}
}
}
}

tasks.dokkaGfmMultiModule.configure {
outputDirectory.set(buildDir.resolve("dokkaCustomMultiModuleOutput"))
}

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"))
}
}
}

0 comments on commit 2b8fb0f

Please sign in to comment.