From fe97ef00c0233eb4ba58911bc4c94afe230a1403 Mon Sep 17 00:00:00 2001 From: 0xh3rman <119309671+0xh3rman@users.noreply.github.com> Date: Tue, 12 May 2026 11:07:34 +0900 Subject: [PATCH] remove publishing android lib --- .github/workflows/publish-android.yml | 105 -------------------- .github/workflows/release-stone-android.yml | 48 --------- README.md | 45 +-------- gemstone/android/build.gradle.kts | 25 ----- gemstone/android/gemstone/build.gradle.kts | 47 --------- gemstone/justfile | 12 --- 6 files changed, 4 insertions(+), 278 deletions(-) delete mode 100644 .github/workflows/publish-android.yml delete mode 100644 .github/workflows/release-stone-android.yml diff --git a/.github/workflows/publish-android.yml b/.github/workflows/publish-android.yml deleted file mode 100644 index 14f3f2b42b..0000000000 --- a/.github/workflows/publish-android.yml +++ /dev/null @@ -1,105 +0,0 @@ -name: Publish - Gemstone Android - -on: - workflow_call: - inputs: - ref_name: - description: "github ref name (tag)" - required: true - type: string - publish_target: - description: "Publish target: gpr or sonatype" - required: true - type: string - release_sonatype: - description: "Release Sonatype staging repository" - required: false - default: false - type: boolean - secrets: - SONATYPE_USERNAME: - required: false - SONATYPE_PASSWORD: - required: false - MVN_SIGNING_KEY: - required: false - MVN_SIGNING_PASSPHRASE: - required: false - -env: - CARGO_TERM_COLOR: always - SCCACHE_GHA_ENABLED: "true" - RUSTC_WRAPPER: "sccache" - BUILD_MODE: "release" - -jobs: - publish: - runs-on: ubuntu-latest - env: - ANDROID_NDK_HOME: /usr/local/lib/android/sdk/ndk/28.1.13356709 - ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/28.1.13356709 - VER_NAME: ${{ inputs.ref_name }} - defaults: - run: - working-directory: gemstone - steps: - - uses: actions/checkout@v6 - with: - ref: ${{ inputs.ref_name }} - - - name: Set up JDK 17 - uses: actions/setup-java@v5 - with: - java-version: "17" - distribution: "zulu" - - - name: Setup Android SDK - uses: android-actions/setup-android@v4 - with: - packages: 'build-tools;36.0.0 platforms;android-36 ndk;28.1.13356709' - - - name: Setup Rust - uses: ./.github/actions/setup-rust-ci - - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v6 - - - name: Validate version - run: | - if [ -z "${VER_NAME}" ]; then - echo "VER_NAME is empty" - exit 1 - fi - - - name: Build Android Bindings - run: | - just install-android-targets - just bindgen-kotlin - - - name: Publish to Github Packages - if: ${{ inputs.publish_target == 'gpr' }} - run: just publish-android-gpr - env: - GITHUB_USER: ${{ github.actor }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Publish to Maven Central - if: ${{ inputs.publish_target == 'sonatype' }} - run: | - if [ -z "${MVN_SIGNING_KEY}" ]; then - echo "MVN_SIGNING_KEY is empty" - exit 1 - fi - export MVN_SIGNING_KEY="$(printf '%s' "$MVN_SIGNING_KEY" | base64 --decode)" - if [ "${{ inputs.release_sonatype }}" = "true" ]; then - just publish-android-maven-release - else - just publish-android-maven - fi - env: - GITHUB_USER: ${{ github.actor }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - MVN_SIGNING_KEY: ${{ secrets.MVN_SIGNING_KEY }} - MVN_SIGNING_PASSPHRASE: ${{ secrets.MVN_SIGNING_PASSPHRASE }} diff --git a/.github/workflows/release-stone-android.yml b/.github/workflows/release-stone-android.yml deleted file mode 100644 index e518697786..0000000000 --- a/.github/workflows/release-stone-android.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Release - Gemstone Android -run-name: "Release Gemstone Android ${{ github.event.inputs.ref_name || github.ref_name }}" - -on: - push: - tags: - - "*" - workflow_dispatch: - inputs: - ref_name: - description: "github ref name (tag)" - required: true - publish_gpr: - description: "Publish to Github Packages" - required: true - default: true - type: boolean - publish_sonatype: - description: "Publish to Maven Central" - required: false - default: true - type: boolean - release_sonatype: - description: "Release Sonatype staging repository" - required: false - default: true - type: boolean - -jobs: - publish_gpr: - if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.publish_gpr == 'true' }} - uses: ./.github/workflows/publish-android.yml - with: - ref_name: ${{ github.event.inputs.ref_name || github.ref_name }} - publish_target: gpr - - publish_sonatype: - if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.publish_sonatype == 'true' }} - uses: ./.github/workflows/publish-android.yml - with: - ref_name: ${{ github.event.inputs.ref_name || github.ref_name }} - publish_target: sonatype - release_sonatype: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.release_sonatype == 'true' }} - secrets: - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - MVN_SIGNING_KEY: ${{ secrets.MVN_SIGNING_KEY }} - MVN_SIGNING_PASSPHRASE: ${{ secrets.MVN_SIGNING_PASSPHRASE }} diff --git a/README.md b/README.md index 82f1887de1..228be4b1ae 100644 --- a/README.md +++ b/README.md @@ -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 = "" +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 = - password = - } - } - } -} -``` +Then consume it from `mavenLocal()` in your Android project. # Contributing diff --git a/gemstone/android/build.gradle.kts b/gemstone/android/build.gradle.kts index 61ba6b385f..72ee103b60 100644 --- a/gemstone/android/build.gradle.kts +++ b/gemstone/android/build.gradle.kts @@ -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) } - } - } } diff --git a/gemstone/android/gemstone/build.gradle.kts b/gemstone/android/gemstone/build.gradle.kts index 1709ce4621..9f8656aa18 100644 --- a/gemstone/android/gemstone/build.gradle.kts +++ b/gemstone/android/gemstone/build.gradle.kts @@ -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("../..") @@ -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("debug") { from(components["debug"]) @@ -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") - } - } - } } diff --git a/gemstone/justfile b/gemstone/justfile index 891bc02a19..8700640b6c 100644 --- a/gemstone/justfile +++ b/gemstone/justfile @@ -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