Update dependency androidx.annotation:annotation to v1.8.0 #570
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Task for library update | |
on: | |
pull_request: | |
types: [ opened, synchronize, reopened, ready_for_review ] | |
branches: | |
- develop | |
paths: | |
- 'gradle/libs.versions.toml' | |
- 'build.gradle' | |
jobs: | |
upload_dependency_list: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Decode google-services.json | |
env: | |
GOOGLE_SERVICE: ${{ secrets.GOOGLE_SERVICE}} | |
run: echo $GOOGLE_SERVICE | base64 --decode > ./app/google-services.json | |
- name: Create dependency list | |
env: | |
TZ: Asia/Tokyo | |
run: ./gradlew app:dependencies > depend.txt | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Dependency list | |
path: depend.txt | |
android_test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 90 | |
strategy: | |
fail-fast: false | |
matrix: | |
api-level: | |
- 30 | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Cache Gradle packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Decode google-services.json | |
env: | |
GOOGLE_SERVICE: ${{ secrets.GOOGLE_SERVICE}} | |
run: echo $GOOGLE_SERVICE | base64 --decode > ./app/google-services.json | |
- name: Replace Admob ID | |
env: | |
ADMOB_ID_MYCURATION: ${{ secrets.ADMOB_ID_MYCURATION }} | |
run: mkdir -p ~/.gradle && touch ~/.gradle/gradle.properties && echo ADMOB_ID_MYCURATION=$ADMOB_ID_MYCURATION > ~/.gradle/gradle.properties | |
- name: Enable KVM | |
run: | | |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
sudo udevadm control --reload-rules | |
sudo udevadm trigger --name-match=kvm | |
- name: Build AndroidTest apps | |
run: ./gradlew packageDebug packageDebugAndroidTest --daemon | |
- name: Run androidTest | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.api-level }} | |
arch: x86_64 | |
disable-animations: true | |
disk-size: 6000M | |
heap-size: 600M | |
emulator-boot-timeout: 12000 | |
ram-size: 4096M | |
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
script: ./gradlew :app:connectedDebugAndroidTest --daemon | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v4 | |
if: always() | |
with: | |
report_paths: '**/build/outputs/androidTest-results/connected//TEST-*.xml' | |
check_name: 'androidTest Report' | |
dependency_diff: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
with: | |
fetch-depth: 0 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- id: dependency-diff | |
name: Generate dependency diff | |
run: | | |
BRANCH_NAME="${GITHUB_HEAD_REF}" | |
DIFF=$(scripts/dependency_diff.sh $BASE_BRANCH $BRANCH_NAME app releaseRuntimeClasspath) | |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) | |
echo "text-diff<<${EOF}" >> $GITHUB_OUTPUT | |
echo "${DIFF}" >> $GITHUB_OUTPUT | |
echo "${EOF}" >> $GITHUB_OUTPUT | |
env: | |
BASE_BRANCH: ${{ github.base_ref }} | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- uses: peter-evans/find-comment@b80e3f1127f9f13a42d50c0fc404ed367091084f | |
id: find_comment | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body-includes: Dependency diff | |
- uses: peter-evans/create-or-update-comment@71ac479718f8aed504782bc920d802da994c05fa | |
if: ${{ steps.dependency-diff.outputs.text-diff != null || steps.find_comment.outputs.comment-id != null }} | |
with: | |
body: | | |
Dependency diff: | |
```diff | |
${{ steps.dependency-diff.outputs.text-diff }} | |
``` | |
edit-mode: replace | |
comment-id: ${{ steps.find_comment.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
token: ${{ secrets.GITHUB_TOKEN }} |