Skip to content

Commit

Permalink
Changes for v1.0-beta-15.
Browse files Browse the repository at this point in the history
Merge changes for v1.0-beta-15.
  • Loading branch information
KotlinGeekDev authored Feb 20, 2025
2 parents 2385edf + 360bc26 commit 0807168
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 8 deletions.
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-14")
implementation("io.github.kotlingeekdev:rhodium:1.0-beta-15")

}
```
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-14")
implementation("com.github.KotlinGeekDev.Rhodium:rhodium:1.0-beta-15")


}
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-14")
implementation("com.github.KotlinGeekDev.Rhodium:rhodium-android:1.0-beta-15")

}
```
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ allprojects {
val isJitpack = System.getenv("JITPACK") == "true"

group = "io.github.kotlingeekdev"
version = "1.0-beta-14"
version = "1.0-beta-15"


// val javadocJar = tasks.register<Jar>("javadocJar") {
Expand Down
16 changes: 13 additions & 3 deletions rhodium-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ kotlin {


val androidMain by getting {
dependsOn(commonJvmMain)

dependencies {
implementation("androidx.appcompat:appcompat:1.7.0")
Expand All @@ -158,11 +157,11 @@ kotlin {
}

androidInstrumentedTest.configure {
dependsOn(commonJvmTest)
// dependsOn(commonJvmTest)
}

val androidUnitTest by getting {
dependsOn(commonJvmTest)
// dependsOn(commonJvmTest)
}

linuxMain.configure {
Expand Down Expand Up @@ -201,15 +200,26 @@ android {
compileSdk = 34

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}

buildTypes {
release {
aarMetadata {

}
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
isMinifyEnabled = true
}
debug {
aarMetadata {

}
isMinifyEnabled = false
}
}
compileOptions {
isCoreLibraryDesugaringEnabled = false
Expand Down
2 changes: 2 additions & 0 deletions rhodium-core/consumer-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# preserve access to native classses
-keep class fr.acinq.secp256k1.** { *; }
26 changes: 26 additions & 0 deletions rhodium-core/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# preserve the line number information for debugging stack traces.
-dontobfuscate
-keepattributes LocalVariableTable
-keepattributes LocalVariableTypeTable
-keepattributes *Annotation*
-keepattributes SourceFile
-keepattributes LineNumberTable
-keepattributes Signature
-keepattributes Exceptions
-keepattributes InnerClasses
-keepattributes EnclosingMethod
-keepattributes MethodParameters
-keepparameternames


# Keep all names
-keepnames class ** { *; }

# Keep All enums
-keep enum ** { *; }

# preserve access to native classses
-keep class fr.acinq.secp256k1.** { *; }
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
import kotlinx.serialization.json.*
import rhodium.crypto.toHexString
import rhodium.nostr.Event
import rhodium.nostr.NostrFilter

Expand Down Expand Up @@ -114,7 +115,7 @@ open class RequestMessage(

companion object {
fun singleFilterRequest(
subscriptionId: String = uuid4().bytes.decodeToString().substring(0, 5),
subscriptionId: String = uuid4().bytes.toHexString().substring(0, 5),
filter: NostrFilter
): RequestMessage {
return RequestMessage(messageType = "REQ", subscriptionId, listOf(filter))
Expand Down

0 comments on commit 0807168

Please sign in to comment.