-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
109 lines (85 loc) · 3.37 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
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.26"
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"
}
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")
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-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.30")
annotationProcessor("org.projectlombok:lombok:1.18.30")
testCompileOnly("org.projectlombok:lombok:1.18.30")
testAnnotationProcessor("org.projectlombok:lombok:1.18.30")
implementation("com.querydsl:querydsl-jpa")
annotationProcessor("com.querydsl:querydsl-apt")
implementation("com.bloxbean.cardano:cardano-client-address:0.5.0")
implementation("com.bloxbean.cardano:cardano-client-cip30:0.5.0")
implementation("io.vavr:vavr:0.10.4")
implementation("org.cardanofoundation:merkle-tree-java:0.0.7")
implementation("org.cardanofoundation:cip30-data-signature-parser:0.0.11")
implementation("me.paulschwarz:spring-dotenv:4.0.0")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0")
}
tasks.withType<Test> {
useJUnitPlatform()
}
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/voting-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/voting-verification-app-types.ts"))
into(layout.projectDirectory.dir("../../ui/$uiProject/src/types"))
} else {
println("buildAndCopyTypescriptTypes ui_project_name NOT set. Skipping.")
}
}