-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsharedconfigs-include.gradle
More file actions
90 lines (79 loc) · 2.48 KB
/
sharedconfigs-include.gradle
File metadata and controls
90 lines (79 loc) · 2.48 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
87
88
89
90
apply plugin: "de.mannodermaus.android-junit5"
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
/**
* To avoid code duplication all common android modules related setup is done here.
* When using it you still have to specify stuff like
*
* apply plugin: 'com.android.application'
*
* or
*
* apply plugin: 'com.android.library
*
* and all the dependencies via
*
* dependencies { ... }*
* -------------------------------
*
* */
android {
buildFeatures {
viewBinding true
}
defaultConfig {
buildToolsVersion buildToolsVer
minSdkVersion minSdkVer
targetSdkVersion targetSdkVer
compileSdkVersion compileSdkVer
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
javaCompileOptions {
annotationProcessorOptions {
arguments = [
"room.schemaLocation" : "$projectDir/schemas".toString(),
"room.incremental" : "true",
"room.expandProjection": "true"
]
}
}
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
// Forcing proper java version across all the builds
compileOptions {
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}
kotlinOptions {
jvmTarget = jvmTargetVer
}
// Uncomment if you're having trouble with version incompatibility
// java {
// toolchain {
// languageVersion = JavaLanguageVersion.of(17)
// }
// }
if (gradle.startParameter.taskNames
.collect { item -> item.contains("UnitTestKotlin") }
.contains(true)) {
kotlinOptions.jvmTarget = jvmTargetVer
}
// Setting reports location for each module and using junit platform
testOptions {
unitTests.all {
jvmArgs '-noverify'
// Always show the result of every unit test, even if it passes.
ignoreFailures = true
// path to the directory in which results will be stored (prefix connected- + modulename)
reports.junitXml.destination = file("../build/connected-$project.name")
}
junitPlatform {
filters {
engines {
include 'junit', 'junit-jupiter'
}
}
jacocoOptions.taskGenerationEnabled = false
}
}
}