You can get line-by-line coverage for both Java and Kotlin code by defining the two different directories for generated .class files:
def debugTree = fileTree(dir: "${buildDir}/intermediates/classes/debug", excludes: fileFilter)
def kotlinDebugTree = fileTree(dir: "${buildDir}/tmp/kotlin-classes/debug", excludes: fileFilter)
Then, simply include both fileTrees in your classDirectories:
classDirectories.from = files([debugTree], [kotlinDebugTree])
Related Contents:
- Android test code coverage with JaCoCo Gradle plugin
- Android Kotlin: Getting a FileNotFoundException with filename chosen from file picker?
- Singleton object becomes null after app is resumed
- Android Room – simple select query – Cannot access database on the main thread
- ListAdapter not updating item in RecyclerView
- startForeground fail after upgrade to Android 8.1
- Unresolved reference – activity does not recognize synthetic imports in android studio v4
- How to create empty constructor for data class in Kotlin Android
- RecyclerView itemClickListener in Kotlin
- How can we have searched characters colored when we use searchview in recyclerview?
- Opening Android Settings programmatically
- How can I represent a “many to many” relation with Android Room when column names are same?
- Error:Execution failed for task ‘:app:compileDebugKotlin’. > Compilation error. See log for more details
- activeNetworkInfo.type is deprecated in API level 28
- NullPointerException when trying to access views in a Kotlin fragment
- Android – How to achieve setOnClickListener in Kotlin?
- Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException
- Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6
- Default interface methods are only supported starting with Android 7.0 (Nougat)
- HTTP Request in Android with Kotlin
- android.view.View.systemUiVisibility deprecated. What is the replacement?
- How to fix ERROR: No signature of method: build_ap86oam3dut3pxce3x49rdtma.android()?
- How to call a function after delay in Kotlin?
- Notify Observer when item is added to List of LiveData
- Room Persistence: Error:Entities and Pojos must have a usable public constructor
- Cannot find symbol DataBindingComponent on Android Studio 3.2 Canary 16 Kotlin project
- Why the view keeps flashing when using jetpack navigation with Compose?
- A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
- Android Room – Select query with LIKE
- Singleton with parameter in Kotlin
- How do I get a jacoco coverage report using Android gradle plugin 0.10.0 or higher?
- Convert string into LocalDateTime
- The ‘kotlin-android-extensions’ Gradle plugin is deprecated
- “Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16”
- Kotlin and Firebase read and write data
- No Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator
- Error: Execution failed for task ‘:app:clean’. Unable to delete file
- Error:Execution failed for task ‘:app:kaptDebugKotlin’
- Android : Permissions check for BLE [closed]
- Outdated Kotlin Runtime warning in Android Studio
- How to use Data Binding and Kotlin in Android Studio 3.0.0
- Why a new ViewModel is created in each Compose Navigation route?
- Kotiln: pass data from adapter to activity
- Can’t create new Kotlin project after updating to Android Studio 4.2
- How to create a simple countdown timer in Kotlin?
- Kotlin Android debounce
- kotlin-stdlib-jre7 is deprecated. Please use kotlin-stdlib-jdk7 instead
- How to implement timer with Kotlin coroutines
- How to save enum field in the database room?
- Jetpack Compose Smart Recomposition