-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
86 lines (71 loc) · 2.32 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id "idea"
id "application"
id "maven-publish"
id "org.jetbrains.kotlin.jvm" version "2.0.20"
id "io.spring.dependency-management" version "1.1.6"
id "org.springframework.boot" version "3.3.4"
id "com.palantir.docker" version "0.36.0"
}
group = "io.viascom.github.action.maintenance"
def major = "0"
def minor = "0"
def patch = "3"
version = "$major.$minor.$patch"
bootJar {
archiveFileName = "github-maintenance-action.jar"
}
application {
mainClassName = "io.viascom.github.action.maintenance.GitHubActionApplication"
}
springBoot {
buildInfo()
}
repositories {
mavenCentral()
maven {
url = uri("https://maven.pkg.github.com/viascom/*")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.token") ?: System.getenv("GITHUB_TOKEN")
}
}
}
dependencies {
implementation "org.springframework.boot:spring-boot-starter"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "com.squareup.okhttp3:okhttp:4.12.0"
implementation "com.google.code.gson:gson:2.11.0"
implementation "com.bucket4j:bucket4j-core:8.10.1"
testImplementation "org.springframework.boot:spring-boot-starter-test"
}
test {
useJUnitPlatform()
}
tasks.withType(KotlinCompile).configureEach {
kotlinOptions.jvmTarget = JavaVersion.VERSION_21
kotlinOptions.freeCompilerArgs = ["-Xjvm-default=all"]
}
docker {
dependsOn bootJar
name "viascom/${rootProject.name}:${version}"
tags "$version"
dockerfile file("docker/Dockerfile")
files bootJar.archiveFile, 'docker/build_application.sh', 'docker/run_application.sh', 'docker/packages.list'
buildArgs([APP_NAME: 'github-maintenance-action', JAR_FILE: 'github-maintenance-action.jar'])
pull true
noCache true
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/viascom/github-maintenance-action")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.token") ?: System.getenv("GITHUB_TOKEN")
}
}
}
}