forked from JetBrains/ideavim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
88 lines (76 loc) · 1.92 KB
/
build.gradle
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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
plugins {
id 'org.jetbrains.intellij' version '0.4.9'
}
apply plugin: 'java'
apply plugin: 'kotlin'
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }
sourceSets {
main {
java.srcDir 'src'
resources.srcDir 'resources'
}
test {
java.srcDir 'test'
}
}
intellij {
version ideaVersion
pluginName 'IdeaVim'
updateSinceUntilBuild false
downloadSources Boolean.valueOf(downloadIdeaSources)
instrumentCode Boolean.valueOf(instrumentPluginCode)
intellijRepo = "https://www.jetbrains.com/intellij-repository"
if (!Boolean.valueOf(legacyNoJavaPlugin)) {
// Since 192 version of IJ java plugin should be defined separately
// Set `legacyNoJavaPlugin` to true if you are going to run tests under idea version < 192
plugins = ['java']
}
publishPlugin {
channels publishChannels.split(',')
username publishUsername
token publishToken
}
}
repositories {
mavenCentral()
}
dependencies {
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
compileOnly "org.jetbrains:annotations:17.0.0"
}
compileKotlin {
kotlinOptions {
jvmTarget = javaVersion
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = javaVersion
}
}
tasks.register("slackEapNotification") {
doLast {
if (!slackUrl) return
def post = new URL(slackUrl).openConnection()
def message = "{\"text\":\"New EAP released: $version\"}"
post.setRequestMethod("POST")
post.setDoOutput(true)
post.setRequestProperty("Content-Type", "application/json")
post.getOutputStream().write(message.getBytes("UTF-8"))
def postRC = post.getResponseCode()
println(postRC)
if(postRC.equals(200)) {
println(post.getInputStream().getText())
}
}
}