-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
64 lines (51 loc) · 1.39 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
import nu.studer.gradle.credentials.CredentialsPlugin
import nu.studer.gradle.credentials.domain.CredentialsContainer
import org.jetbrains.intellij.tasks.PublishTask
import org.jetbrains.kotlin.gradle.dsl.Coroutines
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript {
repositories {
jcenter()
}
}
plugins {
kotlin("jvm") version("1.1.60")
id("org.jetbrains.intellij") version("0.2.17")
id("nu.studer.credentials") version("1.0.3")
id("org.jmailen.kotlinter") version("1.5.0")
}
repositories {
jcenter()
}
dependencies {
compileOnly(kotlin("stdlib-jre8"))
compileOnly(kotlin("reflect"))
}
val publishPlugin: PublishTask by tasks
val credentials: CredentialsContainer by extra
val javaVersion = "1.8"
intellij {
version = "2016.1"
updateSinceUntilBuild = false
}
java {
setSourceCompatibility(javaVersion)
setTargetCompatibility(javaVersion)
}
kotlin {
experimental.coroutines = Coroutines.ENABLE
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = javaVersion
}
publishPlugin {
username(credentials["JETBRAINS_USERNAME"])
password(credentials["JETBRAINS_PASSWORD"])
}
apply {
from("gradle/hooks.gradle.kts")
}
group = "net.olegg"
version = "0.1.0-SNAPSHOT"
inline operator fun <T : Task> T.invoke(a: T.() -> Unit): T = apply(a)
operator fun CredentialsContainer.get(key: String) = this.getProperty(key)