add BundleMRS.7z

This commit is contained in:
wwqgtxx 2026-06-05 12:29:47 +08:00
parent 5b0d0736e3
commit f6670dcd7a
2 changed files with 11 additions and 0 deletions

View File

@ -41,6 +41,7 @@ task("downloadGeoFiles") {
"https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat" to "geosite.dat",
// "https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/country.mmdb" to "country.mmdb",
"https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/GeoLite2-ASN.mmdb" to "ASN.mmdb",
"https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/BundleMRS.7z" to "BundleMRS.7z",
)
doLast {

View File

@ -68,6 +68,16 @@ class MainApplication : Application() {
assets.open("ASN.mmdb").copyTo(it)
}
}
val bundleMRSFile = File(clashDir, "BundleMRS.7z")
if (bundleMRSFile.exists() && bundleMRSFile.lastModified() < updateDate) {
bundleMRSFile.delete()
}
if (!bundleMRSFile.exists()) {
FileOutputStream(bundleMRSFile).use {
assets.open("BundleMRS.7z").copyTo(it)
}
}
}
fun finalize() {