@NonNull public Collection<NativeBuildConfigValue> readExistingNativeBuildConfigurations() throws IOException { List<File> files = getNativeBuildConfigurationsJsons(); diagnostic("reading %s JSON files", files.size()); List<NativeBuildConfigValue> result = Lists.newArrayList(); List<File> existing = Lists.newArrayList(); for(File file : files) { if (file.exists()) { diagnostic("reading JSON file %s", file.getAbsolutePath()); existing.add(file); } else { // If the tool didn't create the JSON file then create fallback with the // information we have so the user can see partial information in the UI. diagnostic("using fallback JSON for %s", file.getAbsolutePath()); NativeBuildConfigValue fallback = new NativeBuildConfigValue(); fallback.buildFiles = Lists.newArrayList(makefile); result.add(fallback); } } result.addAll(ExternalNativeBuildTaskUtils.getNativeBuildConfigValues( existing, variantName)); return result; }
.getNativeBuildConfigValues( existingJsons, checkNotNull(getVariantName())); List<String> cleanCommands = Lists.newArrayList();
diagnostic("reading expected JSONs"); Collection<NativeBuildConfigValue> configValueList = ExternalNativeBuildTaskUtils .getNativeBuildConfigValues( nativeBuildConfigurationsJsons, getVariantName()); diagnostic("done reading expected JSONs");