-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
107 lines (90 loc) · 2.9 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import com.google.cloud.tools.jib.gradle.JibExtension
import no.tornado.fxlauncher.gradle.FXLauncherExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript {
var kotlin_version: String by extra
kotlin_version = "1.7.10"
repositories {
mavenCentral()
}
dependencies {
classpath(kotlin("gradle-plugin", kotlin_version))
classpath("com.github.jengelman.gradle.plugins:shadow:4.0.3")
classpath("no.tornado:fxlauncher-gradle-plugin:1.0.21")
}
}
plugins {
java
application
id("com.google.cloud.tools.jib") version "3.2.0"
}
application {
mainClass.set("com.akazlou.dynoman.DynomanApp")
}
group = "dynoman"
version = "1.0.0-SNAPSHOT"
project.setProperty("mainClassName", application.mainClass.get())
apply {
plugin("kotlin")
plugin("com.github.johnrengelman.shadow")
plugin("no.tornado.fxlauncher")
}
val kotlin_version: String by extra
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("stdlib-jdk8", kotlin_version))
implementation(kotlin("reflect", kotlin_version))
implementation("com.amazonaws:aws-java-sdk-dynamodb:1.12.310")
implementation("com.github.ben-manes.caffeine:caffeine:2.9.3")
implementation("no.tornado:tornadofx:1.7.20")
implementation("org.reflections:reflections:0.10.2")
implementation("com.squareup.okhttp3:okhttp:4.10.0")
implementation("org.controlsfx:controlsfx:8.40.18")
implementation("org.partiql:partiql-lang-kotlin:0.6.0")
testImplementation("io.kotlintest:kotlintest-runner-junit5:3.4.2")
testImplementation("org.testcontainers:testcontainers:1.17.3")
}
configure<JavaPluginExtension> {
sourceCompatibility = JavaVersion.VERSION_1_8
}
configure<FXLauncherExtension> {
applicationVendor = "Aliaksandr Kazlou ([email protected])"
applicationUrl = "http://com.akazlou.dynoman.s3-website-us-west-2.amazonaws.com"
applicationMainClass = application.mainClass.get()
applicationVersion = "1.0.0"
applicationTitle = "DynamoDB Manager"
applicationName = "dynoman"
cacheDir = "deps"
acceptDowngrade = false
}
// docker run --net host -v /tmp/.X11-unix:/tmp/.X11-unix -v $HOME/.Xauthority:/root/.Xauthority -e DISPLAY=unix$DISPLAY dynoman
configure<JibExtension> {
from {
image = "amazoncorretto:8u252"
}
to {
image = "dynoman:latest"
tags = setOf("amazoncorretto", "amazoncorretto-8u252")
}
container {
mainClass = application.mainClass.get()
creationTime = "USE_CURRENT_TIMESTAMP"
jvmFlags = listOf(
"-Djdk.gtk.verbose=true",
"-Djavafx.verbose=true"
)
}
}
tasks.getting(Jar::class) {
manifest {
attributes(mapOf("Main-Class" to application.mainClass.get()))
}
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
val test by tasks.getting(Test::class) {
useJUnitPlatform { }
}