From 5a583923f44289480ae668e35217936e8aa999d2 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Tue, 15 Mar 2022 20:56:51 +0000 Subject: [PATCH 1/7] adding job to checksize and print the output to the PR --- .github/workflows/check_size.yml | 50 ++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/check_size.yml diff --git a/.github/workflows/check_size.yml b/.github/workflows/check_size.yml new file mode 100644 index 0000000..e7d04a6 --- /dev/null +++ b/.github/workflows/check_size.yml @@ -0,0 +1,50 @@ +name: Assemble + +on: + pull_request: + +jobs: + assemble-debug: + name: Assemble debug variant + runs-on: ubuntu-latest + + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: '11' + + - name: Check release size + run: | + echo "::set-output name=APK_SIZE::$(./tools/check-size.sh | tail -1 | cut -d ',' -f2-)" + id: size + + - name: Find Comment + uses: peter-evans/find-comment@v1 + id: fc + with: + issue-number: ${{ github.event.pull_request.number }} + comment-author: 'github-actions[bot]' + body-includes: APK Size + - name: Publish size to PR + uses: peter-evans/create-or-update-comment@v1 + with: + comment-id: ${{ steps.fc.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + body: | + APK Size: ${{ steps.size.outputs.APK_SIZE }} + edit-mode: replace \ No newline at end of file From efd2b086bb11ef69870cfecbcd5d50373ad1584b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Mar 2022 21:02:46 +0000 Subject: [PATCH 2/7] Bump accompanist-systemuicontroller from 0.24.3-alpha to 0.24.4-alpha Bumps [accompanist-systemuicontroller](https://github.com/google/accompanist) from 0.24.3-alpha to 0.24.4-alpha. - [Release notes](https://github.com/google/accompanist/releases) - [Commits](https://github.com/google/accompanist/compare/v0.24.3-alpha...v0.24.4-alpha) --- updated-dependencies: - dependency-name: com.google.accompanist:accompanist-systemuicontroller dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- design-library/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/design-library/build.gradle b/design-library/build.gradle index 3f34d0b..b1087b6 100644 --- a/design-library/build.gradle +++ b/design-library/build.gradle @@ -3,5 +3,5 @@ applyAndroidLibraryModule(project) dependencies { implementation project(":core") implementation("io.coil-kt:coil-compose:1.4.0") - implementation "com.google.accompanist:accompanist-systemuicontroller:0.24.3-alpha" + implementation "com.google.accompanist:accompanist-systemuicontroller:0.24.4-alpha" } \ No newline at end of file From 70880d08366a435940ed66ae17445c10a3514ceb Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Tue, 15 Mar 2022 21:15:17 +0000 Subject: [PATCH 3/7] fetching bundletool --- .github/workflows/check_size.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check_size.yml b/.github/workflows/check_size.yml index e7d04a6..f603448 100644 --- a/.github/workflows/check_size.yml +++ b/.github/workflows/check_size.yml @@ -1,11 +1,11 @@ -name: Assemble +name: Check Size on: pull_request: jobs: - assemble-debug: - name: Assemble debug variant + check-size: + name: Check Size runs-on: ubuntu-latest concurrency: @@ -28,6 +28,12 @@ jobs: distribution: 'adopt' java-version: '11' + - name: Fetch bundletool + run: | + curl -s -L https://github.com/google/bundletool/releases/download/1.9.0/bundletool-all-1.9.0.jar --create-dirs -o bin/bundletool + chmod +x bin/bundletool + echo "$(pwd)/bin" >> $GITHUB_PATH + - name: Check release size run: | echo "::set-output name=APK_SIZE::$(./tools/check-size.sh | tail -1 | cut -d ',' -f2-)" From 0a5f3521f77145d0671ce10d67fdeaa1100579fc Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Tue, 15 Mar 2022 21:56:14 +0000 Subject: [PATCH 5/7] creating bundletool wrapper script --- .github/workflows/check_size.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check_size.yml b/.github/workflows/check_size.yml index f603448..651f4b7 100644 --- a/.github/workflows/check_size.yml +++ b/.github/workflows/check_size.yml @@ -30,7 +30,10 @@ jobs: - name: Fetch bundletool run: | - curl -s -L https://github.com/google/bundletool/releases/download/1.9.0/bundletool-all-1.9.0.jar --create-dirs -o bin/bundletool + curl -s -L https://github.com/google/bundletool/releases/download/1.9.0/bundletool-all-1.9.0.jar --create-dirs -o bin/bundletool.jar + chmod +x bin/bundletool.jar + echo "#!/bin/bash" >> bin/bundletool + echo 'java -jar $(dirname "$0")/bundletool.jar "$@"' >> bin/bundletool chmod +x bin/bundletool echo "$(pwd)/bin" >> $GITHUB_PATH From 49ef9eb5aa4d3b622a53d7401fe0c53094ae6398 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Wed, 16 Mar 2022 20:47:34 +0000 Subject: [PATCH 6/7] hopefully supporting running the check size action on external PRs --- .github/workflows/check_size.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check_size.yml b/.github/workflows/check_size.yml index 651f4b7..93d00f1 100644 --- a/.github/workflows/check_size.yml +++ b/.github/workflows/check_size.yml @@ -1,7 +1,14 @@ name: Check Size +## Workaround for allow size checks on external PRs/dependabot on: - pull_request: + pull_request_target: + types: + - opened + - synchronize + - reopened +permissions: + pull-requests: write jobs: check-size: From 226925366d91f7a09e60b3ed7defcaaa085e02c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Mar 2022 20:50:26 +0000 Subject: [PATCH 7/7] Bump ktorVer from 1.6.7 to 1.6.8 Bumps `ktorVer` from 1.6.7 to 1.6.8. Updates `ktor-client-android` from 1.6.7 to 1.6.8 - [Release notes](https://github.com/ktorio/ktor/releases) - [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md) - [Commits](https://github.com/ktorio/ktor/compare/1.6.7...1.6.8) Updates `ktor-client-core` from 1.6.7 to 1.6.8 - [Release notes](https://github.com/ktorio/ktor/releases) - [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md) - [Commits](https://github.com/ktorio/ktor/compare/1.6.7...1.6.8) Updates `ktor-client-serialization` from 1.6.7 to 1.6.8 - [Release notes](https://github.com/ktorio/ktor/releases) - [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md) - [Commits](https://github.com/ktorio/ktor/compare/1.6.7...1.6.8) Updates `ktor-client-logging-jvm` from 1.6.7 to 1.6.8 - [Release notes](https://github.com/ktorio/ktor/releases) - [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md) - [Commits](https://github.com/ktorio/ktor/compare/1.6.7...1.6.8) Updates `ktor-client-java` from 1.6.7 to 1.6.8 - [Release notes](https://github.com/ktorio/ktor/releases) - [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md) - [Commits](https://github.com/ktorio/ktor/compare/1.6.7...1.6.8) --- updated-dependencies: - dependency-name: io.ktor:ktor-client-android dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.ktor:ktor-client-core dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.ktor:ktor-client-serialization dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.ktor:ktor-client-logging-jvm dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.ktor:ktor-client-java dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- dependencies.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies.gradle b/dependencies.gradle index d2d8453..91151f1 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -91,7 +91,7 @@ ext.Dependencies.with { def kotlinVer = "1.6.10" def sqldelightVer = "1.5.3" def composeVer = "1.1.0" - def ktorVer = "1.6.7" + def ktorVer = "1.6.8" google = new DependenciesContainer() google.with {