forked from restatedev/e2e
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
71 lines (57 loc) · 1.8 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
// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH
//
// This file is part of the Restate e2e tests,
// which are released under the MIT license.
//
// You can find a copy of the license in file LICENSE in the root
// directory of this repository or package, or at
// https://github.com/restatedev/e2e/blob/main/LICENSE
import com.google.protobuf.gradle.id
import com.google.protobuf.gradle.protobuf
plugins {
java
application
alias(libs.plugins.protobuf)
alias(libs.plugins.shadowJar)
alias(libs.plugins.jib)
}
dependencies {
implementation(libs.restate.sdk.api)
implementation(libs.restate.sdk.http.vertx)
implementation(libs.restate.sdk.jackson)
implementation(project(":contracts"))
protobuf(project(":contracts"))
implementation(libs.log4j.api)
implementation(libs.log4j.core)
implementation(libs.grpc.netty.shaded)
implementation(platform(libs.jackson.bom))
implementation(libs.jackson.core)
implementation(libs.jackson.databind)
}
protobuf {
protoc {
// The artifact spec for the Protobuf Compiler
artifact = "com.google.protobuf:protoc:${libs.versions.protobuf.get()}"
}
plugins {
id("restate") {
artifact = "dev.restate:protoc-gen-restate:${libs.versions.restate.get()}:all@jar"
}
}
generateProtoTasks { ofSourceSet("main").forEach { it.plugins { id("restate") } } }
}
jib {
to.image = "restatedev/e2e-java-services"
from.image = parent!!.parent!!.ext.get("testBaseImage").toString()
from {
platforms {
platform {
architecture = parent!!.parent!!.ext.get("testHostArchitecture").toString()
os = "linux"
}
}
}
}
// Use gradle shadowJar to build the fat jar
tasks.jar { manifest { attributes["Main-Class"] = "dev.restate.e2e.services.Main" } }
application { mainClass.set("dev.restate.e2e.services.Main") }