forked from Kotlin/kotlinx-datetime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
60 lines (51 loc) · 1.53 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0-rc")
}
}
plugins {
id("kotlinx.team.infra") version "0.1.0-dev-53"
}
project(":kotlinx-datetime") {
pluginManager.apply("kotlin-multiplatform")
// pluginManager.apply("maven-publish")
}
infra {
teamcity {
bintrayUser = "%env.BINTRAY_USER%"
bintrayToken = "%env.BINTRAY_API_KEY%"
}
publishing {
include(":kotlinx-datetime")
bintray {
organization = "kotlin"
repository = "kotlinx"
library = "kotlinx.datetime"
username = findProperty("bintrayUser") as String?
password = findProperty("bintrayApiKey") as String?
}
bintrayDev {
organization = "kotlin"
repository = "kotlin-dev"
library = "kotlinx.datetime"
username = findProperty("bintrayUser") as String?
password = findProperty("bintrayApiKey") as String?
}
}
}
fun jdkPath(version: Int): String {
fun envOrProperty(name: String): String? = System.getenv(name) ?: findProperty(name) as String?
return envOrProperty("JDK_$version") ?:
version.takeIf { it < 9 }?.let { envOrProperty("JDK_1$version") } ?:
error("Specify path to JDK $version in JDK_$version environment variable or Gradle property")
}
//val JDK_6 by ext(jdkPath(6))
val JDK_8 by ext(jdkPath(8))
allprojects {
repositories {
mavenCentral()
}
}