forked from ByteLegendQuest/remember-brave-people
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
71 lines (61 loc) · 2.18 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
plugins {
application
checkstyle
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
repositories {
mavenCentral()
}
dependencies {
implementation("com.fasterxml.jackson.core:jackson-databind:2.12.1")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.12.1")
implementation("commons-io:commons-io:2.8.0")
implementation("software.amazon.awssdk:s3:2.17.33")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.0")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.7.0")
testImplementation("org.hamcrest:hamcrest:2.2")
testImplementation("org.mockito:mockito-junit-jupiter:3.7.7")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.0")
}
application {
// Define the main class for the application.
mainClass.set("com.bytelegend.game.CIDataGeneratorJob")
}
tasks.register("dockerBuild") {
dependsOn("installDist")
doLast {
project.exec {
commandLine("docker", "build", ".", "-t", "blindpirate/remember-brave-people")
}
}
}
tasks.test {
if (System.getProperty("includeDockerTest") == "true") {
dependsOn("dockerBuild")
systemProperty("includeDockerTest", "true")
}
useJUnitPlatform()
}
tasks.register<JavaExec>("dailyRun") {
classpath = sourceSets["main"].runtimeClasspath
jvmArgs("-DworkspaceDir=${rootProject.rootDir.absolutePath}")
if (System.getProperty("accessKeyId") != null) {
jvmArgs("-DaccessKeyId=${System.getProperty("accessKeyId")}")
}
if (System.getProperty("accessKeySecret") != null) {
jvmArgs("-DaccessKeySecret=${System.getProperty("accessKeySecret")}")
}
mainClass.set("com.bytelegend.game.CIDailyDataGeneratorJob")
}
tasks.register<JavaExec>("localRun") {
classpath = sourceSets["main"].runtimeClasspath
jvmArgs("-DworkspaceDir=${rootProject.rootDir.absolutePath}")
mainClass.set("com.bytelegend.game.DeveloperLocalDataGeneratorJob")
}
extensions.findByName("buildScan")?.withGroovyBuilder {
setProperty("termsOfServiceUrl", "https://gradle.com/terms-of-service")
setProperty("termsOfServiceAgree", "yes")
}