forked from izhangzhihao/intellij-rainbow-brackets
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
113 lines (92 loc) · 3.11 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
buildscript {
repositories {
mavenLocal()
gradlePluginPortal()
maven { url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
plugins {
id "org.jetbrains.intellij" version "0.4.2"
id "com.adarshr.test-logger" version "1.6.0"
id "de.undercouch.download" version "3.4.2"
}
testlogger {
theme 'mocha'
}
repositories {
mavenLocal()
maven { url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
}
apply plugin: "idea"
apply plugin: "kotlin"
apply plugin: "org.jetbrains.intellij"
apply plugin: "jacoco"
intellij {
pluginName name
version ideaVersion
downloadSources Boolean.valueOf(downloadIdeaSources)
updateSinceUntilBuild = false
sandboxDirectory project.rootDir.canonicalPath + "/.sandbox"
plugins "org.jetbrains.kotlin:$kotlinVersion-release-IJ2017.2-1", 'org.intellij.scala:2017.2.7', 'JavaScriptLanguage', 'CSS', 'Dart:172.3317.48', 'Groovy', 'properties', 'org.jetbrains.plugins.ruby:2017.2.20170906', 'com.jetbrains.php:172.4155.41', 'java-i18n'
}
publishPlugin {
def publishPassword = "$System.env.publishPassword"
username publishUsername
password publishPassword
channels publishChannels
}
idea {
project {
jdkName = javaVersion
languageLevel = javaVersion
}
}
dependencies {
testCompile("io.kotlintest:kotlintest:2.0.7")
}
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
jar.archiveName = "intellij-rainbow-brackets.jar"
[compileKotlin, compileTestKotlin]*.kotlinOptions {
languageVersion = kotlinLanguageVersion
apiVersion = kotlinTargetVersion
jvmTarget = javaVersion
freeCompilerArgs = ["-Xskip-runtime-version-check"]
}
jacocoTestReport {
reports {
xml.enabled true
csv.enabled false
html.enabled true
}
}
check.dependsOn jacocoTestReport
def verifierVersion = "1.200"
task downloadIntellijPluginVerifier(type: Download) {
src "https://dl.bintray.com/jetbrains/intellij-plugin-service/org/jetbrains/intellij/plugins/verifier-cli/$verifierVersion/verifier-cli-$verifierVersion-all.jar"
dest buildDir
overwrite false
}
task verifyPluginCompatibility(type: Exec, dependsOn: ['downloadIntellijPluginVerifier']) {
workingDir buildDir
executable "sh"
args "-c", "java -jar verifier-cli-$verifierVersion-all.jar check-plugin distributions/*.zip ~/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2017.2/5155889067278eb216234aa0eeb8e1944644624c/ideaIC-2017.2"
}
jacocoTestReport {
afterEvaluate {
classDirectories.setFrom(
files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
'**/settings/**'
])
})
)
}
}
check.dependsOn verifyPluginCompatibility
check.dependsOn verifyPlugin