Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

Commit 5fbd4ad

Browse files
authored
Merge branch 'main' into publish-on-ado
2 parents 8d91ace + c7f1c58 commit 5fbd4ad

File tree

2 files changed

+118
-118
lines changed

2 files changed

+118
-118
lines changed

README.md

Lines changed: 111 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,111 @@
1-
# Introduction
2-
3-
This repository contains an [Azure DevOps Task](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/tasks?view=azure-devops&tabs=yaml) and a [GitHub Workflow Action](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idsteps). See below usage examples to start using this in your CI.
4-
5-
These are the minimal checks we run on our own PRs for [SwiftKey](https://play.google.com/store/apps/details?id=com.touchtype.swiftkey), however we're happy to accept contributions. See [contributing section](#contributing) below if you would like to expand this action's features.
6-
7-
## Usage examples
8-
9-
- In a Azure DevOps Pipeline
10-
11-
```yml
12-
- task: android-app-size-diff@1
13-
inputs:
14-
baseAppPath: test/assets/test.apk
15-
targetAppPath: test/assets/test.apk
16-
summaryOutputPath: summary.md
17-
displayName: Run APK size comparision
18-
```
19-
20-
- In a GitHub Workflow
21-
22-
```yml
23-
- uses: microsoft/android-app-size-diff@v1
24-
name: Run APK size comparision
25-
with:
26-
baseAppPath: test/assets/test.apk
27-
targetAppPath: test/assets/test.apk
28-
summaryOutputPath: summary.md
29-
```
30-
31-
## Usage API
32-
The API to use the GitHub action or Azure DevOps task is similar
33-
34-
### Inputs
35-
36-
- `baseAppPath`: Path to base apk. This is the app before changes
37-
- required: true
38-
- default: 'base.apk'
39-
- `baseAppLabel`: Label to use for the base app in the report
40-
- required: false
41-
- default: 'Base APK'
42-
- `targetAppPath`: Path to target apk. This is the app after changes
43-
- required: true
44-
- default: 'target.apk'
45-
- `targetAppLabel`: Label to use for the base app in the report
46-
- required: false
47-
- default: 'Target APK'
48-
- `summaryOutputPath`: Output file where comparision summary should be written to
49-
- required: true
50-
- default: 'summary.md'
51-
- `metrics`: A comma seperated list of size metrics to include in the summary. Possible values are `apkSize`, `installSize`, `dexFiles`, `arscFile`, `nativeLibs`
52-
- required: false
53-
- default: 'apkSize, installSize, dexFiles, arscFile, nativeLibs'
54-
- `thresholds`: A comma seperated list of thresholds for each of the metrics in bytes. If this is empty, no thresholding will apply. When this is not empty, the task will fail when any of the given thresholds are crossed
55-
- required: false
56-
- default: ''
57-
- `telemetryEnabled`: Set to `false` to disable telemetry
58-
- required: false
59-
- default: 'true'
60-
61-
# Data Collection
62-
63-
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft's privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
64-
65-
To disable data collection when using this extension, set the `telemetryEnabled` input to `false`
66-
67-
# Contributing
68-
69-
This project welcomes contributions and suggestions. Most contributions require you to agree to a
70-
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
71-
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
72-
73-
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
74-
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
75-
provided by the bot. You will only need to do this once across all repos using our CLA.
76-
77-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
78-
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
79-
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
80-
81-
## Setting up development
82-
83-
Starting by cloning the repository. If your changes are small, feel free to open a PR with changes and the CI will take care of testing that everything still works with your changes. For something more long term or local testing, read on.
84-
85-
### Installations
86-
- Install all global dependencies
87-
```shell
88-
npm install -g typescript
89-
npm install -g ts-node
90-
npm install -g mocha
91-
92-
# Only if you are compiling the GitHub plugin
93-
npm install -g @zeit/ncc
94-
95-
# Only if you are publishing to ADO. Not required for most scenarios
96-
npm install -g tfx-cli
97-
```
98-
- Install all project dependencies
99-
`npm install`
100-
101-
### Running
102-
103-
See `package.json` for full list of npm tasks. The below should be sufficient to get you started
104-
105-
- Build code `npm run build`
106-
- Run ADO plugin locally `npm run adoTask`
107-
- See [ADO Custom Task docs](https://docs.microsoft.com/en-us/azure/devops/extend/develop/add-build-task?view=azure-devops#run-the-task) to understand what variables to set - basically all task inputs
108-
- Run all tests `npm run test`
109-
- Likely a better way to test your changes
110-
- Bundle all plugins `npm run bundle`
111-
1+
# Introduction
2+
3+
This repository contains an [Azure DevOps Task](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/tasks?view=azure-devops&tabs=yaml) and a [GitHub Workflow Action](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idsteps). See below usage examples to start using this in your CI.
4+
5+
These are the minimal checks we run on our own PRs for [SwiftKey](https://play.google.com/store/apps/details?id=com.touchtype.swiftkey), however we're happy to accept contributions. See [contributing section](#contributing) below if you would like to expand this action's features.
6+
7+
## Usage examples
8+
9+
- In a Azure DevOps Pipeline
10+
11+
```yml
12+
- task: android-app-size-diff@1
13+
inputs:
14+
baseAppPath: test/assets/test.apk
15+
targetAppPath: test/assets/test.apk
16+
summaryOutputPath: summary.md
17+
displayName: Run APK size comparision
18+
```
19+
20+
- In a GitHub Workflow
21+
22+
```yml
23+
- uses: microsoft/android-app-size-diff@v1
24+
name: Run APK size comparision
25+
with:
26+
baseAppPath: test/assets/test.apk
27+
targetAppPath: test/assets/test.apk
28+
summaryOutputPath: summary.md
29+
```
30+
31+
## Usage API
32+
The API to use the GitHub action or Azure DevOps task is similar
33+
34+
### Inputs
35+
36+
- `baseAppPath`: Path to base apk. This is the app before changes
37+
- required: true
38+
- default: 'base.apk'
39+
- `baseAppLabel`: Label to use for the base app in the report
40+
- required: false
41+
- default: 'Base APK'
42+
- `targetAppPath`: Path to target apk. This is the app after changes
43+
- required: true
44+
- default: 'target.apk'
45+
- `targetAppLabel`: Label to use for the base app in the report
46+
- required: false
47+
- default: 'Target APK'
48+
- `summaryOutputPath`: Output file where comparision summary should be written to
49+
- required: true
50+
- default: 'summary.md'
51+
- `metrics`: A comma seperated list of size metrics to include in the summary. Possible values are `apkSize`, `installSize`, `dexFiles`, `arscFile`, `nativeLibs`
52+
- required: false
53+
- default: 'apkSize, installSize, dexFiles, arscFile, nativeLibs'
54+
- `thresholds`: A comma seperated list of thresholds for each of the metrics in bytes. If this is empty, no thresholding will apply. When this is not empty, the task will fail when any of the given thresholds are crossed
55+
- required: false
56+
- default: ''
57+
- `telemetryEnabled`: Set to `false` to disable telemetry
58+
- required: false
59+
- default: 'true'
60+
61+
# Data Collection
62+
63+
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft's privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
64+
65+
To disable data collection when using this extension, set the `telemetryEnabled` input to `false`
66+
67+
# Contributing
68+
69+
This project welcomes contributions and suggestions. Most contributions require you to agree to a
70+
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
71+
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
72+
73+
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
74+
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
75+
provided by the bot. You will only need to do this once across all repos using our CLA.
76+
77+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
78+
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
79+
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
80+
81+
## Setting up development
82+
83+
Starting by cloning the repository. If your changes are small, feel free to open a PR with changes and the CI will take care of testing that everything still works with your changes. For something more long term or local testing, read on.
84+
85+
### Installations
86+
- Install all global dependencies
87+
```shell
88+
npm install -g typescript
89+
npm install -g ts-node
90+
npm install -g mocha
91+
92+
# Only if you are compiling the GitHub plugin
93+
npm install -g @zeit/ncc
94+
95+
# Only if you are publishing to ADO. Not required for most scenarios
96+
npm install -g tfx-cli
97+
```
98+
- Install all project dependencies
99+
`npm install`
100+
101+
### Running
102+
103+
See `package.json` for full list of npm tasks. The below should be sufficient to get you started
104+
105+
- Build code `npm run build`
106+
- Run ADO plugin locally `npm run adoTask`
107+
- See [ADO Custom Task docs](https://docs.microsoft.com/en-us/azure/devops/extend/develop/add-build-task?view=azure-devops#run-the-task) to understand what variables to set - basically all task inputs
108+
- Run all tests `npm run test`
109+
- Likely a better way to test your changes
110+
- Bundle all plugins `npm run bundle`
111+

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)