-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
37 lines (30 loc) · 1.05 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
import java.text.SimpleDateFormat
import java.util.*
repositories {
mavenCentral()
}
plugins {
kotlin("jvm") version "1.9.23"
}
val groupId = "teamcity-rust-plugin"
val javaVersion = JavaVersion.VERSION_11
extra["teamcityVersion"] = project.findProperty("teamcityVersion") ?: "2020.2"
extra["downloadsDir"] = project.findProperty("downloads.dir") ?: "$rootDir/downloads"
extra["serversDir"] = project.findProperty("servers.dir") ?: "$rootDir/servers"
group = groupId
@Suppress("SpellCheckingInspection")
version = project.findProperty("versionNumber")
?.takeIf { Regex("""\d+\.\d+\.\d+.*""").matches(it as String) }
?: ("SNAPSHOT-" + SimpleDateFormat("yyyyMMddHHmmss").format(Date()))
allprojects {
group = groupId
tasks.withType<JavaCompile>().configureEach {
sourceCompatibility = javaVersion.toString()
targetCompatibility = javaVersion.toString()
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = javaVersion.toString()
}
}
}