-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle.kts
167 lines (137 loc) · 5.1 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.9.10"
// id("org.web3j") version "4.9.0"
kotlin("plugin.serialization") version "1.9.10"
application
`maven-publish`
id("com.expediagroup.graphql") version "6.5.3"
id("com.github.ben-manes.versions") version "0.48.0"
}
group = "id.walt"
version = "1.SNAPSHOT"
repositories {
mavenCentral()
maven("https://maven.walt.id/repository/waltid/")
maven("https://maven.walt.id/repository/waltid-ssi-kit/")
mavenLocal()
}
dependencies {
// Kotlin
implementation(kotlin("stdlib"))
// Ethereum: Web3j
implementation("org.web3j:core:4.10.3") // 5.0.0 is an invalid old version
// JSON
implementation("com.beust:klaxon:5.6")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.6.0")
// Logging
implementation("org.slf4j:slf4j-api:2.0.9")
implementation("org.slf4j:slf4j-simple:2.0.9")
implementation("io.github.oshai:kotlin-logging-jvm:5.1.0")
// Config: Hoplite
implementation("com.sksamuel.hoplite:hoplite-core:2.8.0.RC3")
implementation("com.sksamuel.hoplite:hoplite-yaml:2.8.0.RC3")
implementation("com.sksamuel.hoplite:hoplite-hikaricp:2.8.0.RC3")
// HTTP / Server: Javalin
implementation("io.javalin:javalin-bundle:4.6.8")
// HTTP / Client: ktor
implementation("io.ktor:ktor-client-core-jvm:2.3.5")
implementation("io.ktor:ktor-client-content-negotiation:2.3.5")
implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.5")
implementation("io.ktor:ktor-client-cio-jvm:2.3.5")
implementation("io.ktor:ktor-client-logging-jvm:2.3.5")
implementation("io.ktor:ktor-client-auth-jvm:2.3.5")
// Persistence
/*implementation("org.jetbrains.exposed:exposed-core:0.43.0")
implementation("org.jetbrains.exposed:exposed-dao:0.43.0")
implementation("org.jetbrains.exposed:exposed-jdbc:0.43.0")
implementation("org.xerial:sqlite-jdbc:3.42.0.1")*/
// Testing
//testImplementation(kotlin("test-junit"))
//testImplementation("io.mockk:mockk:1.12.4")
testImplementation("io.kotest:kotest-runner-junit5:5.7.2")
testImplementation("io.kotest:kotest-assertions-core:5.7.2")
testImplementation("io.kotest:kotest-assertions-json:5.7.2")
//near
implementation ("com.syntifi.near:near-java-api:0.1.0")
// unique
implementation ("network.unique:unique-sdk-jvm:0.0.3")
// algorand
implementation ("com.algorand:algosdk:2.2.0")
// expediagroup graphql
implementation("com.expediagroup", "graphql-kotlin-client-serialization", "6.5.3")
implementation("com.expediagroup", "graphql-kotlin-spring-client","6.5.3") {
exclude("com.expediagroup", "graphql-kotlin-client-jackson")
}
implementation("com.expediagroup", "graphql-kotlin-client-serialization","6.5.3")
}
tasks.withType<Test> {
useJUnitPlatform()
// Use the following condition to optionally run the integration tests:
// > gradle build -PrunIntegrationTests
if (!project.hasProperty("runIntegrationTests")) {
exclude("id/walt/nftkit/blockchainTransactionsCalls/**")
exclude("id/walt/nftkit/blockchainReadingOperations/**")
}
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}
application {
mainClass.set("id.walt.nftkit.AppKt")
}
/*
solidity {
optimizeRuns = 500
}
web3j {
generatedPackageName = "com.mycompany.{0}"
generatedFilesBaseDir = "$buildDir/custom/destination"
useNativeJavaTypes = false
}
*/
publishing {
publications {
create<MavenPublication>("mavenJava") {
pom {
name.set("walt.id NFT Kit")
description.set("Kotlin/Java for minting & managing NFTs.")
url.set("https://walt.id")
}
from(components["java"])
}
}
repositories {
maven {
url = uri("https://maven.walt.id/repository/waltid/")
val usernameFile = File("secret_maven_username.txt")
val passwordFile = File("secret_maven_password.txt")
val secretMavenUsername = System.getenv()["MAVEN_USERNAME"] ?: if (usernameFile.isFile) { usernameFile.readLines()[0] } else { "" }
val secretMavenPassword = System.getenv()["MAVEN_PASSWORD"] ?: if (passwordFile.isFile) { passwordFile.readLines()[0] } else { "" }
credentials {
username = secretMavenUsername
password = secretMavenPassword
}
}
}
}
//graphql {
// client {
// endpoint = "https://scan-api.opal.uniquenetwork.dev/v1/graphql/"
// packageName = "id.walt.nftkit"
// customScalars = listOf(
// com.expediagroup.graphql.plugin.gradle.config.GraphQLScalar(
// "_Any",
// "kotlinx.serialization.json.JsonObject",
// "com.expediagroup.graphql.examples.client.gradle.AnyScalarConverter"
// ),
// )
// serializer = com.expediagroup.graphql.plugin.gradle.config.GraphQLSerializer.KOTLINX
// }
//}
//