-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
81 lines (66 loc) · 1.75 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
buildscript {
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.github.SurpSG:code-lines-counter-gradle-plugin:0.0.1'
}
}
plugins {
id 'java-gradle-plugin'
id 'org.jetbrains.kotlin.jvm' version '1.5.21'
id 'maven-publish'
id 'jacoco'
id "pl.droidsonroids.jacoco.testkit" version "1.0.8"
}
apply plugin: 'com.github.code-lines'
group 'com.github'
version '0.0.1'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
testImplementation 'junit:junit:4.12'
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
gradlePlugin {
plugins {
simplePlugin {
id = 'com.github.code-lines'
implementationClass = 'com.github.CodeLinesCounterPlugin'
}
}
}
sourceSets {
functionalTest {
kotlin.srcDir file('src/funcTests/kotlin')
resources.srcDir file('src/funcTests/resources')
compileClasspath += sourceSets.main.output + configurations.testRuntimeClasspath
runtimeClasspath += output + compileClasspath
}
}
task functionalTest(type: Test) {
description = 'Runs the functional tests.'
group = 'verification'
testClassesDirs = sourceSets.functionalTest.output.classesDirs
classpath = sourceSets.functionalTest.runtimeClasspath
dependsOn += generateJacocoTestKitProperties
}
check.dependsOn functionalTest
jacocoTestKit {
applyTo("functionalTestRuntimeOnly", tasks.named("functionalTest"))
}
jacocoTestReport {
reports.html.enabled = true
executionData.setFrom fileTree(buildDir).include("/jacoco/*.exec")
}
jacoco {
toolVersion = '0.8.7'
}