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

Commit 0529225

Browse files
authored
Merge pull request #22 from microsoft/publish-on-ado
Publish extension as preview on ADO
2 parents c7f1c58 + 5fbd4ad commit 0529225

File tree

6 files changed

+173
-117
lines changed

6 files changed

+173
-117
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@0
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@v0.32
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+

ado-extension.json

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,39 @@
22
"manifestVersion": 1,
33
"id": "android-app-size-diff-utils",
44
"name": "Android app size changes",
5-
"version": "0.0.31",
6-
"publisher": "PraveenPendyala",
5+
"version": "1.0.5",
6+
"publisher": "MSSwiftKey",
77
"targets": [
88
{
99
"id": "Microsoft.VisualStudio.Services"
1010
}
1111
],
1212
"description": "Tools for Android app size changes",
13+
"tags": [
14+
"Android",
15+
"App size",
16+
"Developer tools"
17+
],
1318
"categories": [
1419
"Azure Pipelines"
1520
],
1621
"icons": {
17-
"default": "dist/src/assets/appSizeChangesIcon.png"
22+
"default": "src/assets/appSizeChangesIcon.png"
1823
},
1924
"files": [
2025
{
2126
"path": "dist/src"
2227
}
2328
],
29+
"repository": {
30+
"type": "git",
31+
"uri": "https://github.com/microsoft/android-app-size-diff"
32+
},
33+
"content": {
34+
"details": {
35+
"path": "src/assets/overview.md"
36+
}
37+
},
2438
"contributions": [
2539
{
2640
"id": "android-app-size-diff",
@@ -32,5 +46,8 @@
3246
"name": "dist/src"
3347
}
3448
}
49+
],
50+
"galleryFlags": [
51+
"Public"
3552
]
3653
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "android-app-size-diff",
3-
"version": "0.0.32",
3+
"version": "1.0.5",
44
"description": "Azure DevOps task to measure the size in Android app size by looking at 2 given APKs and AABs",
55
"main": "index.js",
66
"scripts": {

src/assets/appSizeChangesIcon.png

-6.09 KB
Loading

src/assets/overview.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## Usage examples
2+
3+
- In a Azure DevOps Pipeline
4+
5+
```yml
6+
- task: android-app-size-diff@1
7+
inputs:
8+
baseAppPath: test/assets/test.apk
9+
targetAppPath: test/assets/test.apk
10+
summaryOutputPath: summary.md
11+
displayName: Run APK size comparision
12+
```
13+
14+
## Inputs
15+
16+
- `baseAppPath`: Path to base apk. This is the app before changes
17+
- required: true
18+
- default: 'base.apk'
19+
- `baseAppLabel`: Label to use for the base app in the report
20+
- required: false
21+
- default: 'Base APK'
22+
- `targetAppPath`: Path to target apk. This is the app after changes
23+
- required: true
24+
- default: 'target.apk'
25+
- `targetAppLabel`: Label to use for the base app in the report
26+
- required: false
27+
- default: 'Target APK'
28+
- `summaryOutputPath`: Output file where comparision summary should be written to
29+
- required: true
30+
- default: 'summary.md'
31+
- `metrics`: A comma seperated list of size metrics to include in the summary. Possible values are `apkSize`, `installSize`, `dexFiles`, `arscFile`, `nativeLibs`
32+
- required: false
33+
- default: 'apkSize, installSize, dexFiles, arscFile, nativeLibs'
34+
- `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
35+
- required: false
36+
- default: ''
37+
- `telemetryEnabled`: Set to `false` to disable telemetry
38+
- required: false
39+
- default: 'true'

src/task.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"category": "Utility",
99
"author": "Microsoft",
1010
"version": {
11-
"Major": 0,
11+
"Major": 1,
1212
"Minor": 0,
13-
"Patch": 31
13+
"Patch": 5
1414
},
1515
"instanceNameFormat": "Android App size change - $(baseAppPath) vs $(targetAppPath)",
1616
"inputs": [

0 commit comments

Comments
 (0)