NikGapps 3.29__tar.gz → 3.31__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/build/Build.py +8 -8
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/build/NikGappsManager.py +2 -2
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/build/Release.py +6 -6
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/build_config.py +11 -11
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/cache.py +12 -12
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/config/NikGappsConfig.py +15 -15
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/copy_repos.py +2 -2
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/Assets.py +8 -8
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/Package.py +2 -6
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/compression/CompOps.py +6 -6
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/compression/Export.py +10 -10
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/git/TestGit.py +1 -1
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/overlay/ApkMetaInfo.py +1 -1
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/overlay/Manifest.py +1 -1
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/overlay/Overlay.py +1 -1
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/upload/CmdUpload.py +7 -7
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/upload/GoFileUpload.py +7 -7
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/main.py +9 -9
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/overlay_control.py +11 -10
- nikgapps-3.31/NikGapps/test.py +3 -0
- {nikgapps-3.29 → nikgapps-3.31/NikGapps.egg-info}/PKG-INFO +4 -3
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps.egg-info/SOURCES.txt +1 -25
- {nikgapps-3.29/NikGapps.egg-info → nikgapps-3.31}/PKG-INFO +4 -3
- {nikgapps-3.29 → nikgapps-3.31}/README.md +3 -2
- {nikgapps-3.29 → nikgapps-3.31}/setup.py +1 -1
- nikgapps-3.29/NikGapps/build/NikGappsPackages.py +0 -916
- nikgapps-3.29/NikGapps/helper/B64.py +0 -34
- nikgapps-3.29/NikGapps/helper/C.py +0 -16
- nikgapps-3.29/NikGapps/helper/Cmd.py +0 -296
- nikgapps-3.29/NikGapps/helper/FileOp.py +0 -235
- nikgapps-3.29/NikGapps/helper/Json.py +0 -34
- nikgapps-3.29/NikGapps/helper/P.py +0 -23
- nikgapps-3.29/NikGapps/helper/Statics.py +0 -166
- nikgapps-3.29/NikGapps/helper/SystemStat.py +0 -103
- nikgapps-3.29/NikGapps/helper/T.py +0 -82
- nikgapps-3.29/NikGapps/helper/XmlOp.py +0 -40
- nikgapps-3.29/NikGapps/helper/compression/Modes.py +0 -4
- nikgapps-3.29/NikGapps/helper/compression/Tar.py +0 -25
- nikgapps-3.29/NikGapps/helper/compression/Zip.py +0 -97
- nikgapps-3.29/NikGapps/helper/compression/Zsh.py +0 -17
- nikgapps-3.29/NikGapps/helper/git/Git.py +0 -228
- nikgapps-3.29/NikGapps/helper/git/GitOperations.py +0 -118
- nikgapps-3.29/NikGapps/helper/git/GitStatics.py +0 -14
- nikgapps-3.29/NikGapps/helper/git/GithubManager.py +0 -21
- nikgapps-3.29/NikGapps/helper/git/GitlabManager.py +0 -265
- nikgapps-3.29/NikGapps/helper/upload/Upload.py +0 -125
- nikgapps-3.29/NikGapps/helper/web/Requests.py +0 -139
- nikgapps-3.29/NikGapps/helper/web/TelegramApi.py +0 -126
- nikgapps-3.29/NikGapps/helper/web/__init__.py +0 -0
- nikgapps-3.29/NikGapps/test.py +0 -22
- {nikgapps-3.29 → nikgapps-3.31}/LICENSE +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/MANIFEST.in +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/__init__.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/build/NikGappsOverlays.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/build/PackageConstants.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/build/__init__.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/config/__init__.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/config_upload.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/AppSet.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/Args.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/Config.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/ConfigObj.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/__init__.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/assets/addon.sh +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/assets/appsets.json +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/assets/changelogs.yaml +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/assets/config_versions.json +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/assets/customize.sh +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/assets/debloater.config +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/assets/functions.sh +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/assets/gofile.sh +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/assets/header.sh +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/assets/installer.sh +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/assets/magisk-update-binary.sh +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/assets/module.prop +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/assets/mount.sh +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/assets/mtg_mount.sh +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/assets/nikgapps.config +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/assets/nikgapps_functions.sh +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/assets/packages.json +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/assets/uninstaller.sh +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/assets/unmount.sh +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/compression/__init__.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/git/__init__.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/overlay/Bool.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/overlay/Library.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/overlay/Resources.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/overlay/String.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/overlay/StringArray.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/overlay/__init__.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps/helper/upload/__init__.py +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps.egg-info/dependency_links.txt +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps.egg-info/entry_points.txt +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps.egg-info/requires.txt +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/NikGapps.egg-info/top_level.txt +0 -0
- {nikgapps-3.29 → nikgapps-3.31}/setup.cfg +0 -0
|
@@ -6,11 +6,11 @@ from threading import Lock
|
|
|
6
6
|
|
|
7
7
|
from NikGapps.helper import Config
|
|
8
8
|
from NikGapps.helper.Package import Package
|
|
9
|
-
from
|
|
10
|
-
from
|
|
9
|
+
from niklibrary.helper.F import F
|
|
10
|
+
from niklibrary.helper.Cmd import Cmd
|
|
11
11
|
from NikGapps.helper.AppSet import AppSet
|
|
12
|
-
from
|
|
13
|
-
from
|
|
12
|
+
from niklibrary.helper.Statics import Statics
|
|
13
|
+
from niklibrary.helper.T import T
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class Build:
|
|
@@ -48,7 +48,7 @@ class Build:
|
|
|
48
48
|
if float(android_version) >= 12.1:
|
|
49
49
|
overlay_directory = Config.OVERLAY_SOURCE
|
|
50
50
|
overlay_dir = overlay_directory + Statics.dir_sep + f"{package_title}Overlay"
|
|
51
|
-
if
|
|
51
|
+
if F.dir_exists(overlay_dir):
|
|
52
52
|
for file in Path(overlay_dir).rglob("*.apk"):
|
|
53
53
|
pkg_files_path = "overlay" + Statics.dir_sep + Path(file).name
|
|
54
54
|
install_list.append(pkg_files_path.replace("___", "/"))
|
|
@@ -61,7 +61,7 @@ class Build:
|
|
|
61
61
|
or str(pkg_files).endswith(".gitattributes") or str(pkg_files).endswith("README.md"):
|
|
62
62
|
continue
|
|
63
63
|
if str(pkg_files).endswith(Statics.DELETE_FILES_NAME):
|
|
64
|
-
for str_data in
|
|
64
|
+
for str_data in F.read_string_file(pkg_files):
|
|
65
65
|
delete_file = str_data.strip()
|
|
66
66
|
if delete_file not in delete_files_list:
|
|
67
67
|
delete_files_list.append(delete_file)
|
|
@@ -79,7 +79,7 @@ class Build:
|
|
|
79
79
|
app_type = Statics.is_priv_app
|
|
80
80
|
elif str(primary_app_location).__contains__("___app___"):
|
|
81
81
|
app_type = Statics.is_system_app
|
|
82
|
-
for folder in
|
|
82
|
+
for folder in F.get_dir_list(pkg_files_path):
|
|
83
83
|
if folder.startswith("system") or folder.startswith("vendor") \
|
|
84
84
|
or folder.startswith("product") or folder.startswith("system_ext") \
|
|
85
85
|
or folder.startswith("overlay"):
|
|
@@ -87,7 +87,7 @@ class Build:
|
|
|
87
87
|
folder_dict[folder] = folder
|
|
88
88
|
# We don't need this but for the sake of consistency
|
|
89
89
|
if str(pkg_files_path).endswith("xml") or str(pkg_files_path).endswith("prop"):
|
|
90
|
-
|
|
90
|
+
F.convert_to_lf(str(pkg_files.absolute()))
|
|
91
91
|
install_list.append(pkg_files_path.replace("___", "/"))
|
|
92
92
|
file_dict_value = str(pkg_files_path.replace("___", "/")).replace("\\", "/")
|
|
93
93
|
value = str(file_dict_value).split("/")
|
|
@@ -3,9 +3,9 @@ import os
|
|
|
3
3
|
from NikGapps.build.PackageConstants import PackageConstants
|
|
4
4
|
from NikGapps.helper.AppSet import AppSet
|
|
5
5
|
from NikGapps.helper.Assets import Assets
|
|
6
|
-
from
|
|
6
|
+
from niklibrary.helper.Cmd import Cmd
|
|
7
7
|
from NikGapps.helper.Package import Package
|
|
8
|
-
from
|
|
8
|
+
from niklibrary.helper.Statics import Statics
|
|
9
9
|
from NikGapps.helper.overlay.Overlay import Overlay
|
|
10
10
|
from NikGapps.helper.overlay.Library import Library
|
|
11
11
|
|
|
@@ -2,13 +2,13 @@ import os
|
|
|
2
2
|
from NikGapps.build.Build import Build
|
|
3
3
|
from NikGapps.config.NikGappsConfig import NikGappsConfig
|
|
4
4
|
from NikGapps.helper import Config
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
from
|
|
8
|
-
from
|
|
5
|
+
from niklibrary.helper.P import P
|
|
6
|
+
from niklibrary.helper.Statics import Statics
|
|
7
|
+
from niklibrary.helper.T import T
|
|
8
|
+
from niklibrary.compression.Modes import Modes
|
|
9
9
|
from NikGapps.helper.compression.Export import Export
|
|
10
|
-
from
|
|
11
|
-
from
|
|
10
|
+
from niklibrary.web.Upload import Upload
|
|
11
|
+
from niklibrary.web.TelegramApi import TelegramApi
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class Release:
|
|
@@ -5,14 +5,14 @@ from NikGapps.build.Build import Build
|
|
|
5
5
|
from NikGapps.config.NikGappsConfig import NikGappsConfig
|
|
6
6
|
from NikGapps.helper.Args import Args
|
|
7
7
|
from NikGapps.helper import Config
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
from
|
|
8
|
+
from niklibrary.helper.B64 import B64
|
|
9
|
+
from niklibrary.helper.F import F
|
|
10
|
+
from niklibrary.helper.Statics import Statics
|
|
11
|
+
from niklibrary.helper.SystemStat import SystemStat
|
|
12
|
+
from niklibrary.helper.T import T
|
|
13
13
|
from NikGapps.helper.compression.Export import Export
|
|
14
|
-
from
|
|
15
|
-
from
|
|
14
|
+
from niklibrary.compression.Modes import Modes
|
|
15
|
+
from niklibrary.git.GitOp import GitOp
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
def build_config():
|
|
@@ -35,7 +35,7 @@ def build_config():
|
|
|
35
35
|
exit(1)
|
|
36
36
|
if not str(config_name).endswith(".config"):
|
|
37
37
|
config_name = config_name + ".config"
|
|
38
|
-
if
|
|
38
|
+
if F.file_exists(config_name):
|
|
39
39
|
print("Reading from the file " + config_name)
|
|
40
40
|
path = config_name
|
|
41
41
|
else:
|
|
@@ -46,11 +46,11 @@ def build_config():
|
|
|
46
46
|
else:
|
|
47
47
|
config_string = B64.b64d(config_value)
|
|
48
48
|
path = config_name
|
|
49
|
-
|
|
49
|
+
F.write_string_in_lf_file(str_data=config_string, file_path=path)
|
|
50
50
|
for android_version in android_versions:
|
|
51
|
-
apk_repo =
|
|
51
|
+
apk_repo = GitOp.clone_apk_source(android_version, args.arch, release_type=Config.RELEASE_TYPE)
|
|
52
52
|
Config.APK_SOURCE = apk_repo.working_tree_dir
|
|
53
|
-
overlay_repo =
|
|
53
|
+
overlay_repo = GitOp.clone_overlay_repo(android_version)
|
|
54
54
|
Config.OVERLAY_SOURCE = overlay_repo.working_tree_dir
|
|
55
55
|
config_obj = NikGappsConfig(android_version=android_version, config_path=path)
|
|
56
56
|
print(f"Setting up package list from {config_name}...")
|
|
@@ -2,18 +2,18 @@ import os
|
|
|
2
2
|
from dotenv import load_dotenv
|
|
3
3
|
from NikGapps.build.Build import Build
|
|
4
4
|
from NikGapps.config.NikGappsConfig import NikGappsConfig
|
|
5
|
-
from
|
|
5
|
+
from niklibrary.helper.F import F
|
|
6
6
|
from NikGapps.helper.Package import Package
|
|
7
|
-
from
|
|
7
|
+
from niklibrary.compression.Modes import Modes
|
|
8
8
|
from NikGapps.helper.compression.CompOps import CompOps
|
|
9
9
|
from NikGapps.helper.AppSet import AppSet
|
|
10
10
|
from NikGapps.helper import Config
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
11
|
+
from niklibrary.helper.P import P
|
|
12
|
+
from niklibrary.helper.T import T
|
|
13
|
+
from niklibrary.helper.SystemStat import SystemStat
|
|
14
14
|
from NikGapps.helper.Args import Args
|
|
15
|
-
from
|
|
16
|
-
from
|
|
15
|
+
from niklibrary.git.GitOp import GitOp
|
|
16
|
+
from niklibrary.git.GitlabManager import GitLabManager
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
def cache():
|
|
@@ -45,11 +45,11 @@ def cache():
|
|
|
45
45
|
project = gitlab_manager.create_repository(cached_url, provide_owner_access=True)
|
|
46
46
|
gitlab_manager.create_and_commit_file(project_id=project.id, file_path=".gitattributes",
|
|
47
47
|
content=gitattributes)
|
|
48
|
-
repo_cached =
|
|
49
|
-
apk_repo =
|
|
48
|
+
repo_cached = GitOp.clone_apk_url(url=cached_url, use_ssh_clone=True)
|
|
49
|
+
apk_repo = GitOp.clone_apk_url(url=url)
|
|
50
50
|
Config.APK_SOURCE = apk_repo.working_tree_dir
|
|
51
51
|
if float(android_version) >= 12.1:
|
|
52
|
-
overlay_repo =
|
|
52
|
+
overlay_repo = GitOp.clone_overlay_repo(android_version=str(android_version), fresh_clone=True)
|
|
53
53
|
Config.OVERLAY_SOURCE = overlay_repo.working_tree_dir
|
|
54
54
|
config_obj = NikGappsConfig(android_version)
|
|
55
55
|
app_set_list = config_obj.package_manager.get_packages("all")
|
|
@@ -68,8 +68,8 @@ def cache():
|
|
|
68
68
|
t.taken(f"Total time taken to process the {pkg.package_title}, compressing into {mode}")
|
|
69
69
|
repo_cached.git_push(commit_message=f"Compressed {pkg.package_title} for {appset.title}",
|
|
70
70
|
push_untracked_files=True, pull_first=True, post_buffer="1048576000")
|
|
71
|
-
if Config.ENVIRONMENT_TYPE.__eq__("production") and
|
|
72
|
-
|
|
71
|
+
if Config.ENVIRONMENT_TYPE.__eq__("production") and F.dir_exists(repo_cached.working_tree_dir):
|
|
72
|
+
F.remove_dir(repo_cached.working_tree_dir)
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
if __name__ == "__main__":
|
|
@@ -6,12 +6,12 @@ from NikGapps.helper import Config
|
|
|
6
6
|
from NikGapps.helper.AppSet import AppSet
|
|
7
7
|
from NikGapps.helper.Assets import Assets
|
|
8
8
|
from NikGapps.helper.ConfigObj import ConfigObj
|
|
9
|
-
from
|
|
9
|
+
from niklibrary.helper.F import F
|
|
10
10
|
from NikGapps.helper.Package import Package
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
from
|
|
11
|
+
from niklibrary.helper.Statics import Statics
|
|
12
|
+
from niklibrary.git.GitOp import GitOp
|
|
13
|
+
from niklibrary.web.Upload import Upload
|
|
14
|
+
from niklibrary.web.Requests import Requests
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class NikGappsConfig:
|
|
@@ -28,7 +28,7 @@ class NikGappsConfig:
|
|
|
28
28
|
self.use_zip_config = use_zip_config
|
|
29
29
|
self.elite_folder = None
|
|
30
30
|
if config_path is not None:
|
|
31
|
-
self.raw_config = "".join(
|
|
31
|
+
self.raw_config = "".join(F.read_string_file(config_path))
|
|
32
32
|
self.config_name = str(Path(self.config_path).name).split(".config")[0]
|
|
33
33
|
if str(self.config_path).__contains__(Statics.dir_sep + "elite" + Statics.dir_sep):
|
|
34
34
|
self.is_elite = True
|
|
@@ -269,15 +269,15 @@ class NikGappsConfig:
|
|
|
269
269
|
analytics_dict = {}
|
|
270
270
|
key = "config_version_" + Statics.get_android_code(self.android_version)
|
|
271
271
|
analytics_dict[key] = str(self.config_version)
|
|
272
|
-
tracker_repo =
|
|
272
|
+
tracker_repo = GitOp.setup_tracker_repo()
|
|
273
273
|
repo_dir = tracker_repo.working_tree_dir
|
|
274
|
-
if
|
|
274
|
+
if F.dir_exists(repo_dir):
|
|
275
275
|
print(f"{repo_dir} exists!")
|
|
276
276
|
config_version_json = repo_dir + Statics.dir_sep + "config_version.json"
|
|
277
|
-
if
|
|
277
|
+
if F.file_exists(config_version_json):
|
|
278
278
|
print("File Exists!")
|
|
279
279
|
custom_builds_json_string = ""
|
|
280
|
-
for line in
|
|
280
|
+
for line in F.read_string_file(config_version_json):
|
|
281
281
|
custom_builds_json_string += line
|
|
282
282
|
print(custom_builds_json_string)
|
|
283
283
|
print()
|
|
@@ -329,8 +329,8 @@ class NikGappsConfig:
|
|
|
329
329
|
# create nikgapps.config file and upload to sourceforge
|
|
330
330
|
temp_nikgapps_config_location = Statics.get_temp_packages_directory(
|
|
331
331
|
self.android_version) + Statics.dir_sep + "nikgapps.config"
|
|
332
|
-
|
|
333
|
-
if
|
|
332
|
+
F.write_string_in_lf_file(self.get_nikgapps_config(for_release=True), temp_nikgapps_config_location)
|
|
333
|
+
if F.file_exists(temp_nikgapps_config_location):
|
|
334
334
|
release_dir = "NikGappsConfigs"
|
|
335
335
|
u = Upload(android_version=self.android_version, release_type=release_dir, upload_files=Config.UPLOAD_FILES)
|
|
336
336
|
file_type = "nikgappsconfig"
|
|
@@ -343,7 +343,7 @@ class NikGappsConfig:
|
|
|
343
343
|
def get_release_date(self):
|
|
344
344
|
release_date = None
|
|
345
345
|
if self.config_path is not None:
|
|
346
|
-
file_contents =
|
|
346
|
+
file_contents = F.read_string_file(self.config_path)
|
|
347
347
|
for line in file_contents:
|
|
348
348
|
if line.startswith("RELEASE_DATE="):
|
|
349
349
|
release_date = line.split("=")[1].strip()
|
|
@@ -354,7 +354,7 @@ class NikGappsConfig:
|
|
|
354
354
|
if release_date is None:
|
|
355
355
|
release_date = Requests.get_release_date(self.android_version, Config.RELEASE_TYPE)
|
|
356
356
|
if self.config_path is not None:
|
|
357
|
-
file_contents =
|
|
357
|
+
file_contents = F.read_string_file(self.config_path)
|
|
358
358
|
for index, line in enumerate(file_contents):
|
|
359
359
|
if line.startswith("RELEASE_DATE="):
|
|
360
360
|
file_contents[index] = f"RELEASE_DATE={release_date}\n"
|
|
@@ -363,6 +363,6 @@ class NikGappsConfig:
|
|
|
363
363
|
file_contents.insert(index, f"RELEASE_DATE={release_date}\n")
|
|
364
364
|
break
|
|
365
365
|
file_string = "".join(file_contents)
|
|
366
|
-
|
|
366
|
+
F.write_string_in_lf_file(file_string, self.config_path)
|
|
367
367
|
else:
|
|
368
368
|
print("Invalid config path!")
|
|
@@ -2,8 +2,8 @@ import os
|
|
|
2
2
|
from dotenv import load_dotenv
|
|
3
3
|
from NikGapps.helper.Args import Args
|
|
4
4
|
from NikGapps.helper import Config
|
|
5
|
-
from
|
|
6
|
-
from
|
|
5
|
+
from niklibrary.helper.SystemStat import SystemStat
|
|
6
|
+
from niklibrary.git.GitlabManager import GitLabManager
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
def copy_repos():
|
|
@@ -2,21 +2,21 @@ from pathlib import Path
|
|
|
2
2
|
from importlib import resources
|
|
3
3
|
|
|
4
4
|
from nikassets.helper.Assets import Assets as A
|
|
5
|
+
from niklibrary.helper.F import F
|
|
5
6
|
|
|
6
|
-
from
|
|
7
|
-
from .FileOp import FileOp
|
|
7
|
+
from niklibrary.helper.Statics import Statics
|
|
8
8
|
import os.path
|
|
9
9
|
import platform
|
|
10
10
|
|
|
11
|
-
from .Json import Json
|
|
11
|
+
from niklibrary.json.Json import Json
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class Assets:
|
|
15
15
|
with resources.files('NikGapps.helper').joinpath('assets') as asset_path:
|
|
16
16
|
assets_folder = str(asset_path)
|
|
17
|
-
if not
|
|
17
|
+
if not F.dir_exists(assets_folder):
|
|
18
18
|
assets_folder = os.path.join(os.getcwd(), 'assets')
|
|
19
|
-
if not
|
|
19
|
+
if not F.dir_exists(assets_folder):
|
|
20
20
|
pwd = Path(os.getcwd()).parent
|
|
21
21
|
for folders in pwd.iterdir():
|
|
22
22
|
if folders.is_dir():
|
|
@@ -38,7 +38,7 @@ class Assets:
|
|
|
38
38
|
adb_path = "adb"
|
|
39
39
|
elif system_name == "Darwin":
|
|
40
40
|
aapt_path = os.path.join(A.assets_folder, 'bin', system_name, 'aapt2')
|
|
41
|
-
if not
|
|
41
|
+
if not F.file_exists(aapt_path):
|
|
42
42
|
aapt_path = Statics.find_latest_aapt()
|
|
43
43
|
adb_path = "adb"
|
|
44
44
|
else:
|
|
@@ -70,8 +70,8 @@ class Assets:
|
|
|
70
70
|
|
|
71
71
|
@staticmethod
|
|
72
72
|
def get_string_resource(file_path):
|
|
73
|
-
return
|
|
73
|
+
return F.read_string_file(file_path)
|
|
74
74
|
|
|
75
75
|
@staticmethod
|
|
76
76
|
def get_binary_resource(file_path):
|
|
77
|
-
return
|
|
77
|
+
return F.read_binary_file(file_path)
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import os.path
|
|
2
|
-
from pathlib import Path
|
|
3
1
|
from .Assets import Assets
|
|
4
|
-
from .Statics import Statics
|
|
5
|
-
from .XmlOp import XmlOp
|
|
6
|
-
from .Cmd import Cmd
|
|
7
|
-
from .FileOp import FileOp
|
|
2
|
+
from niklibrary.helper.Statics import Statics
|
|
3
|
+
from niklibrary.helper.XmlOp import XmlOp
|
|
8
4
|
from .overlay.Overlay import Overlay
|
|
9
5
|
|
|
10
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
1
|
+
from niklibrary.helper.F import F
|
|
2
|
+
from niklibrary.helper.Statics import Statics
|
|
3
3
|
from NikGapps.helper.Package import Package
|
|
4
|
-
from .Modes import Modes
|
|
4
|
+
from niklibrary.compression.Modes import Modes
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class CompOps:
|
|
@@ -10,10 +10,10 @@ class CompOps:
|
|
|
10
10
|
def get_compression_obj(file_name, compression_mode=Modes.ZIP):
|
|
11
11
|
match compression_mode:
|
|
12
12
|
case Modes.TAR_XZ:
|
|
13
|
-
from .Tar import Tar
|
|
13
|
+
from niklibrary.compression.Tar import Tar
|
|
14
14
|
return Tar(file_name)
|
|
15
15
|
case _:
|
|
16
|
-
from .Zip import Zip
|
|
16
|
+
from niklibrary.compression.Zip import Zip
|
|
17
17
|
return Zip(file_name)
|
|
18
18
|
|
|
19
19
|
@staticmethod
|
|
@@ -36,7 +36,7 @@ class CompOps:
|
|
|
36
36
|
cpkg.add_string(pkg.get_installer_script(str(pkg_size)), "installer.sh")
|
|
37
37
|
cpkg.add_string(pkg.get_uninstaller_script(), "uninstaller.sh")
|
|
38
38
|
cpkg.close()
|
|
39
|
-
|
|
39
|
+
F.write_string_file(str(pkg_size), pkg_txt_path)
|
|
40
40
|
except Exception as e:
|
|
41
41
|
print(e)
|
|
42
42
|
return False
|
|
@@ -6,16 +6,16 @@ from multiprocessing import cpu_count
|
|
|
6
6
|
from threading import Lock
|
|
7
7
|
|
|
8
8
|
from .CompOps import CompOps
|
|
9
|
-
from .Modes import Modes
|
|
10
|
-
from .Zip import Zip
|
|
9
|
+
from niklibrary.compression.Modes import Modes
|
|
10
|
+
from niklibrary.compression.Zip import Zip
|
|
11
11
|
from .. import Config
|
|
12
12
|
from ..Assets import Assets
|
|
13
|
-
from
|
|
14
|
-
from
|
|
15
|
-
from
|
|
16
|
-
from
|
|
17
|
-
from
|
|
18
|
-
from
|
|
13
|
+
from niklibrary.helper.Cmd import Cmd
|
|
14
|
+
from niklibrary.helper.F import F
|
|
15
|
+
from niklibrary.helper.P import P
|
|
16
|
+
from niklibrary.helper.Statics import Statics
|
|
17
|
+
from niklibrary.helper.T import T
|
|
18
|
+
from niklibrary.web.TelegramApi import TelegramApi
|
|
19
19
|
from ...config.NikGappsConfig import NikGappsConfig
|
|
20
20
|
|
|
21
21
|
|
|
@@ -52,7 +52,7 @@ class Export:
|
|
|
52
52
|
print(f"Using cached package: {os.path.basename(pkg_zip_path)}")
|
|
53
53
|
cached_pkg_zip_path = os.path.join(Config.CACHED_SOURCE, appset.title,
|
|
54
54
|
f"{pakg.package_title}{compression_mode}")
|
|
55
|
-
if
|
|
55
|
+
if F.file_exists(cached_pkg_zip_path):
|
|
56
56
|
pkg_zip_path = cached_pkg_zip_path
|
|
57
57
|
pkg_txt_path = pkg_zip_path.replace(compression_mode, "") + "_" + compression_mode[
|
|
58
58
|
1:] + ".txt"
|
|
@@ -61,7 +61,7 @@ class Export:
|
|
|
61
61
|
else:
|
|
62
62
|
CompOps.compress_package(pkg_zip_path, pakg, compression_mode)
|
|
63
63
|
|
|
64
|
-
for size_on_file in
|
|
64
|
+
for size_on_file in F.read_string_file(pkg_txt_path):
|
|
65
65
|
pkg_size = size_on_file
|
|
66
66
|
pakg.pkg_size = pkg_size
|
|
67
67
|
|
|
@@ -3,11 +3,11 @@ import platform
|
|
|
3
3
|
import time
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
import pexpect
|
|
6
|
-
from
|
|
7
|
-
from
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
6
|
+
from niklibrary.helper.F import F
|
|
7
|
+
from niklibrary.helper.P import P
|
|
8
|
+
from niklibrary.helper.Statics import Statics
|
|
9
|
+
from niklibrary.helper.T import T
|
|
10
|
+
from niklibrary.web.TelegramApi import TelegramApi
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class CmdUpload:
|
|
@@ -123,8 +123,8 @@ class CmdUpload:
|
|
|
123
123
|
file_size_mb = None
|
|
124
124
|
if self.successful_connection:
|
|
125
125
|
system_name = platform.system()
|
|
126
|
-
file_size_kb = round(
|
|
127
|
-
file_size_mb = round(
|
|
126
|
+
file_size_kb = round(F.get_file_size(file_name, "KB"), 2)
|
|
127
|
+
file_size_mb = round(F.get_file_size(file_name), 2)
|
|
128
128
|
if telegram is not None:
|
|
129
129
|
telegram.message(f"- The zip {file_size_mb} MB is uploading...")
|
|
130
130
|
if system_name != "Windows" and self.upload_files:
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import platform
|
|
2
2
|
|
|
3
3
|
from NikGapps.helper.Assets import Assets
|
|
4
|
-
from
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
from
|
|
8
|
-
from
|
|
4
|
+
from niklibrary.helper.Cmd import Cmd
|
|
5
|
+
from niklibrary.helper.F import F
|
|
6
|
+
from niklibrary.helper.P import P
|
|
7
|
+
from niklibrary.helper.T import T
|
|
8
|
+
from niklibrary.web.TelegramApi import TelegramApi
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class GoFileUpload:
|
|
@@ -39,8 +39,8 @@ class GoFileUpload:
|
|
|
39
39
|
return execution_status
|
|
40
40
|
print("uploading file finished...")
|
|
41
41
|
execution_status = True
|
|
42
|
-
file_size_kb = round(
|
|
43
|
-
file_size_mb = round(
|
|
42
|
+
file_size_kb = round(F.get_file_size(file_name, "KB"), 2)
|
|
43
|
+
file_size_mb = round(F.get_file_size(file_name), 2)
|
|
44
44
|
time_taken = t.taken(f"Total time taken to upload file with size {file_size_mb} MB ("
|
|
45
45
|
f"{file_size_kb} Kb)")
|
|
46
46
|
if execution_status:
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
from NikGapps.build.Release import Release
|
|
3
3
|
from NikGapps.helper.Args import Args
|
|
4
4
|
from NikGapps.helper import Config
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
from
|
|
8
|
-
from
|
|
5
|
+
from niklibrary.helper.SystemStat import SystemStat
|
|
6
|
+
from niklibrary.helper.T import T
|
|
7
|
+
from niklibrary.compression.Modes import Modes
|
|
8
|
+
from niklibrary.git.GitOp import GitOp
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
def main():
|
|
@@ -36,21 +36,21 @@ def main():
|
|
|
36
36
|
# clone the apk repo if it doesn't exist
|
|
37
37
|
if args.enable_git_clone:
|
|
38
38
|
if Config.USE_CACHED_APKS:
|
|
39
|
-
cached_repo =
|
|
39
|
+
cached_repo = GitOp.clone_apk_source(android_version, release_type=Config.RELEASE_TYPE,
|
|
40
40
|
cached=True)
|
|
41
41
|
Config.CACHED_SOURCE = cached_repo.working_tree_dir
|
|
42
42
|
else:
|
|
43
|
-
apk_repo =
|
|
43
|
+
apk_repo = GitOp.clone_apk_source(android_version, args.arch, release_type=Config.RELEASE_TYPE)
|
|
44
44
|
Config.APK_SOURCE = apk_repo.working_tree_dir
|
|
45
|
-
overlay_repo =
|
|
45
|
+
overlay_repo = GitOp.clone_overlay_repo(android_version)
|
|
46
46
|
Config.OVERLAY_SOURCE = overlay_repo.working_tree_dir
|
|
47
47
|
if Config.OVERRIDE_RELEASE:
|
|
48
48
|
Release.zip(package_list, android_version, args.arch, args.sign)
|
|
49
49
|
if Config.RELEASE_TYPE and Config.ENVIRONMENT_TYPE == "production":
|
|
50
|
-
|
|
50
|
+
GitOp.mark_a_release(android_version, Config.RELEASE_TYPE)
|
|
51
51
|
if args.release:
|
|
52
52
|
if args.update_website:
|
|
53
|
-
website_repo =
|
|
53
|
+
website_repo = GitOp.get_website_repo_for_changelog()
|
|
54
54
|
if website_repo is not None:
|
|
55
55
|
website_repo.update_changelog()
|
|
56
56
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from pathlib import Path
|
|
3
|
+
|
|
3
4
|
from NikGapps.build.NikGappsOverlays import NikGappsOverlays
|
|
4
5
|
from NikGapps.helper.Args import Args
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
from
|
|
8
|
-
from
|
|
9
|
-
from
|
|
6
|
+
from niklibrary.helper.Cmd import Cmd
|
|
7
|
+
from niklibrary.helper.F import F
|
|
8
|
+
from niklibrary.helper.P import P
|
|
9
|
+
from niklibrary.helper.Statics import Statics
|
|
10
|
+
from niklibrary.git.Git import Git
|
|
10
11
|
from NikGapps.helper.overlay.Overlay import Overlay
|
|
11
12
|
|
|
12
13
|
|
|
@@ -28,7 +29,7 @@ def overlay_control():
|
|
|
28
29
|
print("Pushing due changes!")
|
|
29
30
|
overlay_source_repo.git_push(commit_message=f"Updated {overlay.folder}!", push_untracked_files=True)
|
|
30
31
|
|
|
31
|
-
if
|
|
32
|
+
if F.dir_exists(repo_dir):
|
|
32
33
|
overlays_repo_name = Statics.get_overlay_repo(android_version)
|
|
33
34
|
overlays_repo_dir = Statics.get_overlay_directory(android_version)
|
|
34
35
|
overlay_repo = Git(overlays_repo_dir)
|
|
@@ -37,7 +38,7 @@ def overlay_control():
|
|
|
37
38
|
if str(folder).__contains__(".git") or str(folder).__contains__("README.md"):
|
|
38
39
|
continue
|
|
39
40
|
cmd = Cmd()
|
|
40
|
-
if not
|
|
41
|
+
if not F.file_exists(os.path.join(str(folder), "apktool.yml")):
|
|
41
42
|
P.red(f"apktool.yml doesn't exist in {folder}")
|
|
42
43
|
continue
|
|
43
44
|
overlay_path = cmd.build_overlay(folder_name=str(folder))
|
|
@@ -45,12 +46,12 @@ def overlay_control():
|
|
|
45
46
|
print(f"{overlay_path} successfully built..")
|
|
46
47
|
print(
|
|
47
48
|
f"Copying to {os.path.join(overlays_repo_dir, str(Path(folder).name), f'{Path(folder).name}.apk')}")
|
|
48
|
-
|
|
49
|
+
F.copy_file(overlay_path, os.path.join(overlays_repo_dir,
|
|
49
50
|
str(Path(folder).name), f"{Path(folder).name}.apk"))
|
|
50
51
|
folder_to_remove = os.path.join(str(folder), "dist")
|
|
51
|
-
|
|
52
|
+
F.remove_dir(folder_to_remove)
|
|
52
53
|
folder_to_remove = os.path.join(str(folder), "build")
|
|
53
|
-
|
|
54
|
+
F.remove_dir(folder_to_remove)
|
|
54
55
|
else:
|
|
55
56
|
print("Failed to build overlay")
|
|
56
57
|
if overlay_repo.due_changes():
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: NikGapps
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.31
|
|
4
4
|
Summary: A short description of your project
|
|
5
5
|
Home-page: https://github.com/nikgapps/project
|
|
6
6
|
Author: Nikhil Menghani
|
|
@@ -94,8 +94,9 @@ Ensure you have the following tools installed:
|
|
|
94
94
|
|
|
95
95
|
## Total Downloads
|
|
96
96
|
<!-- 7312415 from 2019-07-22 to 2024-07-18 -->
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
<!-- 7653966 from 2019-07-22 to 2024-10-02 -->
|
|
98
|
+

|
|
99
|
+
<img alt="SourceForge" src="https://img.shields.io/sourceforge/dt/nikgapps?label=After%202nd%20Oct%202024&color=red">
|
|
99
100
|
<img alt="SourceForge" src="https://img.shields.io/sourceforge/dd/nikgapps?label=Downloads%20Per%20Day&color=blue">
|
|
100
101
|
|
|
101
102
|
<!--
|