From a1ec1891ccec5d6c9b812317d6505aa1a14d101e Mon Sep 17 00:00:00 2001 From: Yong Date: Wed, 16 Nov 2016 12:39:14 +0800 Subject: [PATCH] * fix FreelineInitializer NPE(#300) --- .../groovy/com/antfortune/freeline/FreelineInitializer.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gradle/src/main/groovy/com/antfortune/freeline/FreelineInitializer.groovy b/gradle/src/main/groovy/com/antfortune/freeline/FreelineInitializer.groovy index 96b6685..6020c4a 100644 --- a/gradle/src/main/groovy/com/antfortune/freeline/FreelineInitializer.groovy +++ b/gradle/src/main/groovy/com/antfortune/freeline/FreelineInitializer.groovy @@ -257,7 +257,9 @@ class FreelineInitializer { projectDescription.databinding_modules = [] project.rootProject.allprojects.each { pro -> if (pro.plugins.hasPlugin("com.android.application") || pro.plugins.hasPlugin("com.android.library")) { - if (pro.android.hasProperty("dataBinding") && pro.android.dataBinding.enabled) { + if (pro.android.hasProperty("dataBinding") + && pro.android.dataBinding.enabled + && projectDescription.project_source_sets[pro.name] != null) { def data = [:] String manifestPath = projectDescription.project_source_sets[pro.name].main_manifest_path data.name = pro.name