混淆pag资源
This commit is contained in:
parent
f7888d5346
commit
1ea990a3b7
|
@ -68,6 +68,8 @@ lawn_layout = "res/layout".replace("/", os.sep)
|
|||
qucikset_manifest = "quickstep/AndroidManifest-launcher.xml".replace("/", os.sep)
|
||||
lawn_manifest = "AndroidManifest.xml".replace("/", os.sep)
|
||||
|
||||
pag_file = "lawnchair/assets/pag_wallpaper_slide.pag".replace("/", os.sep)
|
||||
|
||||
|
||||
class ProjectProguard(Task):
|
||||
def __init__(self, context: Context):
|
||||
|
@ -146,6 +148,7 @@ class ProjectProguard(Task):
|
|||
self.add_proguard_key("launcher_help")
|
||||
self.add_proguard_key("launcher_uninstall")
|
||||
self.add_proguard_key("launcher_onboard")
|
||||
self.add_proguard_key("pag_wallpaper_slide")
|
||||
|
||||
self.update_id(os.path.join(self.context.temp_project_path, lawn_layout))
|
||||
self.update_id(os.path.join(self.context.temp_project_path, layout_path))
|
||||
|
@ -176,6 +179,9 @@ class ProjectProguard(Task):
|
|||
|
||||
self.update_proguard(os.path.join(self.context.temp_project_path, lawn_layout))
|
||||
|
||||
target_pag_file = os.path.join(self.context.temp_project_path, pag_file)
|
||||
FileUtils.move(target_pag_file,
|
||||
target_pag_file.replace("pag_wallpaper_slide", generate_encryption_key("pag_wallpaper_slide")))
|
||||
pass
|
||||
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ storePassword=123456
|
|||
|
||||
dst_path = os.path.join(self.context.temp_project_path, f"lawnchair{os.sep}assets")
|
||||
|
||||
for file in list(filter(lambda f: f != "google_fonts.json", os.listdir(dst_path))):
|
||||
for file in list(filter(lambda f: not (f == "google_fonts.json" or f == "pag_wallpaper_slide.pag"), os.listdir(dst_path))):
|
||||
FileUtils.delete(os.path.join(dst_path, file), True)
|
||||
pass
|
||||
|
||||
|
@ -188,8 +188,9 @@ storePassword=123456
|
|||
with open(os.path.join(mainly_path, "tkg_config_mainly.properties"), 'rb') as f:
|
||||
self.context.config = javaproperties.load(f)
|
||||
|
||||
if self.context.admob_app_id is None or self.context.admob_app_id == "":
|
||||
self.context.admob_app_id = self.context.get_config("admob_id")
|
||||
# 不打admob
|
||||
# if self.context.admob_app_id is None or self.context.admob_app_id == "":
|
||||
# self.context.admob_app_id = self.context.get_config("admob_id")
|
||||
pass
|
||||
|
||||
def update_icon(self):
|
||||
|
@ -383,10 +384,12 @@ plugins {
|
|||
for i in range(3):
|
||||
try:
|
||||
url = f"https://repo.dgtverse.cn/repository/tk_my/straw/hachisdk_unity_{self.context.package_name}/maven-metadata.xml"
|
||||
print(url)
|
||||
version = get_latest_version(url)
|
||||
if version:
|
||||
return version
|
||||
except Exception as e:
|
||||
print(e)
|
||||
pass
|
||||
raise Exception("sdk prolink error.")
|
||||
|
||||
|
|
Loading…
Reference in New Issue