public void createExternalNativeBuildJsonGenerators(@NonNull VariantScope scope) { CoreExternalNativeBuild externalNativeBuild = extension.getExternalNativeBuild(); ExternalNativeBuildTaskUtils.ExternalNativeBuildProjectPathResolution pathResolution = ExternalNativeBuildTaskUtils.getProjectPath(externalNativeBuild); if (pathResolution.errorText != null) { androidBuilder.getErrorReporter().handleSyncError( scope.getVariantConfiguration().getFullName(), SyncIssue.TYPE_EXTERNAL_NATIVE_BUILD_CONFIGURATION, pathResolution.errorText); return; } if (pathResolution.makeFile == null) { // No project return; } scope.setExternalNativeJsonGenerator(ExternalNativeJsonGenerator.create( project.getProjectDir(), pathResolution.buildSystem, pathResolution.makeFile, androidBuilder, sdkHandler, scope )); }