-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
53 lines (45 loc) · 1.13 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
kotlin("jvm") version "2.1.10"
}
allprojects {
repositories {
mavenCentral()
}
apply(plugin = "org.jetbrains.kotlin.jvm")
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_21)
}
}
java {
targetCompatibility = JavaVersion.VERSION_21
}
repositories {
mavenLocal()
mavenCentral()
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/veupathdb/maven-packages")
credentials {
username = if (extra.has("gpr.user")) extra["gpr.user"] as String? else System.getenv("GITHUB_USERNAME")
password = if (extra.has("gpr.key")) extra["gpr.key"] as String? else System.getenv("GITHUB_TOKEN")
}
}
}
}
tasks.create("docker-build") {
doLast {
with(
ProcessBuilder("docker", "build", "-t", "veupathdb/vdi-handler-server:latest", ".")
.directory(rootDir)
.start()
) {
inputStream.transferTo(System.out)
errorStream.transferTo(System.err)
if (waitFor() != 0) {
throw RuntimeException("docker build failed")
}
}
}
}