mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-11-10 17:46:53 +01:00
Adds a maven publishing to ship quartz
This commit is contained in:
8
.github/workflows/create-release.yml
vendored
8
.github/workflows/create-release.yml
vendored
@@ -228,3 +228,11 @@ jobs:
|
|||||||
asset_path: amethyst/build/outputs/bundle/fdroidRelease/amethyst-fdroid-release.aab
|
asset_path: amethyst/build/outputs/bundle/fdroidRelease/amethyst-fdroid-release.aab
|
||||||
asset_name: amethyst-fdroid-${{ github.ref_name }}.aab
|
asset_name: amethyst-fdroid-${{ github.ref_name }}.aab
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
|
|
||||||
|
- name: Publish Quartz Lib
|
||||||
|
run: ./gradlew publishAllPublicationsToMavenCentral --no-configuration-cache
|
||||||
|
env:
|
||||||
|
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
|
||||||
|
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
|
||||||
|
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
|
||||||
|
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
|
||||||
|
|||||||
21
README.md
21
README.md
@@ -237,26 +237,25 @@ openssl base64 < <my-release-key.keystore> | tr -d '\n' | tee some_signing_key.j
|
|||||||
|
|
||||||
## Using the Quartz library
|
## Using the Quartz library
|
||||||
|
|
||||||
Setup [JitPack.io](https://jitpack.io/#vitorpamplona/amethyst/v0.84.3) to your build file
|
### Installing
|
||||||
|
|
||||||
Add `maven { url 'https://jitpack.io' }` to settings.gradle at the end of repositories:
|
Add the following line to your `commonMain` dependencies:
|
||||||
|
|
||||||
```gradle
|
```gradle
|
||||||
dependencyResolutionManagement {
|
implementation('com.github.vitorpamplona.amethyst:quartz:<Amethyst Version>')
|
||||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
maven { url 'https://jitpack.io' }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Add the dependency by using one of the versions [here](https://jitpack.io/#vitorpamplona/amethyst/)
|
Variations to each platform are also available:
|
||||||
|
|
||||||
```gradle
|
```gradle
|
||||||
implementation('com.github.vitorpamplona.amethyst:quartz:<tag, commit, -SNAPSHOT>')
|
implementation('com.github.vitorpamplona.amethyst:quartz-android:<Amethyst Version>')
|
||||||
|
implementation('com.github.vitorpamplona.amethyst:quartz-jvm:<Amethyst Version>')
|
||||||
|
implementation('com.github.vitorpamplona.amethyst:quartz-iosarm64:<Amethyst Version>')
|
||||||
|
implementation('com.github.vitorpamplona.amethyst:quartz-iossimulatorarm64:<Amethyst Version>')
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### How to use
|
||||||
|
|
||||||
Manage logged in users with the `KeyPair` class
|
Manage logged in users with the `KeyPair` class
|
||||||
|
|
||||||
```kt
|
```kt
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ androidxCollection = "1.5.0"
|
|||||||
kotlinStdlib = "2.2.20"
|
kotlinStdlib = "2.2.20"
|
||||||
kotlinTest = "2.2.10"
|
kotlinTest = "2.2.10"
|
||||||
core = "1.7.0"
|
core = "1.7.0"
|
||||||
|
mavenPublish = "0.34.0"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
abedElazizShe-image-compressor = { group = "com.github.AbedElazizShe", name = "LightCompressor", version.ref = "lightcompressor" }
|
abedElazizShe-image-compressor = { group = "com.github.AbedElazizShe", name = "LightCompressor", version.ref = "lightcompressor" }
|
||||||
@@ -164,4 +165,5 @@ jetbrainsKotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
|||||||
jetbrainsComposeCompiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
jetbrainsComposeCompiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
||||||
serialization = { id = 'org.jetbrains.kotlin.plugin.serialization', version.ref = 'kotlinxSerializationPlugin' }
|
serialization = { id = 'org.jetbrains.kotlin.plugin.serialization', version.ref = 'kotlinxSerializationPlugin' }
|
||||||
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
|
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
|
||||||
androidKotlinMultiplatformLibrary = { id = "com.android.kotlin.multiplatform.library", version.ref = "agp" }
|
androidKotlinMultiplatformLibrary = { id = "com.android.kotlin.multiplatform.library", version.ref = "agp" }
|
||||||
|
vanniktech-mavenPublish = { id = "com.vanniktech.maven.publish", version.ref = "mavenPublish" }
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
|
import com.vanniktech.maven.publish.KotlinMultiplatform
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.kotlinMultiplatform)
|
alias(libs.plugins.kotlinMultiplatform)
|
||||||
alias(libs.plugins.androidLibrary)
|
alias(libs.plugins.androidLibrary)
|
||||||
alias(libs.plugins.serialization)
|
alias(libs.plugins.serialization)
|
||||||
|
alias(libs.plugins.vanniktech.mavenPublish)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
@@ -232,4 +234,56 @@ kotlin {
|
|||||||
dependsOn(iosTest.get()) // iosSimulatorArm64Main depends on iosMain
|
dependsOn(iosTest.get()) // iosSimulatorArm64Main depends on iosMain
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mavenPublishing {
|
||||||
|
// sources publishing is always enabled by the Kotlin Multiplatform plugin
|
||||||
|
configure(
|
||||||
|
KotlinMultiplatform(
|
||||||
|
// whether to publish a sources jar
|
||||||
|
sourcesJar = true,
|
||||||
|
// configure which Android library variants to publish if this project has an Android target
|
||||||
|
// defaults to "release" when using the main plugin and nothing for the base plugin
|
||||||
|
androidVariantsToPublish = listOf("release"),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
coordinates(
|
||||||
|
groupId = "com.vitorpamplona.quartz",
|
||||||
|
artifactId = "quartz",
|
||||||
|
version = "1.03.0"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Configure publishing to Maven Central
|
||||||
|
//publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = true)
|
||||||
|
publishToMavenCentral(automaticRelease = true)
|
||||||
|
|
||||||
|
// Enable GPG signing for all publications
|
||||||
|
signAllPublications()
|
||||||
|
|
||||||
|
pom {
|
||||||
|
name = "Quartz: Nostr Library for Kotlin Multiplatform"
|
||||||
|
description = "Nostr library ported to Kotlin/Multiplatform for JVM, Android, iOS & Linux"
|
||||||
|
inceptionYear = "2025"
|
||||||
|
url = "https://github.com/vitorpamplona/amethyst/"
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name = "MIT License"
|
||||||
|
url = "https://github.com/vitorpamplona/amethyst/blob/main/LICENSE"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id = "vitorpamplona"
|
||||||
|
name = "Vitor Pamplona"
|
||||||
|
url = "http://vitorpamplona.com"
|
||||||
|
email = "vitor@vitorpamplona.com"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
scm {
|
||||||
|
url = "https://github.com/vitorpamplona/amethyst/"
|
||||||
|
connection = "https://github.com/vitorpamplona/amethyst/.git"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user