-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
67 lines (53 loc) · 1.93 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
import java.io.FileInputStream
import java.io.FileOutputStream
import java.io.ByteArrayOutputStream
import java.util.*
plugins {
java
id("io.quarkus")
id("com.github.jmongard.git-semver-plugin") version "0.4.2"
}
repositories {
mavenLocal()
mavenCentral()
}
val quarkusPlatformGroupId: String by project
val quarkusPlatformArtifactId: String by project
val quarkusPlatformVersion: String by project
dependencies {
implementation(enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}"))
implementation("io.quarkus:quarkus-picocli")
implementation("io.quarkus:quarkus-arc")
implementation("com.jayway.jsonpath:json-path:2.7.0")
implementation ("com.fasterxml.jackson.core:jackson-core:2.13.1")
implementation ("com.fasterxml.jackson.core:jackson-databind:2.13.1")
implementation ("com.fasterxml.jackson.core:jackson-annotations:2.13.1")
testImplementation("io.quarkus:quarkus-junit5:2.4.1.Final")
}
group = "com.katacoda"
project.version = project.findProperty("ciSemVer") ?: semver.version
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
tasks {
withType<JavaCompile> {
options.encoding = "UTF-8"
options.compilerArgs.add("-parameters")
}
val addGradleProperties by creating {
description = "Write project properties to application properties."
doLast {
val properties = Properties()
properties.load(FileInputStream(file("build/resources/main/application.properties")))
properties.setProperty("project.version", project.version.toString())
properties.store(FileOutputStream("build/resources/main/application.properties"), null)
}
}
processResources { finalizedBy("addGradleProperties") }
val ver by creating {
doLast {
println("Version is " + project.version)
}
}
}