forked from ExpediaGroup/graphql-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
89 lines (78 loc) · 2.23 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import io.gitlab.arturbosch.detekt.detekt
import java.util.Properties
plugins {
kotlin("jvm")
id("org.jlleitschuh.gradle.ktlint")
id("io.gitlab.arturbosch.detekt")
}
allprojects {
buildscript {
repositories {
mavenCentral()
mavenLocal {
content {
includeGroup("com.expediagroup")
}
}
}
}
repositories {
mavenCentral()
mavenLocal {
content {
includeGroup("com.expediagroup")
}
}
}
}
subprojects {
val properties = Properties()
properties.load(File(rootDir.parent, "gradle.properties").inputStream())
for ((key, value) in properties) {
this.ext[key.toString()] = value
}
val icuVersion: String by project
val junitVersion: String by project
val kotlinVersion: String by project
val kotlinCoroutinesVersion: String by project
val detektVersion: String by project
val ktlintVersion: String by project
apply(plugin = "kotlin")
apply(plugin = "io.gitlab.arturbosch.detekt")
apply(plugin = "org.jlleitschuh.gradle.ktlint")
dependencies {
implementation(kotlin("stdlib", kotlinVersion))
implementation(kotlin("reflect", kotlinVersion))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$kotlinCoroutinesVersion")
implementation("com.ibm.icu:icu4j:$icuVersion")
testImplementation(kotlin("test-junit5", kotlinVersion))
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
testImplementation("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = listOf("-Xjsr305=strict")
}
}
tasks {
detekt {
toolVersion = detektVersion
config = files(File(rootDir.parent, "detekt.yml").absolutePath)
}
ktlint {
version.set(ktlintVersion)
}
jar {
enabled = false
}
test {
useJUnitPlatform()
}
}
}
tasks {
jar {
enabled = false
}
}