in buildSrc/src/main/java/com/uber/okbuck/core/util/FileUtil.java [125:135]
public static boolean isZipFile(File file) {
if (!file.exists() || file.isDirectory() || !file.canRead() || file.length() < 4) {
return false;
}
try (RandomAccessFile raf = new RandomAccessFile(file, "r")) {
return raf.readInt() == 0x504b0304;
} catch (IOException e) {
return false;
}
}