mirror of
https://github.com/melihaksoy/Android-Kotlin-Modulerized-CleanArchitecture.git
synced 2026-03-19 16:21:29 +01:00
Milestones/ms1 (#16)
* Closes #11 * Closes #13 * Closes #17 * Closes #18 * Closes #19 * Closes #6 * Closes #3 * Closes #12 * Closes #15
This commit is contained in:
committed by
Melih Aksoy
parent
11889446cb
commit
625776609d
@@ -1,4 +1,5 @@
|
||||
apply plugin: "de.mannodermaus.android-junit5"
|
||||
|
||||
apply from: "$rootProject.projectDir/scripts/detekt.gradle"
|
||||
apply from: "$rootProject.projectDir/scripts/dokka.gradle"
|
||||
|
||||
@@ -17,3 +18,57 @@ dependencies {
|
||||
|
||||
testRuntimeOnly testLibraries.jUnitEngine
|
||||
}
|
||||
|
||||
apply plugin: 'jacoco'
|
||||
|
||||
jacoco {
|
||||
toolVersion = "0.8.1"
|
||||
reportsDir = file("$rootProject.projectDir/reports/jacoco/$project.name")
|
||||
}
|
||||
|
||||
task jacocoTestReport(type: JacocoReport, dependsOn: "testDebugUnitTest") {
|
||||
group = "Reporting"
|
||||
description = "Generate Jacoco coverage reports for Debug build"
|
||||
|
||||
reports {
|
||||
xml.enabled = true
|
||||
html.enabled = true
|
||||
}
|
||||
|
||||
// what to exclude from coverage report
|
||||
// UI, "noise", generated classes, platform classes, etc.
|
||||
def excludes = [
|
||||
'**/R.class',
|
||||
'**/R$*.class',
|
||||
'**/*$ViewInjector*.*',
|
||||
'**/BuildConfig.*',
|
||||
'**/Manifest*.*',
|
||||
'**/*Test*.*',
|
||||
'android/**/*.*',
|
||||
'**/*Fragment.*',
|
||||
'**/*Activity.*'
|
||||
]
|
||||
|
||||
// generated classes
|
||||
getClassDirectories().setFrom(
|
||||
fileTree(
|
||||
dir: "$buildDir/intermediates/classes/debug",
|
||||
excludes: excludes
|
||||
) + fileTree(
|
||||
dir: "$buildDir/tmp/kotlin-classes/debug",
|
||||
excludes: excludes
|
||||
)
|
||||
)
|
||||
|
||||
// sources
|
||||
getSourceDirectories().setFrom(
|
||||
files([
|
||||
android.sourceSets.main.java.srcDirs,
|
||||
"src/main/kotlin"
|
||||
])
|
||||
)
|
||||
|
||||
getExecutionData().setFrom(
|
||||
files("$buildDir/jacoco/testDebugUnitTest.exec")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ ext {
|
||||
supportLibraryVersion : "28.0.0",
|
||||
appCompatVersion : "1.1.0-alpha04",
|
||||
lifecycleVersion : "2.2.0-alpha02",
|
||||
fragmentVersion : "1.1.0-beta01",
|
||||
fragmentVersion : "1.2.0-alpha01",
|
||||
workManagerVersion : "2.1.0-alpha03",
|
||||
constraintLayoutVesion: "2.0.0-beta1",
|
||||
cardViewVersion : "1.0.0",
|
||||
@@ -22,7 +22,7 @@ ext {
|
||||
retrofitVersion : "2.6.0",
|
||||
picassoVersion : "2.71828",
|
||||
moshiVersion : "1.8.0",
|
||||
coroutinesVersion : "1.3.0-M1",
|
||||
coroutinesVersion : "1.3.0-M2",
|
||||
leakCanaryVersion : "2.0-alpha-2",
|
||||
timberVersion : "4.7.1",
|
||||
jUnitVersion : "5.5.0",
|
||||
@@ -127,6 +127,7 @@ ext {
|
||||
"com.google.dagger:dagger-compiler:${versions.daggerVersion}",
|
||||
"com.google.dagger:dagger-android-processor:${versions.daggerVersion}"
|
||||
],
|
||||
moshi : "com.squareup.moshi:moshi-kotlin-codegen:${versions.moshiVersion}"
|
||||
]
|
||||
|
||||
testLibraries = [
|
||||
|
||||
@@ -11,6 +11,7 @@ dependencies {
|
||||
|
||||
implementation libraries.fragment
|
||||
implementation libraries.lifecycle
|
||||
implementation libraries.liveDataKTX
|
||||
implementation libraries.navigation
|
||||
implementation libraries.constraintLayout
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ android {
|
||||
debug {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
testCoverageEnabled = true
|
||||
}
|
||||
|
||||
dev {
|
||||
|
||||
@@ -12,5 +12,6 @@ android {
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
freeCompilerArgs += "-Xuse-experimental=kotlin.Experimental"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user