Skip to content

Commit 62f5bca

Browse files
committed
chore: extract vss client module
1 parent dc279a1 commit 62f5bca

File tree

10 files changed

+114
-48
lines changed

10 files changed

+114
-48
lines changed

app/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ tasks.withType<io.gitlab.arturbosch.detekt.Detekt>().configureEach {
176176
}
177177

178178
dependencies {
179+
implementation(project(":libs:vss-client"))
179180
implementation(fileTree("libs") { include("*.aar") })
180181
implementation(libs.jna) { artifact { type = "aar" } }
181182
implementation(platform(libs.kotlin.bom))
@@ -276,6 +277,7 @@ dependencies {
276277
room {
277278
schemaDirectory("$projectDir/schemas")
278279
}
280+
279281
tasks.withType<Test> {
280282
testLogging {
281283
events("passed", "skipped", "failed")

libs/vss-client/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/build
2+
*.iml
3+
.gradle
4+
/local.properties
5+
.DS_Store

libs/vss-client/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# VSS Rust Client FFI Module
2+
3+
This module contains the uniffi bindings from [vss-rust-client-ffi](https://github.com/synonymdev/vss-rust-client-ffi).
4+
5+
## Notes
6+
7+
- **DO NOT** manually edit the content of the files in this module - they are auto-generated
8+
- Detekt is disabled for this module in `build.gradle.kts`
9+
10+
## Updating
11+
12+
When updating the with new binding:
13+
1. Replace the `vss_rust_client_ffi.kt` with the one from `bidnings/android`
14+
2. Overwrite the entire `jniLibs` directory and its contents with the one from `bidnings/android`.
15+
3. Ensure the module builds successfully by rebuilding & running the app.

libs/vss-client/build.gradle.kts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
plugins {
2+
id("com.android.library")
3+
id("org.jetbrains.kotlin.android")
4+
}
5+
6+
// Disable detekt for this module to avoid formatting auto-generated code
7+
tasks.matching { it.name.contains("detekt", ignoreCase = true) }.configureEach {
8+
enabled = false
9+
}
10+
11+
android {
12+
namespace = "uniffi.vss_rust_client_ffi"
13+
compileSdk = 36
14+
15+
defaultConfig {
16+
minSdk = 26
17+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
18+
}
19+
20+
buildTypes {
21+
release {
22+
isMinifyEnabled = false
23+
}
24+
}
25+
26+
compileOptions {
27+
sourceCompatibility = JavaVersion.VERSION_11
28+
targetCompatibility = JavaVersion.VERSION_11
29+
}
30+
31+
kotlinOptions {
32+
jvmTarget = "11"
33+
}
34+
35+
sourceSets {
36+
getByName("main") {
37+
jniLibs.srcDirs("src/main/jniLibs")
38+
}
39+
}
40+
}
41+
42+
dependencies {
43+
compileOnly(libs.jna)
44+
compileOnly("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2")
45+
}

0 commit comments

Comments
 (0)