-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
95 lines (80 loc) · 1.91 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
87
88
89
90
91
92
93
94
95
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'java'
id 'idea'
id 'org.springframework.boot' version '3.0.1'
id 'com.google.cloud.tools.jib' version '3.3.1'
id 'io.spring.dependency-management' version '1.1.0'
}
ext {
// adding timestamp of build to project properties (displayed within spring boot banner)
timestampOfBuild = new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
yearOfBuild = new Date().format("yyyy")
if (project.hasProperty('githubPassword')) {
githubPassword = project.property('githubPassword')
} else {
githubPassword = "$System.env.GH_PASSWORD"
}
}
repositories {
mavenCentral()
}
group = "com.neubert.skaffold"
version = "0.0.1"
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
configurations {
published
compileOnly {
extendsFrom annotationProcessor
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation('org.assertj:assertj-core')
testImplementation('org.junit.jupiter:junit-jupiter-api')
testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine')
}
tasks.withType(Test) {
useJUnitPlatform()
}
springBoot {
buildInfo()
}
bootJar {
enabled = false
}
jar {
enabled = true
}
def baseImage = 'ghcr.io/tobias-neubert/eclipse-temurin:17.0.2_8-jre'
jib {
from {
image = baseImage
auth {
username = "_"
password = githubPassword
}
}
to {
image = 'ghcr.io/tobias-neubert/motd-service'
auth {
username = "_"
password = githubPassword
}
}
container {
mainClass = 'com.neubert.scaffold.motdservice.MotdServiceApplication'
ports = ['8080']
}
}