apkdiff 1.0.0__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.
- apkdiff-1.0.0/PKG-INFO +66 -0
- apkdiff-1.0.0/README.md +37 -0
- apkdiff-1.0.0/pyproject.toml +48 -0
- apkdiff-1.0.0/setup.cfg +4 -0
- apkdiff-1.0.0/src/apkdiff/__init__.py +6 -0
- apkdiff-1.0.0/src/apkdiff/__main__.py +10 -0
- apkdiff-1.0.0/src/apkdiff/cli.py +186 -0
- apkdiff-1.0.0/src/apkdiff.egg-info/PKG-INFO +66 -0
- apkdiff-1.0.0/src/apkdiff.egg-info/SOURCES.txt +11 -0
- apkdiff-1.0.0/src/apkdiff.egg-info/dependency_links.txt +1 -0
- apkdiff-1.0.0/src/apkdiff.egg-info/entry_points.txt +2 -0
- apkdiff-1.0.0/src/apkdiff.egg-info/requires.txt +1 -0
- apkdiff-1.0.0/src/apkdiff.egg-info/top_level.txt +1 -0
apkdiff-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: apkdiff
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Command line APK size diff tool; installs the apkdiff executable
|
|
5
|
+
Author: Jayvin
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/Jayvinz/apkdiff
|
|
8
|
+
Project-URL: Repository, https://github.com/Jayvinz/apkdiff
|
|
9
|
+
Project-URL: Source, https://github.com/Jayvinz/apkdiff/tree/main/py
|
|
10
|
+
Keywords: apk,dex,android,size,diff,cli
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
25
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
26
|
+
Requires-Python: >=3.7
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
Requires-Dist: apkdiff-core==1.0.0
|
|
29
|
+
|
|
30
|
+
[English](README.md) | [简体中文](README.zh-CN.md)
|
|
31
|
+
|
|
32
|
+
# apkdiff
|
|
33
|
+
|
|
34
|
+
Command line APK size diff tool. Installs the `apkdiff` executable.
|
|
35
|
+
|
|
36
|
+
## Install
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install apkdiff
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Python 3.7 or newer. This installs `apkdiff-core` automatically.
|
|
43
|
+
|
|
44
|
+
## Usage
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
apkdiff old.apk new.apk
|
|
48
|
+
apkdiff old.apk new.apk \
|
|
49
|
+
--old-mapping old/mapping.txt --new-mapping new/mapping.txt \
|
|
50
|
+
--detect-renames --format console,json,html,markdown -o report/
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Options match the Python, JVM and Node.js CLIs:
|
|
54
|
+
|
|
55
|
+
| Option | Description |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| `--format` | `console,json,html,markdown` (default `console,json,html`) |
|
|
58
|
+
| `-o, --output` | Output directory (default `apkdiff-report`) |
|
|
59
|
+
| `--metric` | `compressed` (default) or `uncompressed` |
|
|
60
|
+
| `--top N` | Console rows per section (default 30) |
|
|
61
|
+
| `--full` | Show all rows |
|
|
62
|
+
| `--include-meta` | Include `META-INF/` in resource comparison |
|
|
63
|
+
| `--detect-renames` | Detect resources renamed without content changes |
|
|
64
|
+
| `--fail-on-regression` | Exit 1 when the new APK is larger |
|
|
65
|
+
|
|
66
|
+
`python -m apkdiff` is also supported after installation.
|
apkdiff-1.0.0/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
[English](README.md) | [简体中文](README.zh-CN.md)
|
|
2
|
+
|
|
3
|
+
# apkdiff
|
|
4
|
+
|
|
5
|
+
Command line APK size diff tool. Installs the `apkdiff` executable.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install apkdiff
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Python 3.7 or newer. This installs `apkdiff-core` automatically.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
apkdiff old.apk new.apk
|
|
19
|
+
apkdiff old.apk new.apk \
|
|
20
|
+
--old-mapping old/mapping.txt --new-mapping new/mapping.txt \
|
|
21
|
+
--detect-renames --format console,json,html,markdown -o report/
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Options match the Python, JVM and Node.js CLIs:
|
|
25
|
+
|
|
26
|
+
| Option | Description |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| `--format` | `console,json,html,markdown` (default `console,json,html`) |
|
|
29
|
+
| `-o, --output` | Output directory (default `apkdiff-report`) |
|
|
30
|
+
| `--metric` | `compressed` (default) or `uncompressed` |
|
|
31
|
+
| `--top N` | Console rows per section (default 30) |
|
|
32
|
+
| `--full` | Show all rows |
|
|
33
|
+
| `--include-meta` | Include `META-INF/` in resource comparison |
|
|
34
|
+
| `--detect-renames` | Detect resources renamed without content changes |
|
|
35
|
+
| `--fail-on-regression` | Exit 1 when the new APK is larger |
|
|
36
|
+
|
|
37
|
+
`python -m apkdiff` is also supported after installation.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "apkdiff"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Command line APK size diff tool; installs the apkdiff executable"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.7"
|
|
11
|
+
license = { text = "Apache-2.0" }
|
|
12
|
+
authors = [{ name = "Jayvin" }]
|
|
13
|
+
keywords = ["apk", "dex", "android", "size", "diff", "cli"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 5 - Production/Stable",
|
|
16
|
+
"Environment :: Console",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"Operating System :: OS Independent",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
21
|
+
"Programming Language :: Python :: 3.7",
|
|
22
|
+
"Programming Language :: Python :: 3.8",
|
|
23
|
+
"Programming Language :: Python :: 3.9",
|
|
24
|
+
"Programming Language :: Python :: 3.10",
|
|
25
|
+
"Programming Language :: Python :: 3.11",
|
|
26
|
+
"Programming Language :: Python :: 3.12",
|
|
27
|
+
"Programming Language :: Python :: 3.13",
|
|
28
|
+
"Programming Language :: Python :: 3.14",
|
|
29
|
+
"Topic :: Software Development :: Build Tools",
|
|
30
|
+
]
|
|
31
|
+
# Keep this version in sync with apkdiff_core.__version__.
|
|
32
|
+
dependencies = [
|
|
33
|
+
"apkdiff-core==1.0.0",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[project.scripts]
|
|
37
|
+
apkdiff = "apkdiff.cli:main"
|
|
38
|
+
|
|
39
|
+
[project.urls]
|
|
40
|
+
Homepage = "https://github.com/Jayvinz/apkdiff"
|
|
41
|
+
Repository = "https://github.com/Jayvinz/apkdiff"
|
|
42
|
+
Source = "https://github.com/Jayvinz/apkdiff/tree/main/py"
|
|
43
|
+
|
|
44
|
+
[tool.setuptools.dynamic]
|
|
45
|
+
version = { attr = "apkdiff.__version__" }
|
|
46
|
+
|
|
47
|
+
[tool.setuptools.packages.find]
|
|
48
|
+
where = ["src"]
|
apkdiff-1.0.0/setup.cfg
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""Allow running the tool as `python -m apkdiff ...`.
|
|
2
|
+
|
|
3
|
+
Python runs __main__.py for `python -m package`. It calls cli.main() and uses
|
|
4
|
+
the returned integer as the exit code:
|
|
5
|
+
0 success, 1 size regression, 2 argument/data error.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from .cli import main
|
|
9
|
+
|
|
10
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
"""Command-line entry point: translate CLI arguments into library calls.
|
|
2
|
+
|
|
3
|
+
main() runs a pipeline:
|
|
4
|
+
1. parse arguments (APKs, output formats, switches)
|
|
5
|
+
2. analyze the old APK (mapping -> analysis)
|
|
6
|
+
3. analyze the new APK
|
|
7
|
+
4. diff
|
|
8
|
+
5. render requested reports
|
|
9
|
+
6. return exit code 1 when --fail-on-regression and the APK grew
|
|
10
|
+
|
|
11
|
+
Step 6 is the CI size gate: a non-zero exit code fails the PR check.
|
|
12
|
+
|
|
13
|
+
Run with `python -m apkdiff ...` or the installed `apkdiff ...` (see __main__.py).
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
import argparse
|
|
19
|
+
import os
|
|
20
|
+
import sys
|
|
21
|
+
from pathlib import Path
|
|
22
|
+
|
|
23
|
+
from apkdiff_core import (
|
|
24
|
+
analyze_apk,
|
|
25
|
+
diff_apks,
|
|
26
|
+
load_mapping,
|
|
27
|
+
print_console,
|
|
28
|
+
write_html,
|
|
29
|
+
write_json,
|
|
30
|
+
write_markdown,
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
VALID_FORMATS = ("console", "json", "html", "markdown")
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _autodetect_mapping(apk_path: str) -> str | None:
|
|
37
|
+
"""Look for a mapping file next to the APK."""
|
|
38
|
+
apk = Path(apk_path).resolve()
|
|
39
|
+
stem = apk.stem
|
|
40
|
+
candidates = [
|
|
41
|
+
apk.parent / f"{stem}-mapping.txt",
|
|
42
|
+
apk.parent / f"{stem}.mapping.txt",
|
|
43
|
+
apk.parent / "mapping.txt",
|
|
44
|
+
]
|
|
45
|
+
for candidate in candidates:
|
|
46
|
+
if candidate.is_file():
|
|
47
|
+
return str(candidate)
|
|
48
|
+
return None
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
52
|
+
parser = argparse.ArgumentParser(
|
|
53
|
+
prog="apkdiff",
|
|
54
|
+
description="对比两个 APK,按类 / 资源粒度输出体积变更报告。",
|
|
55
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
56
|
+
epilog="""示例:
|
|
57
|
+
apkdiff old.apk new.apk
|
|
58
|
+
apkdiff old.apk new.apk \\
|
|
59
|
+
--old-mapping old/mapping.txt --new-mapping new/mapping.txt \\
|
|
60
|
+
--format console,json,html -o report/
|
|
61
|
+
|
|
62
|
+
说明:
|
|
63
|
+
类体积为 DEX 中归属于该类的未压缩字节(含 class_def、code、
|
|
64
|
+
debug、annotations、标识符与字符串池);每个 dex 的压缩贡献按该
|
|
65
|
+
dex 的整体压缩率估算,便于与 APK 实际大小对齐。
|
|
66
|
+
""",
|
|
67
|
+
)
|
|
68
|
+
parser.add_argument("old_apk", help="旧版本 APK 路径")
|
|
69
|
+
parser.add_argument("new_apk", help="新版本 APK 路径")
|
|
70
|
+
parser.add_argument("--old-mapping", help="旧版本 ProGuard/R8 mapping.txt(默认自动探测)")
|
|
71
|
+
parser.add_argument("--new-mapping", help="新版本 ProGuard/R8 mapping.txt(默认自动探测)")
|
|
72
|
+
parser.add_argument(
|
|
73
|
+
"--format", default="console,json,html",
|
|
74
|
+
help=f"输出格式,逗号分隔:{','.join(VALID_FORMATS)}(默认 console,json,html)",
|
|
75
|
+
)
|
|
76
|
+
parser.add_argument("-o", "--output", default="apkdiff-report", help="报告输出目录")
|
|
77
|
+
parser.add_argument(
|
|
78
|
+
"--metric", choices=("compressed", "uncompressed"), default="compressed",
|
|
79
|
+
help="排序与 Δ 显示所用的指标(默认 compressed)",
|
|
80
|
+
)
|
|
81
|
+
parser.add_argument("--top", type=int, default=30, help="控制台每种类型显示条数(默认 30)")
|
|
82
|
+
parser.add_argument("--full", action="store_true", help="控制台显示全部条目")
|
|
83
|
+
parser.add_argument("--include-meta", action="store_true", help="把 META-INF 纳入资源对比")
|
|
84
|
+
parser.add_argument("--detect-renames", action="store_true", help="检测内容相同的资源重命名")
|
|
85
|
+
parser.add_argument(
|
|
86
|
+
"--fail-on-regression", action="store_true",
|
|
87
|
+
help="若新 APK 体积增大则以退出码 1 结束(便于 CI 使用)",
|
|
88
|
+
)
|
|
89
|
+
return parser
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def _ensure_utf8_output() -> None:
|
|
93
|
+
"""Force UTF-8 console output, matching the JVM and Node.js CLIs.
|
|
94
|
+
|
|
95
|
+
On Chinese Windows the default pipe/console encoding is GBK, which garbles the
|
|
96
|
+
Chinese report. Legacy consoles may still need `chcp 65001`.
|
|
97
|
+
"""
|
|
98
|
+
for stream in (sys.stdout, sys.stderr):
|
|
99
|
+
reconfigure = getattr(stream, "reconfigure", None)
|
|
100
|
+
if reconfigure is not None:
|
|
101
|
+
try:
|
|
102
|
+
reconfigure(encoding="utf-8")
|
|
103
|
+
except (OSError, ValueError):
|
|
104
|
+
pass
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def main(argv: list[str] | None = None) -> int:
|
|
108
|
+
_ensure_utf8_output()
|
|
109
|
+
parser = build_parser()
|
|
110
|
+
args = parser.parse_args(argv)
|
|
111
|
+
|
|
112
|
+
formats = [f.strip().lower() for f in args.format.split(",") if f.strip()]
|
|
113
|
+
invalid = [f for f in formats if f not in VALID_FORMATS]
|
|
114
|
+
if invalid:
|
|
115
|
+
parser.error(f"不支持的输出格式: {', '.join(invalid)};可选: {', '.join(VALID_FORMATS)}")
|
|
116
|
+
|
|
117
|
+
for apk in (args.old_apk, args.new_apk):
|
|
118
|
+
if not os.path.isfile(apk):
|
|
119
|
+
parser.error(f"APK 不存在: {apk}")
|
|
120
|
+
|
|
121
|
+
old_mapping_path = args.old_mapping or _autodetect_mapping(args.old_apk)
|
|
122
|
+
new_mapping_path = args.new_mapping or _autodetect_mapping(args.new_apk)
|
|
123
|
+
|
|
124
|
+
if "console" in formats:
|
|
125
|
+
print(f"[1/4] 读取旧 APK: {args.old_apk}")
|
|
126
|
+
old_mapping = load_mapping(old_mapping_path)
|
|
127
|
+
old = analyze_apk(args.old_apk, old_mapping)
|
|
128
|
+
if "console" in formats:
|
|
129
|
+
print(f" 类 {len(old.classes)} 个,条目 {len(old.entries)} 个"
|
|
130
|
+
+ (f",mapping: {old_mapping_path}" if old_mapping_path else "(无 mapping)"))
|
|
131
|
+
print(f"[2/4] 读取新 APK: {args.new_apk}")
|
|
132
|
+
new_mapping = load_mapping(new_mapping_path)
|
|
133
|
+
new = analyze_apk(args.new_apk, new_mapping)
|
|
134
|
+
if "console" in formats:
|
|
135
|
+
print(f" 类 {len(new.classes)} 个,条目 {len(new.entries)} 个"
|
|
136
|
+
+ (f",mapping: {new_mapping_path}" if new_mapping_path else "(无 mapping)"))
|
|
137
|
+
|
|
138
|
+
if not old.classes and not new.classes:
|
|
139
|
+
print("错误: 两个 APK 中都没有解析出任何 DEX 类。", file=sys.stderr)
|
|
140
|
+
return 2
|
|
141
|
+
|
|
142
|
+
if "console" in formats:
|
|
143
|
+
print("[3/4] 计算差异 …")
|
|
144
|
+
result = diff_apks(
|
|
145
|
+
old, new,
|
|
146
|
+
include_meta=args.include_meta,
|
|
147
|
+
detect_renames=args.detect_renames,
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
if "console" in formats:
|
|
151
|
+
print("[4/4] 输出报告 …")
|
|
152
|
+
print()
|
|
153
|
+
print_console(result, metric=args.metric, top=args.top, full=args.full)
|
|
154
|
+
|
|
155
|
+
out_dir = Path(args.output)
|
|
156
|
+
for fmt in formats:
|
|
157
|
+
if fmt == "console":
|
|
158
|
+
continue
|
|
159
|
+
if fmt == "json":
|
|
160
|
+
target = out_dir / "apkdiff.json"
|
|
161
|
+
write_json(result, str(target), args.metric)
|
|
162
|
+
elif fmt == "html":
|
|
163
|
+
target = out_dir / "apkdiff.html"
|
|
164
|
+
write_html(result, str(target), args.metric)
|
|
165
|
+
elif fmt == "markdown":
|
|
166
|
+
target = out_dir / "apkdiff.md"
|
|
167
|
+
write_markdown(result, str(target), args.metric)
|
|
168
|
+
else:
|
|
169
|
+
continue
|
|
170
|
+
if "console" in formats:
|
|
171
|
+
print(f" → {target}")
|
|
172
|
+
|
|
173
|
+
if "console" not in formats:
|
|
174
|
+
print(f"报告已生成于 {out_dir.resolve()}")
|
|
175
|
+
|
|
176
|
+
# Size gate: with --fail-on-regression, return 1 when the new APK grew.
|
|
177
|
+
# A non-zero exit code fails the shell/CI step and blocks the PR check.
|
|
178
|
+
# This is the entire "grew too much => block merge" mechanism.
|
|
179
|
+
if args.fail_on_regression and result.summary["apk_size_delta"] > 0:
|
|
180
|
+
return 1
|
|
181
|
+
|
|
182
|
+
return 0
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
if __name__ == "__main__":
|
|
186
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: apkdiff
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Command line APK size diff tool; installs the apkdiff executable
|
|
5
|
+
Author: Jayvin
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/Jayvinz/apkdiff
|
|
8
|
+
Project-URL: Repository, https://github.com/Jayvinz/apkdiff
|
|
9
|
+
Project-URL: Source, https://github.com/Jayvinz/apkdiff/tree/main/py
|
|
10
|
+
Keywords: apk,dex,android,size,diff,cli
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
25
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
26
|
+
Requires-Python: >=3.7
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
Requires-Dist: apkdiff-core==1.0.0
|
|
29
|
+
|
|
30
|
+
[English](README.md) | [简体中文](README.zh-CN.md)
|
|
31
|
+
|
|
32
|
+
# apkdiff
|
|
33
|
+
|
|
34
|
+
Command line APK size diff tool. Installs the `apkdiff` executable.
|
|
35
|
+
|
|
36
|
+
## Install
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install apkdiff
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Python 3.7 or newer. This installs `apkdiff-core` automatically.
|
|
43
|
+
|
|
44
|
+
## Usage
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
apkdiff old.apk new.apk
|
|
48
|
+
apkdiff old.apk new.apk \
|
|
49
|
+
--old-mapping old/mapping.txt --new-mapping new/mapping.txt \
|
|
50
|
+
--detect-renames --format console,json,html,markdown -o report/
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Options match the Python, JVM and Node.js CLIs:
|
|
54
|
+
|
|
55
|
+
| Option | Description |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| `--format` | `console,json,html,markdown` (default `console,json,html`) |
|
|
58
|
+
| `-o, --output` | Output directory (default `apkdiff-report`) |
|
|
59
|
+
| `--metric` | `compressed` (default) or `uncompressed` |
|
|
60
|
+
| `--top N` | Console rows per section (default 30) |
|
|
61
|
+
| `--full` | Show all rows |
|
|
62
|
+
| `--include-meta` | Include `META-INF/` in resource comparison |
|
|
63
|
+
| `--detect-renames` | Detect resources renamed without content changes |
|
|
64
|
+
| `--fail-on-regression` | Exit 1 when the new APK is larger |
|
|
65
|
+
|
|
66
|
+
`python -m apkdiff` is also supported after installation.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
src/apkdiff/__init__.py
|
|
4
|
+
src/apkdiff/__main__.py
|
|
5
|
+
src/apkdiff/cli.py
|
|
6
|
+
src/apkdiff.egg-info/PKG-INFO
|
|
7
|
+
src/apkdiff.egg-info/SOURCES.txt
|
|
8
|
+
src/apkdiff.egg-info/dependency_links.txt
|
|
9
|
+
src/apkdiff.egg-info/entry_points.txt
|
|
10
|
+
src/apkdiff.egg-info/requires.txt
|
|
11
|
+
src/apkdiff.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
apkdiff-core==1.0.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
apkdiff
|