-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
84 lines (70 loc) · 2.17 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
// Add idea plugin version
plugins {
id 'java'
id 'idea'
id 'org.jetbrains.intellij' version '1.13.3'
}
// Add coverage plugin
apply plugin: "jacoco"
apply plugin: 'org.jetbrains.intellij'
apply plugin: 'java'
// Add plugin group and version
group "com.dubreuia"
version "2.6.7"
// Add build script repository to maven central
repositories {
mavenCentral()
}
// Add dependencies to test, junit5 api (annotations) and engine (runtime)
dependencies {
testImplementation platform('org.junit:junit-bom:5.9.0'),
'org.junit.jupiter:junit-jupiter',
'org.junit.jupiter:junit-jupiter-engine',
'org.assertj:assertj-core:3.23.1'
testRuntimeOnly("org.junit.platform:junit-platform-launcher") {
because("Only needed to run tests in a version of IntelliJ IDEA that bundles older versions")
}
}
// Add intellij task configuration for base intellij version (minimum compatibility)
// This needs to fit the tag <idea-version since-build="xxx"> in plugin.xml
// See https://www.jetbrains.com/intellij-repository/snapshots
// See https://www.jetbrains.com/intellij-repository/releases
intellij {
version = "2023.1"
// version = "LATEST-EAP-SNAPSHOT"
type = "IC"
plugins = ["java"]
pluginName = "Save Action Tool"
// Do not touch the plugin.xml file
updateSinceUntilBuild = false
}
listProductsReleases {
sinceBuild = "231.*"
}
// JAVA compatibility
compileJava {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
compileJava.options.encoding = 'UTF-8'
compileJava.options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
compileTestJava.options.encoding = 'UTF-8'
// Activate junit since gradle 4.7
test {
useJUnitPlatform()
}
// Add resources directory because intellij test framework checks there for test resources (instead of build/resources)
sourceSets {
test.output.resourcesDir = "build/classes/java/resources"
}
// Add jacoco test report for codecov
jacocoTestReport {
reports {
xml.required = true
html.required = false
}
}
wrapper() {
gradleVersion = '7.5.1'
distributionUrl = distributionUrl.replace('bin', 'all')
}