Skip to content

Commit 2461537

Browse files
committed
add a warning when the dependency jar is not found
1 parent 06f2ac1 commit 2461537

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

test-app/app/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,13 +536,16 @@ afterEvaluate { project ->
536536
def dependentProjects = projectDependencies*.dependencyProject
537537
dependentProjects.findAll {
538538
// if there's a project dependency search for its result jar file in the build/intermediates/runtime_library_classes folder
539+
// this is the output folder in gradle 5.1.1, but it can be changed in the future versions of gradle
539540
def jarDir = new File("${it.getBuildDir()}/intermediates/runtime_library_classes/${buildType.toLowerCase()}")
540541
if(jarDir.exists()) {
541542
jarDir.eachFileRecurse(FileType.FILES) { file ->
542543
if (file.path.endsWith(".jar")) {
543544
processJar(file, jars)
544545
}
545546
}
547+
} else {
548+
println "WARNING: Folder ${jarDir.path} does not exists, the dependent project's classess won't be included in the metadata"
546549
}
547550
}
548551
}

0 commit comments

Comments
 (0)