-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
94 lines (75 loc) · 2.4 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
plugins {
id 'java'
id 'jacoco'
id 'org.jetbrains.intellij' version '1.6.0'
id 'org.jetbrains.kotlin.jvm' version '1.6.21'
id 'org.jetbrains.kotlin.kapt' version '1.6.21'
}
group 'com.madrapps'
version '0.3.2022.2.0'
jacoco {
toolVersion '0.8.6'
}
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
jacoco.excludes = ['jdk.internal.*']
}
repositories {
mavenCentral()
maven { url "https://maven.google.com/" }
}
intellij {
version = '2022.2'
plugins = ['Kotlin', 'java', 'android']
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation 'com.google.dagger:dagger:2.31.2'
implementation 'com.google.dagger:dagger-compiler:2.31.2'
implementation 'com.google.dagger:dagger-android-processor:2.31.2'
implementation group: 'com.google.dagger', name: 'dagger-spi', version: '2.31.2'
testImplementation group: 'junit', name: 'junit', version: '4.12'
testImplementation fileTree(include: ['*.jar'], dir: 'libs')
kaptTest fileTree(include: ['*.jar'], dir: 'libs')
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"]
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"]
}
}
test {
systemProperty "idea.home.path", "${System.env.IDE_SOURCES}"
}
tasks.create(name: "testCoverage", type: JacocoReport, dependsOn: "test") {
group = "Reporting"
description = "Generate Jacoco coverage reports for the test build."
reports {
html.enabled = true
xml.enabled = true
}
def excludes = [
'**/*Test*.*',
'**/actions/*.*',
'**/core/*.*',
'**/markers/*.*',
'**/services/**/*.*',
'**/toolwindow/*.*',
'**/utils/*.*'
]
def javaClasses = fileTree(dir: "${buildDir}/classes/java/main-instrumented", excludes: excludes)
def kotlinClasses = fileTree(dir: "${buildDir}/classes/kotlin/main", excludes: excludes)
classDirectories.from = files([javaClasses, kotlinClasses])
sourceDirectories.from = files([
"$project.projectDir/src/main/java",
"$project.projectDir/src/main/kotlin",
"$buildDir/generated/source/kapt/test"
])
executionData.from = files("${project.buildDir}/jacoco/test.exec")
}