Skip to content

Commit 5eb2fcf

Browse files
committed
doc: update README according to latest 2.6.0 update
1 parent 3819738 commit 5eb2fcf

File tree

6 files changed

+26
-12
lines changed

6 files changed

+26
-12
lines changed

README.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44

55
[English][[中文说明]](./README_zh.md)
66

7-
## How does it work?
8-
9-
![](./images/ic_launcher.png)![](./images/ic_launcher_round.png)
7+
ScratchPaper is a Gradle Plugin helps distinguish the buildType/flavor/version via APK icon overlay, bases on [Polyfill](https://github.com/2BAB/Polyfill).
108

11-
![](./images/scratch-paper-json.jpg)
9+
## How does it work?
1210

11+
![](./images/launchers_json.jpg)
1312

1413
> If you install both debug&release Apps in one device, you can not distinguish which is the one you want to test.
1514
@@ -18,6 +17,7 @@ ScratchPaper can add a overlay on your icon, and put given information (like bui
1817
- Support regular & round Icons
1918
- Support adaptive-icon
2019
- Support AAPT2
20+
- Support custom text
2121

2222
> If you have more than one staging Apps for QA or other colleagues, when they found some issues you may don't know how to match the App version to your code base (branch/commit/etc..), because all of them share the same version like "2.1.0-SNAPSHOT".
2323
@@ -28,6 +28,15 @@ ScratchPaper supports generating build information into your artifact (which can
2828
- Dependencies
2929
- ...
3030

31+
## Why choose ScratchPaper?
32+
33+
We can find some similar solutions from Github,such as:akonior/icon-version, akaita/easylauncher-gradle-plugin。But the pain points of them are:
34+
35+
- Some do not support AAPT2
36+
- Some do not support latest AGP
37+
38+
You should try ScratchPaper if you keep using latest build tools.
39+
3140
## Usage
3241

3342
**0x01. Add the plugin to classpath:**
@@ -39,8 +48,8 @@ buildscript {
3948
mavenCentral() // Since 2.5.4, the publish repository has been shifted from Jcenter to Maven Central.
4049
}
4150
dependencies {
42-
classpath 'com.android.tools.build:gradle:4.1.2'
43-
classpath 'me.2bab:scratchpaper:2.5.4' // Since 2.5.4, the artifactId of ScratchPaper changed from scratch-paper to scratchpaper
51+
classpath 'com.android.tools.build:gradle:4.2.0'
52+
classpath 'me.2bab:scratchpaper:2.6.0' // Since 2.5.4, the artifactId of ScratchPaper changed from scratch-paper to scratchpaper
4453
}
4554
}
4655
```
@@ -81,6 +90,7 @@ ScratchPaper is only supported & tested on LATEST ONE Minor versions of Android
8190

8291
AGP Version|Latest Support Version
8392
-----------|-----------------
93+
4.2.x | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/me.2bab/scratchpaper/badge.svg)](https://search.maven.org/artifact/me.2bab/scratchpaper)
8494
4.1.x | 2.5.4
8595
4.0.x | 2.5.3
8696
3.6.x | 2.5.1

README_zh.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
[中文说明][[English]](./README.md)
66

7-
## ScratchPaper 做了些什么?
7+
ScratchPaper 是给 APK 图标添加 buildType/flavor/version 等构建信息来快速区分不同版本的 Gradle 插件,基于 [Polyfill](https://github.com/2BAB/Polyfill) 框架编写。
88

9-
![](./images/ic_launcher.png)![](./images/ic_launcher_round.png)
9+
## ScratchPaper 解决了什么问题?
1010

11-
![](./images/scratch-paper-json.jpg)
11+
![](./images/launchers_json.jpg)
1212

1313
> 如果你在一台设备上同时安装一个 App 的 Debug 版和 Release 版,你可能很难区分出来到底哪个你要测试的版本(不打开的情况下)。
1414
@@ -17,6 +17,7 @@ ScratchPaper 可以在你的 App icon 上加一个蒙层用以区分出各个 Bu
1717
- 支持 常规 和 圆形 的图标
1818
- 支持 adaptive-icon
1919
- 支持 AAPT2
20+
- 支持自定义文字内容
2021

2122
> 如果你同时打了多个测试包给测试或者产品(例如基于多个复合分支),当他们给你反馈的问题时候你和他们可能都很难分别出每个 App 对应的具体的分支或者 commit 节点。
2223
@@ -29,12 +30,14 @@ ScratchPaper 支持生成编译信息并打包到你的 Apk 中(从 assets 中
2930

3031
## 为什么一定要试试 ScratchPaper
3132

32-
其实市面上不乏有类似的解决方案,例如:akonior/icon-version, akaita/easylauncher-gradle-plugin。但是他们的最重要问题在于:不支持 AAPT2由于 Google 在 18 年底停止了对 aapt1 的支持(enableAapt2=false 将被移除),所以尽早迁移到 AAPT2 其实是一个明智的选择。最后 AAPT2 还会带来额外的诸多好处:
33+
其实市面上不乏有类似的解决方案,例如:akonior/icon-version, akaita/easylauncher-gradle-plugin。但是他们的最重要问题在于:不支持 AAPT2 和新版的 AGP。由于 Google 在 18 年底停止了对 aapt1 的支持(enableAapt2=false 将被移除),所以尽早迁移到 AAPT2 其实是一个明智的选择。最后 AAPT2 还会带来额外的诸多好处:
3334

3435
- 其实对 local debug build 时的性能是有一定提升的
3536
- 修复很多 AAPT1 的低级 Bug (我曾写过一个插件来修复各类 AAPT 处理 Manifest 时的 Bug,具体查阅 https://github.com/2BAB/Seal)
3637
- 同样有办法支持插件化的开发
3738

39+
而保持使用新版本的 AGP 是提升编译速度最简单有效的方式。
40+
3841
## 如何使用?
3942

4043
**0x01. Add the plugin to classpath:**
@@ -46,8 +49,8 @@ buildscript {
4649
mavenCentral() // 从 2.5.4 开始,ScratchPaper 从 Jcenter 迁移到了 Maven Central
4750
}
4851
dependencies {
49-
classpath 'com.android.tools.build:gradle:4.1.2'
50-
classpath 'me.2bab:scratchpaper:2.5.4' // 从 2.5.4 开始,ScratchPaper 的 artifactId 从 scratch-paper 改为 scratchpaper
52+
classpath 'com.android.tools.build:gradle:4.2.0'
53+
classpath 'me.2bab:scratchpaper:2.6.0' // 从 2.5.4 开始,ScratchPaper 的 artifactId 从 scratch-paper 改为 scratchpaper
5154
}
5255
}
5356
```
@@ -88,6 +91,7 @@ scratchPaper {
8891

8992
AGP Version|Latest Support Version
9093
-----------|-----------------
94+
4.2.x | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/me.2bab/scratchpaper/badge.svg)](https://search.maven.org/artifact/me.2bab/scratchpaper)
9195
4.1.x | 2.5.4
9296
4.0.x | 2.5.3
9397
3.6.x | 2.5.1

images/ic_launcher.png

-12.4 KB
Binary file not shown.

images/ic_launcher_round.png

-17.7 KB
Binary file not shown.

images/launchers_json.jpg

148 KB
Loading

images/scratch-paper-json.jpg

-187 KB
Binary file not shown.

0 commit comments

Comments
 (0)