-
Notifications
You must be signed in to change notification settings - Fork 25
/
build.gradle.kts
141 lines (119 loc) · 4.13 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.9.10"
kotlin("plugin.serialization") version "1.9.10"
application
`maven-publish`
}
group = "id.walt"
version = "1.SNAPSHOT"
repositories {
mavenLocal()
mavenCentral()
maven("https://jitpack.io")
maven("https://maven.walt.id/repository/waltid/")
maven("https://maven.walt.id/repository/waltid-ssi-kit/")
maven("https://repo.danubetech.com/repository/maven-public/")
}
dependencies {
// SSIKIT
implementation("id.walt:waltid-ssikit:1.2308302143.0")
implementation("id.walt:waltid-sd-jwt-jvm:1.2306160840.0")
implementation("io.javalin:javalin-bundle:4.6.8")
implementation("com.github.kmehrunes:javalin-jwt:0.5")
implementation("com.beust:klaxon:5.6")
implementation("com.nimbusds:oauth2-oidc-sdk:10.11")
// CLI
implementation("com.github.ajalt.clikt:clikt-jvm:4.2.0")
implementation("com.github.ajalt.clikt:clikt:4.2.0")
// Service-Matrix
implementation("id.walt.servicematrix:WaltID-ServiceMatrix:1.1.3")
// Logging
//implementation("org.slf4j:slf4j-api:2.0.5")
implementation("org.slf4j:slf4j-simple:2.0.7")
implementation("io.github.microutils:kotlin-logging-jvm:3.0.5")
// Ktor
// HTTP
implementation("io.ktor:ktor-client-jackson:2.3.3")
implementation("io.ktor:ktor-client-content-negotiation:2.3.3")
implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.3")
implementation("io.ktor:ktor-client-core:2.3.3")
implementation("io.ktor:ktor-client-cio:2.3.3")
implementation("io.ktor:ktor-client-logging-jvm:2.3.3")
implementation("io.ktor:ktor-client-auth:2.3.3")
// Cache
implementation("io.github.pavleprica:kotlin-cache:1.2.0")
implementation("com.sksamuel.hoplite:hoplite-core:2.7.5")
implementation("com.sksamuel.hoplite:hoplite-hocon:2.7.5")
// Testing
//testImplementation(kotlin("test-junit"))
testImplementation("io.mockk:mockk:1.13.7")
testImplementation("io.kotest:kotest-runner-junit5:5.6.2")
testImplementation("io.kotest:kotest-assertions-core:5.6.2")
testImplementation("io.kotest:kotest-assertions-json:5.6.2")
implementation(kotlin("stdlib-jdk8"))
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = "17"
}
val compileTestKotlin: KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = "17"
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
application {
mainClass.set("id.walt.MainKt")
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
pom {
name.set("walt.id SSI Wallet Kit")
description.set("Kotlin/Java wallet API backend, including issuer and verifier API backends.")
url.set("https://walt.id")
}
from(components["java"])
}
}
repositories {
maven {
url = uri("https://maven.walt.id/repository/waltid-ssi-kit/")
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
}
}
}
}
tasks.withType<Jar> {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
tasks.withType<Copy> {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
tasks.withType<Tar>().configureEach {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
tasks.withType<Zip>().configureEach {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
distributions.configureEach {
contents {
this.duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
}