diff --git a/.github/workflows/check_size.yml b/.github/workflows/check_size.yml new file mode 100644 index 0000000..93d00f1 --- /dev/null +++ b/.github/workflows/check_size.yml @@ -0,0 +1,66 @@ +name: Check Size + +## Workaround for allow size checks on external PRs/dependabot +on: + pull_request_target: + types: + - opened + - synchronize + - reopened +permissions: + pull-requests: write + +jobs: + check-size: + name: Check Size + 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: 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.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 + + - 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 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 { 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