-
Notifications
You must be signed in to change notification settings - Fork 179
/
build.gradle.kts
83 lines (73 loc) · 2.03 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
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
plugins {
kotlin("jvm")
id("org.jetbrains.intellij")
}
val buildMatrix = mapOf(
"AS35" to ij.BuildConfig(
"191.8026.42",
"Studio3.5",
"AS34",
ij.VersionRange("191.8026", "191.8026.*"),
arrayOf("org.jetbrains.kotlin:1.3.30-release-Studio3.5-1")
),
"AS36" to ij.BuildConfig(
"192.7142.36",
"Studio3.6",
"AS34",
ij.VersionRange("192.7142.36", "192.7142.36.*"),
arrayOf("android", "java", "org.jetbrains.kotlin:1.3.61-release-Studio3.6-1")
),
"AS40" to ij.BuildConfig(
"193.6911.18",
"Studio4.0",
"AS34",
ij.VersionRange("193.6911.18", "193.6911.18.*"),
arrayOf("android", "java", "org.jetbrains.kotlin:1.3.70-release-Studio4.0-1")
),
"AS41" to ij.BuildConfig(
"201.7223.91",
"Studio4.1",
"AS34",
ij.VersionRange("201.8743.12", "201.8743.12.*"),
arrayOf("android", "java", "org.jetbrains.kotlin:1.3.72-release-Studio4.1-5")
)
)
val sdkVersion = project.properties["as.version"] ?: "AS40"
val settings = checkNotNull(buildMatrix[sdkVersion])
intellij {
pluginName = "Spek Framework"
val plugins = arrayOf("gradle", "android") + settings.deps
setPlugins(*plugins)
version = settings.sdk
}
sourceSets {
main {
withConvention(KotlinSourceSet::class) {
kotlin.srcDirs("src/${settings.extraSource}/kotlin")
}
}
}
dependencies {
compile(project(":spek-ide-plugin-intellij-base-jvm"))
compileOnly(kotlin("stdlib"))
}
tasks {
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
buildPlugin {
archiveBaseName.value("")
archiveVersion.value("${project.version}-${settings.prefix}")
}
patchPluginXml {
setVersion("${project.version}-${settings.prefix}")
setSinceBuild(settings.version.since)
setUntilBuild(settings.version.until)
}
}
apply {
plugin("publish-plugin")
}