[#95] Fix publishing all variants

Previously just the multiplatform metadata was being published
This commit is contained in:
Carter Jernigan 2022-07-29 09:12:54 -04:00 committed by Carter Jernigan
parent a5439b991a
commit 6b86d28428
5 changed files with 12 additions and 14 deletions

View File

@ -65,7 +65,7 @@ jobs:
ORG_GRADLE_PROJECT_IS_SNAPSHOT: false
ORG_GRADLE_PROJECT_ZCASH_ASCII_GPG_KEY: ${{ secrets.MAVEN_SIGNING_KEY_ASCII }}
run: |
./gradlew publishKotlinMultiplatformPublicationToMavenLocalRepository --no-parallel
./gradlew publishAllPublicationsToMavenLocalRepository --no-parallel
- name: Deploy to Maven Central
timeout-minutes: 5
env:
@ -74,7 +74,7 @@ jobs:
ORG_GRADLE_PROJECT_ZCASH_ASCII_GPG_KEY: ${{ secrets.MAVEN_SIGNING_KEY_ASCII }}
ORG_GRADLE_PROJECT_IS_SNAPSHOT: false
run: |
./gradlew publishKotlinMultiplatformPublicationToMavenCentralRepository --no-parallel
./gradlew publishAllPublicationsToMavenCentralRepository --no-parallel
- name: Collect Artifacts
timeout-minutes: 1
if: ${{ always() }}

View File

@ -73,7 +73,7 @@ jobs:
env:
ORG_GRADLE_PROJECT_IS_SNAPSHOT: true
run: |
./gradlew publishKotlinMultiplatformPublicationToMavenLocalRepository --no-parallel
./gradlew publishAllPublicationsToMavenLocalRepository --no-parallel
- name: Deploy to Maven Central
timeout-minutes: 5
env:
@ -81,7 +81,7 @@ jobs:
ORG_GRADLE_PROJECT_ZCASH_MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_IS_SNAPSHOT: true
run: |
./gradlew publishKotlinMultiplatformPublicationToMavenCentralRepository --no-parallel
./gradlew publishAllPublicationsToMavenCentralRepository --no-parallel
- name: Collect Artifacts
timeout-minutes: 1
if: ${{ always() }}

View File

@ -138,9 +138,8 @@ val mnemonicCode = MnemonicCode(WordCount.COUNT_24, languageCode = Locale.GERMAN
val mnemonicCode = MnemonicCode(WordCount.COUNT_24, languageCode = Locale.ENGLISH.language)
```
## Test Results
![Screenshot from 2020-06-06 15-14-39](https://user-images.githubusercontent.com/1699841/83952728-afbfaa80-a808-11ea-988c-3fb764dc4970.png)
# Known issues
* When publishing the library, a Gradle warning will be printed. This is a [known issue](https://youtrack.jetbrains.com/issue/KT-46466) in Kotlin Multiplatform and can be safely ignored.
## Credits
* [zcash/ebfull](https://github.com/ebfull) - Zcash core dev and BIP-0039 co-author who inspired creation of this library
@ -148,6 +147,3 @@ val mnemonicCode = MnemonicCode(WordCount.COUNT_24, languageCode = Locale.ENGLIS
* [Trezor](https://github.com/trezor/python-mnemonic/blob/master/vectors.json) - for their OG [test data set](https://github.com/trezor/python-mnemonic/blob/master/vectors.json) that has excellent edge cases
* [Cole Barnes](http://cryptofreek.org/2012/11/29/pbkdf2-pure-java-implementation/) - whose PBKDF2SHA512 Java implementation is floating around _everywhere_ online
* [Ken Sedgwick](https://github.com/ksedgwic) - who adapted Cole Barnes' work to use SHA-512
## License
MIT

View File

@ -71,7 +71,9 @@ publishing {
withType<MavenPublication> {
artifact(tasks.getByName("javadocJar"))
artifactId = myArtifactId
// Artifact id is tricky. Gradle uses the project name by default, but Kotlin multiplatform needs to add
// platform specific suffixes. Doing a partial replacement is the way to rename the artifact.
artifactId = artifactId.replace(project.name, myArtifactId)
groupId = "cash.z.ecc.android"
version = if (isSnapshot) {
"$myVersion-SNAPSHOT"

View File

@ -70,12 +70,12 @@ See [ci.md](ci.md), which describes the continuous integration workflow for depl
2. Build locally
* This will install the files in your local maven repo at `~/.m2/repository/cash/z/ecc/android/`
```zsh
./gradlew publishKotlinMultiplatformPublicationToMavenLocalRepository --no-parallel
./gradlew publishAllPublicationsToMavenLocalRepository
```
3. Publish via the following command:
1. Snapshot: `./gradlew publishKotlinMultiplatformPublicationToMavenCentralRepository -PIS_SNAPSHOT=true`
1. Snapshot: `./gradlew publishAllPublicationsToMavenCentralRepository -PIS_SNAPSHOT=true`
2. Release
1. `./gradlew publishKotlinMultiplatformPublicationToMavenCentralRepository -PIS_SNAPSHOT=false`
1. `./gradlew publishAllPublicationsToMavenCentralRepository -PIS_SNAPSHOT=false`
2. Log into the Sonatype portal to complete the process of closing and releasing the repository.
Note: