- 修复交易统计数据计算逻辑(总订单数、已完成订单数、持仓数量) - 修复L2认证签名生成,支持URL-safe base64格式的secret - 添加标准HTTP请求头以匹配clob-client行为 - 移除数据库加密(私人应用,明文存储) - 添加自动获取API Key功能 - 优化持仓数量统计(包括正负仓位) - 添加EIP-712签名和L1认证支持 - 更新前端账户管理界面
79 lines
2.3 KiB
Kotlin
79 lines
2.3 KiB
Kotlin
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
plugins {
|
|
id("org.springframework.boot") version "3.2.0"
|
|
id("io.spring.dependency-management") version "1.1.4"
|
|
kotlin("jvm") version "1.9.20"
|
|
kotlin("plugin.spring") version "1.9.20"
|
|
kotlin("plugin.jpa") version "1.9.20"
|
|
}
|
|
|
|
group = "com.wrbug"
|
|
version = "1.0.0"
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
// Spring Boot
|
|
implementation("org.springframework.boot:spring-boot-starter-web")
|
|
implementation("org.springframework.boot:spring-boot-starter-websocket")
|
|
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
|
|
implementation("org.springframework.boot:spring-boot-starter-validation")
|
|
|
|
// Kotlin
|
|
implementation("org.jetbrains.kotlin:kotlin-reflect")
|
|
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
|
|
|
|
// Retrofit
|
|
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
|
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
|
|
|
|
// OkHttp
|
|
implementation("com.squareup.okhttp3:okhttp:4.12.0")
|
|
|
|
// WebSocket Client
|
|
implementation("org.java-websocket:Java-WebSocket:1.5.4")
|
|
|
|
// Database
|
|
implementation("com.mysql:mysql-connector-j:8.2.0")
|
|
implementation("org.flywaydb:flyway-core")
|
|
implementation("org.flywaydb:flyway-mysql")
|
|
|
|
// Jackson
|
|
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
|
|
implementation("com.fasterxml.jackson.core:jackson-databind")
|
|
|
|
// Keccak-256 for Ethereum function selector
|
|
implementation("org.bouncycastle:bcprov-jdk18on:1.78.1")
|
|
|
|
// Web3j for Ethereum wallet and EIP-712 signing
|
|
implementation("org.web3j:core:5.0.0")
|
|
|
|
// Logging
|
|
implementation("org.slf4j:slf4j-api")
|
|
|
|
// Test
|
|
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
|
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test")
|
|
}
|
|
|
|
tasks.withType<KotlinCompile> {
|
|
kotlinOptions {
|
|
freeCompilerArgs += "-Xjsr305=strict"
|
|
jvmTarget = "17"
|
|
}
|
|
}
|
|
|
|
tasks.withType<Test> {
|
|
useJUnitPlatform()
|
|
}
|
|
|