-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
66 lines (53 loc) · 1.7 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
plugins {
id("com.github.johnrengelman.shadow") version "7.1.1"
id("io.micronaut.application") version "3.2.2"
}
version = "0.1"
group = "io.sarvika.clowre"
repositories {
mavenCentral()
}
dependencies {
annotationProcessor("io.micronaut:micronaut-http-validation")
implementation("io.micronaut:micronaut-http-client")
implementation("io.micronaut:micronaut-jackson-databind")
implementation("io.micronaut:micronaut-runtime")
implementation("jakarta.annotation:jakarta.annotation-api")
runtimeOnly("ch.qos.logback:logback-classic")
implementation("io.micronaut:micronaut-validation")
implementation("io.micronaut.views:micronaut-views-thymeleaf")
implementation("io.micronaut.discovery:micronaut-discovery-client")
implementation("io.swagger.parser.v3:swagger-parser:2.0.30")
}
application {
mainClass.set("io.sarvika.clowre.Application")
}
java {
sourceCompatibility = JavaVersion.toVersion("11")
targetCompatibility = JavaVersion.toVersion("11")
}
graalvmNative.toolchainDetection = false
micronaut {
runtime("netty")
testRuntime("junit5")
processing {
incremental(true)
annotations("io.sarvika.clowre.*")
}
}
def releaseVersion = System.getenv("RELEASE_VERSION")
tasks.named("dockerBuild") {
images = [
"clowre/docserver"
]
if (releaseVersion != null && !releaseVersion.trim().isEmpty()) {
logger.lifecycle "Adding release tag '${releaseVersion}' to docker builds"
images.add("clowre/docserver:${releaseVersion}")
}
}
tasks.named("dockerPush") {
registryCredentials {
username = System.getenv("DOCKER_HUB_USERNAME")
password = System.getenv("DOCKER_HUB_PASSWORD")
}
}