class InstantRunAnalyticsHelper {

    @NonNull
    public static InstantRunStatus generateAnalyticsProto(
            @NonNull InstantRunBuildContext buildContext) {
        InstantRunStatus.Builder builder = InstantRunStatus.newBuilder();

        builder.setBuildMode(convert(buildContext.getBuildMode()));
        builder.setPatchingPolicy(convert(buildContext.getPatchingPolicy()));
        builder.setVerifierStatus(convert(buildContext.getVerifierResult()));

        InstantRunBuildContext.Build last = buildContext.getLastBuild();
        if (last != null) {
            for (InstantRunBuildContext.Artifact artifact : last.getArtifacts()) {
                builder.addArtifact(
                        InstantRunArtifact.newBuilder().setType(convert(artifact.getType())));
            }
        }
        return builder.build();
    }

    private  InstantRunAnalyticsHelper();

}