- Implement SynorStorage class for decentralized storage operations including upload, download, pinning, and CAR file management. - Create supporting types and models for storage operations such as UploadOptions, Pin, and StorageConfig. - Implement SynorWallet class for wallet operations including wallet creation, address generation, transaction signing, and balance queries. - Create supporting types and models for wallet operations such as Wallet, Address, and Transaction. - Introduce error handling for both storage and wallet operations.
60 lines
1.6 KiB
Kotlin
60 lines
1.6 KiB
Kotlin
plugins {
|
|
kotlin("jvm") version "1.9.21"
|
|
kotlin("plugin.serialization") version "1.9.21"
|
|
`maven-publish`
|
|
}
|
|
|
|
group = "io.synor"
|
|
version = "0.1.0"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
// Kotlin
|
|
implementation(kotlin("stdlib"))
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2")
|
|
|
|
// HTTP Client
|
|
implementation("io.ktor:ktor-client-core:2.3.7")
|
|
implementation("io.ktor:ktor-client-cio:2.3.7")
|
|
implementation("io.ktor:ktor-client-content-negotiation:2.3.7")
|
|
implementation("io.ktor:ktor-client-websockets:2.3.7")
|
|
implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.7")
|
|
|
|
// Testing
|
|
testImplementation(kotlin("test"))
|
|
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")
|
|
testImplementation("io.ktor:ktor-client-mock:2.3.7")
|
|
testImplementation("io.mockk:mockk:1.13.8")
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain(17)
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
create<MavenPublication>("maven") {
|
|
from(components["java"])
|
|
pom {
|
|
name.set("Synor SDK")
|
|
description.set("Kotlin SDK for Synor - Compute, Wallet, RPC, and Storage")
|
|
url.set("https://synor.cc")
|
|
|
|
licenses {
|
|
license {
|
|
name.set("MIT License")
|
|
url.set("https://opensource.org/licenses/MIT")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|