-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
86 lines (70 loc) · 1.71 KB
/
build.gradle
File metadata and controls
86 lines (70 loc) · 1.71 KB
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
plugins {
id 'java'
id 'jacoco'
id "com.github.sakata1222.jacoco-markdown" version "1.4.0"
id 'groovy'
}
group = 'com.vrerv.scriptengine.simple-script-engine'
version = '0.2.1'
sourceCompatibility = 17
targetCompatibility = 17
repositories {
mavenLocal()
mavenCentral()
maven {
url = 'https://jitpack.io'
}
}
ext {
runJitpack = findProperty('runJitpack') ?: false
}
sourceSets {
test {
java {
srcDirs = ['src/test/java']
}
resources {
srcDirs = ['src/test/resources']
}
}
}
test {
useJUnitPlatform()
}
jacoco {
toolVersion = '0.8.8'
}
jacocoTestReportMarkdown {
outputMd file("./test-coverage.md")
}
test.finalizedBy jacocoTestReport
dependencies {
// lombok
def lombokVersion = '1.18.32'
compileOnly "org.projectlombok:lombok:$lombokVersion"
testCompileOnly "org.projectlombok:lombok:$lombokVersion"
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion"
// end lombok
implementation 'org.slf4j:slf4j-api:1.7.32'
// --- Test dependencies --- //
testImplementation 'org.jacoco:org.jacoco.core:0.8.8'
def junitVersion = '5.8.1'
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testImplementation "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
testImplementation "org.junit.jupiter:junit-jupiter-params:$junitVersion"
// publishing to jitpack
if (runJitpack) implementation "com.github.vrerv:simple-script-engine:$version"
}
tasks.register('generateVersionFile') {
doLast {
file("$buildDir/generated/engine.version").text = project.version.toString()
}
}
processResources {
dependsOn 'generateVersionFile'
from("$buildDir/generated") {
include 'engine.version'
into 'generated'
}
}