I updated my Android Studio from 3.0.1 to 3.1, and noticed an unfamiliar file in my existing project:
.idea/caches/build_file_checksums.ser
It doesn't depend on whether you update the Android Gradle plugin to the latest 3.1.0; once I opened an existing project in Android Studio 3.1, it automatically created the file build_file_checksums.ser
, even if I kept the project to use the previous 3.0.1 plugin as follows.
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
I also created a new project in Android Studio 3.1, and found that the file build_file_checksums.ser
was created from the beginning.
At the time of writing, there seems to be no official documents on this. I would appreciate it if anyone could find it.
Edited:
I inspected the content with jdeserialize-1.2, as Samuel pointed out that it seems to include some system paths.
$ java -jar ~/Downloads/jdeserialize-1.2.jar .idea/caches/build_file_checksums.ser
read: com.android.tools.idea.gradle.project.ProjectBuildFileChecksums _h0x7e0002 = r_0x7e0000;
//// BEGIN stream content output
com.android.tools.idea.gradle.project.ProjectBuildFileChecksums _h0x7e0002 = r_0x7e0000;
//// END stream content output
//// BEGIN class declarations (excluding array classes)
class java.util.HashMap implements java.io.Serializable {
float loadFactor;
int threshold;
}
class com.android.tools.idea.gradle.project.ProjectBuildFileChecksums implements java.io.Serializable {
long myLastGradleSyncTimestamp;
java.util.Map myFileChecksums;
}
//// END class declarations
//// BEGIN instance dump
[instance 0x7e0004: 0x7e0003/java.util.HashMap
object annotations:
java.util.HashMap
[blockdata 0x00: 8 bytes]
[String 0x7e0005: "settings.gradle"]
[array 0x7e0007 classdesc [cd 0x7e0006: name [B uid -5984413125824719648]: [arraycoll sz 16 -89, -2, 26, -61, -111, 105, -75, -27, 40, 90, 94, 83, 102, 47, 37, 27]
[String 0x7e0008: "build.gradle"]
[array 0x7e0009 classdesc [cd 0x7e0006: name [B uid -5984413125824719648]: [arraycoll sz 16 70, 101, -14, 32, 100, -60, -85, -103, 73, -86, 15, 54, -45, 125, 50, 39]
[String 0x7e000a: "local.properties"]
[array 0x7e000b classdesc [cd 0x7e0006: name [B uid -5984413125824719648]: [arraycoll sz 16 -107, 64, 60, -33, -18, 18, 56, -84, 15, 0, -86, -73, -27, 127, -94, 27]
[String 0x7e000c: "/Users/qtmfld/.gradle/gradle.properties"]
[array 0x7e000d classdesc [cd 0x7e0006: name [B uid -5984413125824719648]: [arraycoll sz 16 -44, 29, -116, -39, -113, 0, -78, 4, -23, -128, 9, -104, -20, -8, 66, 126]
[String 0x7e000e: "gradle.properties"]
[array 0x7e000f classdesc [cd 0x7e0006: name [B uid -5984413125824719648]: [arraycoll sz 16 16, -69, 118, 80, -49, -19, 41, -8, 56, -86, 64, -63, 112, -14, 98, 47]
[String 0x7e0010: "app/build.gradle"]
[array 0x7e0011 classdesc [cd 0x7e0006: name [B uid -5984413125824719648]: [arraycoll sz 16 -3, -11, 63, -26, 67, -41, -100, 33, 85, -59, -49, -3, -90, 53, -106, 94]
field data:
0x7e0003/java.util.HashMap:
threshold: 12
loadFactor: 0.75
]
[instance 0x7e0002: 0x7e0000/com.android.tools.idea.gradle.project.ProjectBuildFileChecksums
field data:
0x7e0000/com.android.tools.idea.gradle.project.ProjectBuildFileChecksums:
myFileChecksums: r0x7e0004: java.util.HashMap _h0x7e0004 = r_0x7e0003;
myLastGradleSyncTimestamp: 1522297024540
]
//// END instance dump
$
You can see the following strings in java.util.HashMap
.
- "settings.gradle"
- "build.gradle"
- "local.properties"
- "/Users/qtmfld/.gradle/gradle.properties"
- "gradle.properties"
- "app/build.gradle"
Wh0 has clarified the same result on Android Studio 3.2 Preview.
https://wh0.github.io/2018/02/17/build-file-checksums-ser.html