Skip to content

Commit

Permalink
Changes for v1.0-beta-17.
Browse files Browse the repository at this point in the history
Merge changes for v1.0-beta-17.
  • Loading branch information
KotlinGeekDev authored Feb 21, 2025
2 parents be28a1e + cce300a commit e982d73
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 16 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: KMP CI with Gradle

on:
# push:
# branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
workflow_call:

permissions:
contents: read

jobs:
build:
strategy:
matrix:
include:
- target: iosSimulatorArm64Test
os: macos-latest
- target: commonJvmTest
os: ubuntu-latest
- target: linuxTest
os: ubuntu-latest
- target: testDebugUnitTest
os: ubuntu-latest
- target: testReleaseUnitTest
os: ubuntu-latest
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v3
- uses: actions/cache@v3
with:
path: |
~/.konan
key: ${{ runner.os }}-${{ hashFiles('**/.lock') }}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@ce999babab2de1c4b649dc15f0ee67e6246c994f
with:
arguments: ${{ matrix.target }}
- name: Maven Local Publishing
run: ./gradlew publishToMavenLocal --no-configuration-cache
env:
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY_CONTENTS }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ You can include the library from either Maven Central or Jitpack.
You can include the library in the common source set like this:
```kotlin
dependencies {
implementation("io.github.kotlingeekdev:rhodium:1.0-beta-16")
implementation("io.github.kotlingeekdev:rhodium:1.0-beta-17")

}
```
Expand Down Expand Up @@ -74,7 +74,7 @@ then, in your module's `build.gradle(.kts)`, you need to add:
// build.gradle.kts
dependencies {
//...
implementation("com.github.KotlinGeekDev.Rhodium:rhodium:1.0-beta-16")
implementation("com.github.KotlinGeekDev.Rhodium:rhodium:1.0-beta-17")


}
Expand All @@ -85,7 +85,7 @@ If you're including it in an Android app, you can just add:
// app/build.gradle.kts
dependencies {
//...
implementation("com.github.KotlinGeekDev.Rhodium:rhodium-android:1.0-beta-16")
implementation("com.github.KotlinGeekDev.Rhodium:rhodium-android:1.0-beta-17")

}
```
Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ buildscript {
plugins {
kotlin("multiplatform") version "2.0.20" apply false
id("com.android.library") version "8.2.2" apply false
id("org.jetbrains.kotlinx.atomicfu") version "0.25.0"
id("org.jetbrains.kotlinx.atomicfu") version "0.26.1"
id("com.vanniktech.maven.publish") version "0.30.0"
//id("org.jetbrains.kotlin.android") version "2.0.0" apply false
//id("org.jetbrains.kotlin.plugin.compose") version "2.0.0" apply false
Expand All @@ -31,7 +31,7 @@ allprojects {
val isJitpack = System.getenv("JITPACK") == "true"

group = "io.github.kotlingeekdev"
version = "1.0-beta-16"
version = "1.0-beta-17"


// val javadocJar = tasks.register<Jar>("javadocJar") {
Expand All @@ -55,7 +55,7 @@ allprojects {
pom {
name = "Rhodium"
description = " A Kotlin Multiplatform library for Nostr"
url = "https://github.com/KotlinGeekDev/Ballast"
url = "https://github.com/KotlinGeekDev/Rhodium"

licenses {
license {
Expand Down
41 changes: 32 additions & 9 deletions rhodium-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile

val kotlinVersion = "2.0.20"
val ktorVersion = "3.0.1"
val ktorVersion = "2.3.13"
val kotlinCryptoVersion = "0.4.0"

val junitJupiterVersion = "5.10.1"
Expand Down Expand Up @@ -93,11 +93,26 @@ kotlin {
}

//Apple targets
macosX64()
macosArm64()
iosX64()
iosArm64()
iosSimulatorArm64()
val macosX64 = macosX64()
val macosArm64 = macosArm64()
val iosArm64 = iosArm64()
val iosX64 = iosX64()
val iosSimulatorArm64 = iosSimulatorArm64()
val appleTargets = listOf(
macosX64, macosArm64,
iosArm64, iosX64, iosSimulatorArm64,
)

appleTargets.forEach { target ->
with(target) {
binaries {
framework {
baseName = "Rhodium"
}
}
}
}


applyDefaultHierarchyTemplate()

Expand All @@ -122,7 +137,7 @@ kotlin {
//Coroutines
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0")
//Atomics
implementation("org.jetbrains.kotlinx:atomicfu:0.25.0")
implementation("org.jetbrains.kotlinx:atomicfu:0.26.1")
//Date-time
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.1")
//UUID
Expand Down Expand Up @@ -179,12 +194,14 @@ kotlin {
}

androidUnitTest.configure {
dependsOn(commonJvmTest)
dependencies {
implementation("junit:junit:4.13.2")
}
}

androidInstrumentedTest.configure {
dependsOn(commonJvmTest)
dependencies {
implementation("androidx.test.ext:junit:1.2.1")
implementation("androidx.test.espresso:espresso-core:3.6.1")
Expand Down Expand Up @@ -213,8 +230,14 @@ kotlin {
implementation("dev.whyoleg.cryptography:cryptography-provider-apple:$kotlinCryptoVersion")
}
}
macosMain.get().dependsOn(appleMain.get())
iosMain.get().dependsOn(appleMain.get())
appleTest.configure {
dependsOn(commonTest.get())
}

appleTargets.forEach { target ->
getByName("${target.targetName}Main") { dependsOn(appleMain.get()) }
getByName("${target.targetName}Test") { dependsOn(appleTest.get()) }
}

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ class NostrTests {
println(event)
println("Correct Event:")
println(correctlyParsedEvent)
assertEquals(correctlyParsedEvent, event)
assertEquals(correctlyParsedEvent.toString(), event.toString())
}
}

0 comments on commit e982d73

Please sign in to comment.