Skip to content

Commit

Permalink
Fix poseidon loading from jar; Bump version to 0.7.3 (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
DelevoXDG authored Nov 7, 2023
1 parent bd444b3 commit 1bf3017
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
run: |
cp crypto/pedersen/build/bindings/libcrypto_jni.* .
cp crypto/poseidon/build/bindings/libposeidon_jni.* .
cp crypto/poseidon/build/poseidon/libposeidon.* .
- name: Upload the shared libs
uses: actions/upload-artifact@v3
Expand All @@ -68,6 +69,7 @@ jobs:
path: |
libcrypto_jni.*
libposeidon_jni.*
libposeidon.*
- name: Build android's AAR
run: ./gradlew android:build
Expand Down Expand Up @@ -117,13 +119,15 @@ jobs:
container=$(docker create build)
docker cp $container:/build/crypto/pedersen/build/bindings/libcrypto_jni.so libcrypto_jni.so
docker cp $container:/build/crypto/poseidon/build/bindings/libposeidon_jni.so libposeidon_jni.so
docker cp $container:/build/crypto/poseidon/build/poseidon/libposeidon.so libposeidon.so
- name: Upload the shared lib
uses: actions/upload-artifact@v3
with:
name: lib-Linux-${{ steps.vars.outputs.os_arch }}
path: |
libcrypto_jni.so
libposeidon_jni.so
libposeidon.so
outputs:
archs: ${{ steps.vars.outputs.os_arch }}
Expand Down
2 changes: 1 addition & 1 deletion androiddemo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies {
implementation("androidx.appcompat:appcompat:1.4.2")
implementation("com.google.android.material:material:1.6.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("com.swmansion.starknet:starknet:0.7.2@aar")
implementation("com.swmansion.starknet:starknet:0.7.3@aar")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
Expand Down
2 changes: 1 addition & 1 deletion javademo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

dependencies {
implementation("com.swmansion.starknet:starknet:0.7.2")
implementation("com.swmansion.starknet:starknet:0.7.3")
}

application {
Expand Down
9 changes: 5 additions & 4 deletions lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import org.jetbrains.dokka.gradle.DokkaTask

version = "0.7.2"
version = "0.7.3"
group = "com.swmansion.starknet"

plugins {
Expand Down Expand Up @@ -82,10 +82,11 @@ tasks.test {
useJUnitPlatform()

val libsSharedPath = file("$buildDir/libs/shared").absolutePath
val pedersenPath = file("${rootDir}/crypto/pedersen/build/bindings").absolutePath
val poseidonPath = file("${rootDir}/crypto/poseidon/build/bindings").absolutePath
val pedersenJniPath = file("${rootDir}/crypto/pedersen/build/bindings").absolutePath
val poseidonJniPath = file("${rootDir}/crypto/poseidon/build/bindings").absolutePath
val posedionPath = file("${rootDir}/crypto/poseidon/build/poseidon").absolutePath
systemProperty("java.library.path", "$libsSharedPath:$pedersenJniPath:$poseidonJniPath:$posedionPath")

systemProperty("java.library.path", "$libsSharedPath:$pedersenPath:$poseidonPath")
systemProperty(
"integrationTestMode",
project.findProperty("integrationTestMode")
Expand Down
1 change: 1 addition & 0 deletions lib/build_crypto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ fi
mkdir -p build/libs/shared/$SUFFIX
cp -f ../crypto/pedersen/build/bindings/libcrypto_jni.* build/libs/shared/$SUFFIX
cp -f ../crypto/poseidon/build/bindings/libposeidon_jni.* build/libs/shared/$SUFFIX
cp -f ../crypto/poseidon/build/poseidon/libposeidon.* build/libs/shared/$SUFFIX
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ object Poseidon {
private val r = 2

init {
NativeLoader.load("poseidon")
NativeLoader.load("poseidon_jni")
}

Expand Down

0 comments on commit 1bf3017

Please sign in to comment.