-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
134 lines (103 loc) · 4.27 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
import cz.habarta.typescript.generator.JsonLibrary
import cz.habarta.typescript.generator.TypeScriptFileType
import cz.habarta.typescript.generator.TypeScriptOutputKind
plugins {
java
id("org.springframework.boot") version "3.2.0"
id("io.spring.dependency-management") version "1.1.3"
id("org.graalvm.buildtools.native") version "0.9.27"
id("org.flywaydb.flyway") version "9.22.1"
id("cz.habarta.typescript-generator") version "3.2.1263"
id("com.github.ben-manes.versions") version "0.48.0"
jacoco
}
springBoot {
buildInfo()
}
group = "org.cardano.foundation"
version = "1.0.0-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_21
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
repositories {
mavenCentral()
maven { url = uri("https://repo.spring.io/milestone") }
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-aop")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
testImplementation("io.rest-assured:rest-assured:5.4.0")
testImplementation("org.wiremock:wiremock-standalone:3.9.1")
testCompileOnly("org.springframework.boot:spring-boot-starter-test")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-web")
testImplementation("org.springframework.boot:spring-boot-starter-test")
runtimeOnly("org.springframework.boot:spring-boot-properties-migrator")
runtimeOnly("io.micrometer:micrometer-registry-prometheus")
implementation("org.zalando:problem-spring-web-starter:0.29.1")
compileOnly("org.projectlombok:lombok:1.18.34")
annotationProcessor("org.projectlombok:lombok:1.18.34")
testCompileOnly("org.projectlombok:lombok:1.18.34")
testAnnotationProcessor("org.projectlombok:lombok:1.18.34")
implementation("org.flywaydb:flyway-core")
implementation("com.googlecode.libphonenumber:libphonenumber:8.13.42")
implementation("com.querydsl:querydsl-jpa")
annotationProcessor("com.querydsl:querydsl-apt")
implementation("com.bloxbean.cardano:cardano-client-address:0.5.1")
implementation("software.amazon.awssdk:sns:2.26.25")
implementation("io.vavr:vavr:0.10.4")
runtimeOnly("org.postgresql:postgresql")
implementation("org.cardanofoundation:cip30-data-signature-parser:0.0.11")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0")
implementation("me.paulschwarz:spring-dotenv:4.0.0")
// spring-boot overridden dependencies:
runtimeOnly("com.h2database:h2:2.2.224") // GraalVM compatibility
}
tasks.withType<Test> {
useJUnitPlatform()
}
tasks.test {
finalizedBy(tasks.jacocoTestReport)
}
tasks.jacocoTestReport {
dependsOn(tasks.test)
reports {
csv.required.set(true)
}
}
tasks {
generateTypeScript {
jsonLibrary = JsonLibrary.jackson2
outputKind = TypeScriptOutputKind.module
outputFileType = TypeScriptFileType.implementationFile
classPatterns = listOf(
"org.zalando.problem.Problem",
"io.vavr.control.Either",
"java.lang.Object",
"java.lang.Number",
"java.lang.Long",
"java.util.Optional",
"java.math.BigInteger",
"org.cardano.foundation.voting.service.**",
"org.cardano.foundation.voting.domain.**"
).toMutableList()
outputFile = "build/typescript-generator/user-verification-app-types.ts"
}
}
tasks.register<Copy>("buildAndCopyTypescriptTypes") {
val uiProject = properties["ui_project_name"]
if (uiProject != null) {
println("buildAndCopyTypescriptTypes UI project name: $uiProject")
dependsOn(tasks.generateTypeScript)
from(layout.buildDirectory.file("typescript-generator/user-verification-app-types.ts"))
into(layout.projectDirectory.dir("../../ui/$uiProject/src/types"))
} else {
println("buildAndCopyTypescriptTypes ui_project_name not set. Skipping.")
}
}