-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
86 lines (68 loc) · 2.13 KB
/
build.gradle
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
plugins {
id 'io.quarkus'
id 'java'
id "io.freefair.lombok" version "6.5.0.2"
}
def damlOutput = "${rootDir}/src/main/.daml/dist/daml-java-playground.dar"
def damlCodeGenResource = "${buildDir}/generated/main/java"
ext.damlBinPath = "$System.env.PATH" + System.getProperty("path.separator") + "/home/worker/.daml/bin"
repositories {
mavenCentral()
mavenLocal()
}
group "com.djplayground"
version "1"
sourceSets {
main {
java {
srcDir damlCodeGenResource
}
}
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
dependencies {
implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
implementation "io.quarkus:quarkus-arc"
implementation "io.quarkus:quarkus-hibernate-validator"
implementation "io.quarkus:quarkus-smallrye-reactive-messaging-kafka"
implementation "com.daml:bindings-java:2.5.0"
implementation "com.daml:bindings-rxjava:2.5.0"
implementation "org.slf4j:slf4j-api:1.7.36"
testImplementation files('testlib/junit5-support.jar')
testImplementation "io.quarkus:quarkus-junit5"
testImplementation "io.quarkus:quarkus-junit5-mockito:2.9.2.Final"
testImplementation "org.mockito:mockito-inline:3.11.2"
testImplementation "org.testcontainers:kafka:1.16.3"
testImplementation "io.quarkus:quarkus-test-kafka-companion:2.9.0.Final"
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
task compileDaml(type: Exec) {
environment "PATH", damlBinPath
onlyIf { !file(damlOutput).exists() }
workingDir "${rootDir}/src/main/"
commandLine "daml", "build"
}
task damlCodegen(type: Exec) {
environment "PATH", damlBinPath
onlyIf { !file(damlCodeGenResource).exists() }
workingDir "${rootDir}/src/main/"
commandLine "daml", "codegen", "java"
dependsOn compileDaml
}
task damlClean {
delete damlOutput
}
clean {
dependsOn damlClean
}
compileJava {
options.encoding = 'UTF-8'
options.compilerArgs << '-parameters'
dependsOn damlCodegen
}