forked from dkandalov/ijkl-shortcuts-plugin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
66 lines (59 loc) · 1.76 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
import org.gradle.api.JavaVersion.VERSION_1_8
import org.gradle.api.internal.HasConvention
import org.jetbrains.intellij.IntelliJPluginExtension
import org.jetbrains.intellij.tasks.RunIdeTask
import org.jetbrains.kotlin.gradle.dsl.Coroutines
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
buildscript {
repositories {
mavenCentral()
maven { setUrl("https://oss.sonatype.org/content/repositories/snapshots/") }
maven { setUrl("http://dl.bintray.com/jetbrains/intellij-plugin-service") }
}
dependencies {
classpath("org.jetbrains.intellij.plugins:gradle-intellij-plugin:0.3.0-SNAPSHOT")
}
}
apply { plugin("org.jetbrains.intellij") }
plugins {
java
idea
kotlin("jvm").version("1.1.1")
}
java {
sourceCompatibility = VERSION_1_8
targetCompatibility = VERSION_1_8
}
repositories {
mavenCentral()
}
java.sourceSets {
"main" {
kotlin.srcDirs("./src")
resources.srcDirs("./resources")
}
"test" {
kotlin.srcDirs("./test")
}
}
tasks.withType<KotlinJvmCompile> {
kotlinOptions {
jvmTarget = "1.8"
apiVersion = "1.0"
languageVersion = "1.0"
}
}
configure<IntelliJPluginExtension> {
val ideVersion = System.getenv().getOrDefault("IJKL_PLUGIN_IDEA_VERSION", "IC-172.3757.29")
println("Using ide version: $ideVersion")
version = ideVersion
pluginName = "ijkl-shortcuts"
downloadSources = true
sameSinceUntilBuild = false
updateSinceUntilBuild = false
}
task(name = "runIdeWithDifferentJvm", type = RunIdeTask::class, configuration = {
setJbreVersion("jbrex8u152b1024.10")
})
val Any.kotlin: SourceDirectorySet get() = withConvention(KotlinSourceSet::class) { kotlin }