build_file_checksums.ser

2018/02/17

The preview versions of Android Studio (Beta and Canary channels) are closed source software. The license of the upstream project, IntelliJ IDEA Community Edition, permits this distribution of derivative works without source code.

Version 3.2 of Android Studio (currently the Canary release) creates a file called .idea/caches/build_file_checksums.ser in your project. A few things are immediately apparent:

There’s no documentation about this file. The current Canary release is like a black box that puts a rock in your shoe. That bugs me.

Anyway, I did some investigation.

Sources for the stable version of the Android Gradle plugin are available, but the ProjectBuildFileChecksums class isn’t present (which is consistent with the stable version not creating this file).

Java serialization data has a lot of metadata. I built this dummy class and tried deserializing the file from an Android app that I’m working on.

package com.android.tools.idea.gradle.project;

import java.io.Serializable;
import java.util.Map;

public class ProjectBuildFileChecksums implements Serializable {

	private static final long serialVersionUID = 4924462801735608105L;

	long myLastGradleSyncTimestamp;
	Map myFileChecksums;

}

The myFileChecksums map contains (String, byte[16]) mappings, for the following keys:

That second entry, with your absolute home directory, is probably what introduces the varying size, with different people using different operating systems and with different usernames.

That checksum’s algorithm? MD5.

My last post was about either Google AMP from the other side or Losing weight in 14 minutes a day with PostgreSQL. Find out which.