Skip to content
Merged
Show file tree
Hide file tree
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
105 changes: 0 additions & 105 deletions .github/workflows/publish-android.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/release-stone-android.yml

This file was deleted.

45 changes: 4 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,50 +65,13 @@ Unzip and add it to your project as a local Swift Package.

### Android

Add the following to your `libs.versions.toml` file:
```toml
[versions]
gemstone = "<latest_version>"
Build the Gemstone Android AAR from source and publish it to the local Maven cache:

[libraries]
gemstone = { module = "com.gemwallet.gemstone:gemstone", version.ref = "gemstone" }
```bash
just gemstone build-android
```

Add the following to your `build.gradle.kts` file:

```gradle
dependencies {
api(libs.gemstone)
}
```

#### Maven Central (Recommended)

```gradle
allprojects {
repositories {
mavenCentral()
}
}
```

#### GitHub Packages (Alternative)

Alternatively, you can use GitHub Packages (requires GitHub token):

```gradle
allprojects {
repositories {
maven {
url = uri("https://maven.pkg.github.com/gemwalletcom/core")
credentials {
username = <github_username>
password = <github_token>
}
}
}
}
```
Then consume it from `mavenLocal()` in your Android project.
Comment on lines +68 to +74
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The updated instructions for Android are missing the Maven coordinates (group, artifact, and version) required to consume the library from mavenLocal().

Additionally, the just gemstone build-android command currently only publishes the debug variant (as defined in gemstone/justfile), which uses the artifact ID gemstone-debug and version 1.0.0-debug (unless VER_NAME is set). Users should be informed of these coordinates and advised that Rust code in debug mode is significantly slower than release mode. Consider providing instructions or a command for the release variant as well (e.g., implementation("com.gemwallet.gemstone:gemstone-debug:1.0.0-debug")).


# Contributing

Expand Down
25 changes: 0 additions & 25 deletions gemstone/android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
plugins {
id("com.android.application") version "9.1.0" apply false
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}

// Must match the verified namespace on Maven Central
group = "com.gemwallet"

val localProps = rootDir.resolve("local.properties").takeIf { it.isFile }?.inputStream()?.use { stream ->
java.util.Properties().apply { load(stream) }
}

val sonatypeUsername = localProps?.getProperty("sonatype.username") ?: System.getenv("SONATYPE_USERNAME")
val sonatypePassword = localProps?.getProperty("sonatype.password") ?: System.getenv("SONATYPE_PASSWORD")
val sonatypeStagingProfileId = localProps?.getProperty("sonatype.staging_profile_id") ?: System.getenv("SONATYPE_STAGING_PROFILE_ID")

nexusPublishing {
packageGroup.set("com.gemwallet")
repositories {
sonatype {
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
username.set(sonatypeUsername)
password.set(sonatypePassword)
sonatypeStagingProfileId?.let { stagingProfileId.set(it) }
}
}
}
47 changes: 0 additions & 47 deletions gemstone/android/gemstone/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

fun isSigningEnabled(): Boolean {
val signingKey = System.getenv("MVN_SIGNING_KEY")
val signingPassphrase = System.getenv("MVN_SIGNING_PASSPHRASE")
return !signingKey.isNullOrBlank() && !signingPassphrase.isNullOrBlank()
}

plugins {
id("com.android.library")
id("maven-publish")
id("signing")
}

val gemstoneRoot = project.projectDir.resolve("../..")
Expand Down Expand Up @@ -122,26 +115,6 @@ afterEvaluate {
groupId = "com.gemwallet.gemstone"
artifactId = "gemstone"
version = System.getenv("VER_NAME") ?: "1.0.0"
pom {
name.set("Gemstone")
description.set("Gem Wallet Core Android library")
url.set("https://github.com/gemwalletcom/core")
licenses {
license {
name.set("MIT")
url.set("https://opensource.org/licenses/MIT")
}
}
scm {
url.set("https://github.com/gemwalletcom/core")
}
developers {
developer {
id.set("gemwallet")
name.set("Gem Wallet")
}
}
}
}
create<MavenPublication>("debug") {
from(components["debug"])
Expand All @@ -151,24 +124,4 @@ afterEvaluate {
}
}
}

if (isSigningEnabled()) {
signing {
useInMemoryPgpKeys(System.getenv("MVN_SIGNING_KEY"), System.getenv("MVN_SIGNING_PASSPHRASE"))
sign(publishing.publications["release"])
}
}
}

publishing {
repositories {
maven {
name = "GPR"
url = uri("https://maven.pkg.github.com/gemwalletcom/core")
credentials {
username = project.findProperty("github.username") as String? ?: System.getenv("GITHUB_USER")
password = project.findProperty("github.token") as String? ?: System.getenv("GITHUB_TOKEN")
}
}
}
}
12 changes: 0 additions & 12 deletions gemstone/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,3 @@ build-android: bindgen-kotlin
#!/usr/bin/env bash
rm -rf ~/.m2/repository/com/gemwallet/gemstone/gemstone
cd android && touch local.properties && ./gradlew publishDebugPublicationToMavenLocal

publish-android-gpr:
#!/usr/bin/env bash
cd android && touch local.properties && ./gradlew publishReleasePublicationToGPRRepository

publish-android-maven:
#!/usr/bin/env bash
cd android && touch local.properties && ./gradlew publishReleasePublicationToSonatypeRepository closeSonatypeStagingRepository

publish-android-maven-release:
#!/usr/bin/env bash
cd android && touch local.properties && ./gradlew publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository
Loading