-
Notifications
You must be signed in to change notification settings - Fork 104
/
build.gradle
124 lines (109 loc) · 3.43 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
114
115
116
117
118
119
120
121
122
123
124
plugins {
id "jacoco"
id "org.jetbrains.intellij" version "0.7.3"
id "com.github.hierynomus.license" version "0.15.0"
id "com.github.gradle-git-version-calculator" version "1.1.0"
id 'net.researchgate.release' version '2.6.0'
id "com.gradle.plugin-publish" version "0.10.1"
id "com.github.spotbugs" version "3.0.0"
id "org.sonarqube" version "2.8"
id 'signing'
}
repositories {
mavenCentral()
}
tasks{
runPluginVerifier {
ideVersions = "2021.1"
}
}
group = "org.wso2.lsp4intellij"
version = gitVersionCalculator.calculateVersion("v")
intellij {
version '2021.1'
type 'IC'
updateSinceUntilBuild false
}
dependencies {
compile group: 'org.eclipse.lsp4j', name: 'org.eclipse.lsp4j', version: '0.15.0'
compile group: 'com.vladsch.flexmark', name: 'flexmark', version: '0.34.60'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
testCompile group: 'junit', name: 'junit', version: '4.13.2'
testCompile group: 'org.mockito', name: 'mockito-core', version: '3.9.0'
testCompile group: 'org.powermock', name: 'powermock-api-mockito2', version: '2.0.9'
testCompile group: 'org.powermock', name: 'powermock-module-junit4', version: '2.0.9'
}
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
}
}
sourceCompatibility = 11
targetCompatibility = 11
license {
header = rootProject.file("resources/license/HEADER.txt")
ext["year"] = Calendar.getInstance().get(Calendar.YEAR)
ext["author"] = "WSO2 Inc. (http://www.wso2.org)"
strictCheck = true
skipExistingHeaders = true
mapping("java", "SLASHSTAR_STYLE")
exclude("/**/*.png")
}
spotbugsMain {
it.effort "max"
it.reportLevel "high"
it.reports {
xml.enabled false
html.enabled true
}
def excludeFile = file('spotbugs-exclude.xml')
if(excludeFile.exists()) {
it.excludeFilter = excludeFile
}
classpath += sourceSets."${(it.name - ~/^spotbugs/).uncapitalize()}".with { it.compileClasspath + project.configurations."${it.compileOnlyConfigurationName}" }
}
spotbugsTest {
it.enabled = false
}
check {
dependsOn(tasks.jacocoTestReport)
}
jacocoTestReport {
reports {
xml.enabled = true
xml.destination = new File("$buildDir/reports/jacoco/test/jacoco.xml")
}
}
sonarqube {
properties {
property("sonar.sourceEncoding", "UTF-8")
property("sonar.host.url", "https://sonarcloud.io")
property("sonar.organization", "ballerina-platform")
property("sonar.projectKey", "ballerina-platform_lsp4intellij")
property("sonar.projectName", "LSP4IntelliJ")
property("sonar.coverage.jacoco.xmlReportPaths", "$buildDir/reports/jacoco/test/jacoco.xml")
}
}
release {
failOnCommitNeeded = true
failOnPublishNeeded = true
failOnSnapshotDependencies = true
failOnUnversionedFiles = true
failOnUpdateNeeded = true
revertOnFail = true
preCommitText = ''
preTagCommitMessage = '[Gradle Release Plugin] - pre tag commit: '
tagCommitMessage = '[Gradle Release Plugin] - creating tag: '
newVersionCommitMessage = '[Gradle Release Plugin] - new version commit: '
tagTemplate = '${version}'
versionPropertyFile = 'gradle.properties'
buildTasks = ['jar']
git {
requireBranch = 'release-stage'
pushToRemote = 'upstream'
commitVersionFileOnly = false
signTag = false
}
}