generated from JetBrains/intellij-platform-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
56 lines (47 loc) · 1.51 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
import io.gitlab.arturbosch.detekt.Detekt
fun properties(key: String) = providers.gradleProperty(key)
fun environment(key: String) = providers.environmentVariable(key)
@Suppress("DSL_SCOPE_VIOLATION") // "libs" produces a false-positive warning, see https://youtrack.jetbrains.com/issue/KTIJ-19369
plugins {
java
id(libs.plugins.kotlin.jvm.get().pluginId) version libs.versions.kotlin.get()
alias(libs.plugins.buildconfig) apply false
alias(libs.plugins.detekt)
alias(libs.plugins.serialization) apply false
alias(libs.plugins.changelog)
}
group = properties("pluginGroup").get()
version = properties("pluginVersion").get()
allprojects {
apply {
with(rootProject.libs.plugins) {
listOf(kotlin.jvm, buildconfig, detekt, serialization, changelog).map { it.get().pluginId }.forEach(::plugin)
}
}
repositories {
mavenCentral()
maven("https://packages.jetbrains.team/maven/p/ki/maven")
}
dependencies {
implementation(rootProject.libs.csv)
detektPlugins(rootProject.libs.detekt.formatting)
implementation(rootProject.libs.joda)
implementation(rootProject.libs.kotlin.serialization)
testImplementation(kotlin("test"))
}
tasks {
test {
useJUnit()
}
}
detekt {
buildUponDefaultConfig = true
allRules = false
config = files("$rootDir/config/detekt.yml")
}
}
tasks {
wrapper {
gradleVersion = properties("gradleVersion").get()
}
}