class CmakeServerExternalNativeJsonGenerator extends CmakeExternalNativeJsonGenerator {

    @VisibleForTesting
    static String getAndroidGradleFileLibFlags(
            @NonNull String fileName, @NonNull List<CompileCommand> compileCommands) {
        String flags = null;

        // Get the path of the given file name so we can compare it with the file specified within
        // CompileCommand.
        Path fileNamePath = Paths.get(fileName);

        // Search for the CompileCommand for the given file and parse the flags used to compile the
        // file.
        for (CompileCommand compileCommand : compileCommands) {
            if (compileCommand.command == null || compileCommand.file == null) {
                continue;
            }

            if (fileNamePath.compareTo(Paths.get(compileCommand.file)) != 0) {
                continue;
            }

            flags =
                    compileCommand.command.substring(
                            compileCommand.command.indexOf(' ') + 1,
                            compileCommand.command.indexOf(fileName));
            break;
        }
        return flags;
    }

    public  CmakeServerExternalNativeJsonGenerator(
            @NonNull JsonGenerationVariantConfiguration config,
            @NonNull Set<String> configurationFailures,
            @NonNull AndroidBuilder androidBuilder,
            @NonNull File cmakeFolder,
            @NonNull GradleBuildVariant.Builder stats);

}