Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import org.gradle.testing.jacoco.tasks.JacocoReport
import org.neotech.plugin.rootcoverage.utilities.afterAndroidPluginApplied
import org.neotech.plugin.rootcoverage.utilities.fileTree
import org.neotech.plugin.rootcoverage.utilities.onVariant
import java.io.File

class RootCoveragePlugin : Plugin<Project> {

Expand Down Expand Up @@ -119,7 +120,11 @@ class RootCoveragePlugin : Plugin<Project> {
private fun JacocoReport.addSubProject(subProject: Project) {
subProject.afterAndroidPluginApplied(
notFoundAction = {
subProject.logger.info("Note: Skipping code coverage for module '${subProject.name}', reason: not an Android module.")
// Only log if a build.gradle file was found in the project directory, if not it could just be an empty project that holds
// child-projects
if (File(subProject.projectDir, Project.DEFAULT_BUILD_FILE).exists()) {
subProject.logger.info("Note: Skipping code coverage for module '${subProject.name}', reason: not an Android module.")
}
},
action = {
subProject.applyJacocoPluginIfRequired()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
plugins {
id "java-library"
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package org.neotech.library.nested.java;

public class Stub {
}
2 changes: 1 addition & 1 deletion plugin/src/test/test-fixtures/multi-module/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ dependencyResolutionManagement {
}
}

include ':app', ':library_android', ':library_java'
include ':app', ':library_android', ':library_java', ':library_nested:java'