forked from sonar-intellij-plugin/sonar-intellij-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
55 lines (46 loc) · 1.7 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
plugins {
id "org.jetbrains.intellij" version "0.3.12"
id "org.sonarqube" version "2.5"
}
apply plugin: 'org.jetbrains.intellij'
apply plugin: 'java'
apply plugin: 'idea'
targetCompatibility = 1.8
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
version = '2.5.1'
intellij {
version '2018.2'
}
dependencies {
compile 'org.sonarsource.sonarqube:sonar-ws:6.5'
compile 'org.javassist:javassist:3.17.1-GA'
compile 'com.google.code.gson:gson:2.2.4'
compile 'joda-time:joda-time:2.3'
testCompile 'org.easytesting:fest-assert:1.4'
}
tasks.withType(JavaCompile) {
it.options.encoding = 'UTF-8'
}
idea {
project.ipr.beforeMerged { project ->
project.modulePaths.clear()
}
workspace.iws.withXml {
def runManagerComponent = it.node.component.find {
it.@name == 'RunManager'
}
runManagerComponent.@selected = 'Plugin.run-sonar-plugin'
def configuration = runManagerComponent.appendNode("configuration", [default: "false", name: "run-sonar-plugin", type: "#org.jetbrains.idea.devkit.run.PluginConfigurationType", factoryName: "Plugin", singleton: "true"])
configuration.appendNode("module", [name: 'sonar-intellij-plugin'])
configuration.appendNode("option", [name: "VM_PARAMETERS", value: "-Xms128m -Xmx750m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=96m -XX:+UseCompressedOops"])
configuration.appendNode("option", [name: "PROGRAM_PARAMETERS", value: ""])
configuration.appendNode("method")
}
module.iml.withXml {
it.node.@type = 'PLUGIN_MODULE'
it.node.appendNode('component', [name: 'DevKit.ModuleBuildProperties', url: 'file://$MODULE_DIR$/META-INF/plugin.xml'])
}
}