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
27 changes: 19 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ buildscript {

apply plugin: 'com.android.fused-library'
apply plugin: 'com.vanniktech.maven.publish'
apply from: "$projectDir/gradle/jacoco-root.gradle"
if (rootProject.name == 'android-client') {
apply from: "$projectDir/gradle/jacoco-root.gradle"
} else {
logger.lifecycle("Skipping android-client root JaCoCo config in nested build: ${rootProject.name}")
}

ext {
splitVersion = '5.5.0'
Expand Down Expand Up @@ -135,13 +139,20 @@ repositories {
}

dependencies {
include project(':main')
include project(':logger')
include project(':events')
include project(':events-domain')
include project(':api')
include project(':http-api')
include project(':http')
def resolveProjectPath = { String moduleName ->
def nestedPath = (project.path != ':') ? "${project.path}:${moduleName}" : null
def candidates = [":${moduleName}", nestedPath].findAll { it != null }
return candidates.find { findProject(it) != null }
}

['main', 'logger', 'events', 'events-domain', 'api', 'http-api', 'http'].each { moduleName ->
def resolvedPath = resolveProjectPath(moduleName)
if (resolvedPath != null) {
include project(resolvedPath)
} else {
logger.lifecycle("Skipping fused include for '${moduleName}' because no matching project path was found.")
}
}
}

def javadocSourceProjects = providers.provider {
Expand Down
6 changes: 4 additions & 2 deletions gradle/common-android-library.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,7 @@ if (kotlinCompileClass != null) {
}
}

// Enable Jacoco coverage configuration for all Android library modules
apply from: "$projectDir/../gradle/jacoco-android.gradle"
// Enable JaCoCo only for standalone android-client builds.
if (rootProject.name == 'android-client') {
apply from: "$projectDir/../gradle/jacoco-android.gradle"
}
Loading