From e079a6eb18bb79cf1efc27091dde2ea37805da2e Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 19:22:21 +0900 Subject: [PATCH 01/29] Create Dangerfile --- Dangerfile | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Dangerfile diff --git a/Dangerfile b/Dangerfile new file mode 100644 index 0000000..1725ddf --- /dev/null +++ b/Dangerfile @@ -0,0 +1,4 @@ +github.dismiss_out_of_range_messages + +chikuwa.inline_mode = true +chikuwa.report "build.log" From 9531e3e986a203d19936bc8634191a41f5c4d24c Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 19:35:54 +0900 Subject: [PATCH 02/29] Update ci.yml --- .github/workflows/ci.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 391b665..f4e9d73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,12 +19,23 @@ jobs: java-version: '11' distribution: 'temurin' cache: gradle - - name: Grant execute permission for gradlew run: chmod +x gradlew - - name: assembleDebug with Gradle - run: ./gradlew assembleDebug + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.6 + bundler-cache: true + - name: Install Danger + run: | + gem install danger:8.4.2 + gem install danger-chikuwa + - name: Build + run: ./gradlew assembleDebug 2>&1 | tee build.log + continue-on-error: true + - name: Run Danger + run: danger --remove-previous-comments + env: + DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: test with Gradle run: ./gradlew test - - From dc4cfa1a06414de26a9ce91a2f1a336c4636ce88 Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 19:37:08 +0900 Subject: [PATCH 03/29] Update ci.yml --- .github/workflows/ci.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4e9d73..c86f255 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,9 +8,7 @@ on: jobs: build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 - name: set up JDK 11 @@ -37,5 +35,18 @@ jobs: run: danger --remove-previous-comments env: DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: gradle + - name: Grant execute permission for gradlew + run: chmod +x gradlew - name: test with Gradle run: ./gradlew test From 5815fdefa404f71fa2a810b4d035e29d3c3d6f73 Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 20:02:55 +0900 Subject: [PATCH 04/29] Update ci.yml --- .github/workflows/ci.yml | 56 ++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c86f255..3faaba1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,44 +9,60 @@ on: jobs: build: runs-on: ubuntu-latest + + steps: + # https://github.com/styfle/cancel-workflow-action#usage + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.11.0 + with: + access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v3 + - name: set up JDK 11 uses: actions/setup-java@v3 with: java-version: '11' distribution: 'temurin' cache: gradle - - name: Grant execute permission for gradlew - run: chmod +x gradlew + + # - name: Grant execute permission for gradlew + # run: chmod +x gradlew + + # https://github.com/ruby/setup-ruby#single-job - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: '3.0' bundler-cache: true + - name: Install Danger run: | - gem install danger:8.4.2 + gem install danger:9.2.0 gem install danger-chikuwa - - name: Build - run: ./gradlew assembleDebug 2>&1 | tee build.log + + - name: Create local.properties + env: + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_ACCESS_TOKEN }} + run: | + echo "GITHUB_ACCESS_TOKEN=$GITHUB_ACCESS_TOKEN" >> local.properties + + - name: Build and check + run: | + ./gradlew lintDebug + ./gradlew testDebug + ./gradlew assembleDebug 2>&1 | tee build.log continue-on-error: true + - name: Run Danger run: danger --remove-previous-comments env: DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: set up JDK 11 - uses: actions/setup-java@v3 + + # https://github.com/actions/upload-artifact#usage + - name: Upload build outputs + uses: actions/upload-artifact@v3 with: - java-version: '11' - distribution: 'temurin' - cache: gradle - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: test with Gradle - run: ./gradlew test + name: build-outputs + path: app/build/outputs/apk/**/*.apk From 4e04a773b04f0993cd49486a6fc61f1f3d4b43a7 Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 20:06:36 +0900 Subject: [PATCH 05/29] Update ci.yml --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3faaba1..442579b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,6 @@ jobs: - name: Build and check run: | - ./gradlew lintDebug ./gradlew testDebug ./gradlew assembleDebug 2>&1 | tee build.log continue-on-error: true From d8763498061f4678b5d58baab529e57143ce04f8 Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 20:12:40 +0900 Subject: [PATCH 06/29] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 442579b..c1c7f31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: - name: Create local.properties env: - GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_ACCESS_TOKEN }} + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | echo "GITHUB_ACCESS_TOKEN=$GITHUB_ACCESS_TOKEN" >> local.properties From e9566325e739763c2cec1c10cbab224e91f30704 Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 20:17:45 +0900 Subject: [PATCH 07/29] Update ci.yml --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1c7f31..1634d3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,8 @@ jobs: - name: Build and check run: | - ./gradlew testDebug + ./gradlew lintDevelopmentDebugUnitTest + ./gradlew testDevelopmentDebugUnitTest ./gradlew assembleDebug 2>&1 | tee build.log continue-on-error: true From 70395216b6767d2d8398d6dcfbc71431ba9ee25c Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 20:18:04 +0900 Subject: [PATCH 08/29] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1634d3f..b1cafa8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: - name: Build and check run: | - ./gradlew lintDevelopmentDebugUnitTest + ./gradlew lintDevelopmentDebug ./gradlew testDevelopmentDebugUnitTest ./gradlew assembleDebug 2>&1 | tee build.log continue-on-error: true From 244923efabc7e8b4517bc71a729d5348a778c11c Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 21:00:34 +0900 Subject: [PATCH 09/29] Update ci.yml --- .github/workflows/ci.yml | 46 ++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1cafa8..a6ae5d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,14 +2,15 @@ name: Android CI on: push: - branches: [ "main", "develop", /^release\-.*$/ ] + branches: [ "main", "develop", "releases/**", "releases-**" ] pull_request: - branches: [ "main", "develop", /^release\-.*$/ ] + types: [opened, reopened] + # types: [review_requested] jobs: build: runs-on: ubuntu-latest - + timeout-minutes: 60 steps: # https://github.com/styfle/cancel-workflow-action#usage @@ -26,9 +27,6 @@ jobs: java-version: '11' distribution: 'temurin' cache: gradle - - # - name: Grant execute permission for gradlew - # run: chmod +x gradlew # https://github.com/ruby/setup-ruby#single-job - name: Set up Ruby @@ -48,21 +46,41 @@ jobs: run: | echo "GITHUB_ACCESS_TOKEN=$GITHUB_ACCESS_TOKEN" >> local.properties - - name: Build and check + # - name: Runs lint on the default variant. + # run: ./gradlew lint + + - name: Run unit tests for all variants. + run: ./gradlew test + + - name: Build tasks (Assemble main outputs for all the variants.) run: | - ./gradlew lintDevelopmentDebug - ./gradlew testDevelopmentDebugUnitTest - ./gradlew assembleDebug 2>&1 | tee build.log - continue-on-error: true + ./gradlew assemble 2>&1 | tee build.log + # continue-on-error: true - name: Run Danger run: danger --remove-previous-comments env: DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # https://github.com/actions/upload-artifact#usage - - name: Upload build outputs + # https://github.com/android/nowinandroid/blob/main/.github/workflows/Build.yaml + - name: Upload build outputs (APKs) uses: actions/upload-artifact@v3 with: name: build-outputs - path: app/build/outputs/apk/**/*.apk + path: app/build/outputs + + - name: Upload build reports + if: always() + uses: actions/upload-artifact@v3 + with: + name: build-reports + path: app/build/reports + + # https://github.com/softprops/action-gh-release#%EF%B8%8F-uploading-release-assets + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + app/build/outputs + # app/build/reports From 63df1da58031025351cfc01d19562d53dec5fb7a Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 21:24:16 +0900 Subject: [PATCH 10/29] Create release.yml --- .github/workflows/release.yml | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c75388e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,41 @@ +name: Android Release + +on: + push: + tags: + - 'v*' + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 60 + + steps: + - uses: actions/checkout@v3 + + - name: set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: gradle + + - name: Create local.properties + env: + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "GITHUB_ACCESS_TOKEN=$GITHUB_ACCESS_TOKEN" >> local.properties + + - name: Release Build tasks (apk and aab) + run: | + ./gradlew assembleProductionRelease + ./gradlew bundleProductionRelease + + # https://github.com/softprops/action-gh-release#%EF%B8%8F-uploading-release-assets + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + app/build/outputs + app/build/reports From 623f142975dcc0a80e2303716407c3a4e79c645f Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 21:24:39 +0900 Subject: [PATCH 11/29] Update ci.yml --- .github/workflows/ci.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a6ae5d5..89f807a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,12 +75,3 @@ jobs: with: name: build-reports path: app/build/reports - - # https://github.com/softprops/action-gh-release#%EF%B8%8F-uploading-release-assets - - name: Release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - files: | - app/build/outputs - # app/build/reports From c30d26fa2593dbae7d935a3362d89876062ddf2b Mon Sep 17 00:00:00 2001 From: ando Date: Sat, 25 Feb 2023 21:52:01 +0900 Subject: [PATCH 12/29] =?UTF-8?q?=E3=82=8F=E3=81=96=E3=81=A8Lint=20warning?= =?UTF-8?q?=E5=87=BA=E3=81=99=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/leoleo/androidgithubsearch/MainActivity.kt | 1 + .../java/com/leoleo/androidgithubsearch/Foo1.java | 5 +++++ .../production/java/com/leoleo/androidgithubsearch/Foo1.java | 5 +++++ .../staging/java/com/leoleo/androidgithubsearch/Foo1.java | 5 +++++ data/src/stub/java/com/leoleo/androidgithubsearch/Foo1.java | 5 +++++ 5 files changed, 21 insertions(+) create mode 100644 data/src/development/java/com/leoleo/androidgithubsearch/Foo1.java create mode 100644 data/src/production/java/com/leoleo/androidgithubsearch/Foo1.java create mode 100644 data/src/staging/java/com/leoleo/androidgithubsearch/Foo1.java create mode 100644 data/src/stub/java/com/leoleo/androidgithubsearch/Foo1.java diff --git a/app/src/main/java/com/leoleo/androidgithubsearch/MainActivity.kt b/app/src/main/java/com/leoleo/androidgithubsearch/MainActivity.kt index 45e8f34..9e18bbb 100644 --- a/app/src/main/java/com/leoleo/androidgithubsearch/MainActivity.kt +++ b/app/src/main/java/com/leoleo/androidgithubsearch/MainActivity.kt @@ -16,6 +16,7 @@ class MainActivity : ComponentActivity() { WindowCompat.setDecorFitsSystemWindows(window, false) super.onCreate(savedInstanceState) setContent { + val a = "" // わざとLint warning出す。 val windowSizeClass = calculateWindowSizeClass(this) MainScreen(windowSizeClass.widthSizeClass) } diff --git a/data/src/development/java/com/leoleo/androidgithubsearch/Foo1.java b/data/src/development/java/com/leoleo/androidgithubsearch/Foo1.java new file mode 100644 index 0000000..8e7a1fa --- /dev/null +++ b/data/src/development/java/com/leoleo/androidgithubsearch/Foo1.java @@ -0,0 +1,5 @@ +package com.leoleo.androidgithubsearch; + +// フレーバーでの確認: わざとLint warning出す。 +public class Foo1 { +} diff --git a/data/src/production/java/com/leoleo/androidgithubsearch/Foo1.java b/data/src/production/java/com/leoleo/androidgithubsearch/Foo1.java new file mode 100644 index 0000000..8e7a1fa --- /dev/null +++ b/data/src/production/java/com/leoleo/androidgithubsearch/Foo1.java @@ -0,0 +1,5 @@ +package com.leoleo.androidgithubsearch; + +// フレーバーでの確認: わざとLint warning出す。 +public class Foo1 { +} diff --git a/data/src/staging/java/com/leoleo/androidgithubsearch/Foo1.java b/data/src/staging/java/com/leoleo/androidgithubsearch/Foo1.java new file mode 100644 index 0000000..8e7a1fa --- /dev/null +++ b/data/src/staging/java/com/leoleo/androidgithubsearch/Foo1.java @@ -0,0 +1,5 @@ +package com.leoleo.androidgithubsearch; + +// フレーバーでの確認: わざとLint warning出す。 +public class Foo1 { +} diff --git a/data/src/stub/java/com/leoleo/androidgithubsearch/Foo1.java b/data/src/stub/java/com/leoleo/androidgithubsearch/Foo1.java new file mode 100644 index 0000000..8e7a1fa --- /dev/null +++ b/data/src/stub/java/com/leoleo/androidgithubsearch/Foo1.java @@ -0,0 +1,5 @@ +package com.leoleo.androidgithubsearch; + +// フレーバーでの確認: わざとLint warning出す。 +public class Foo1 { +} From 5234e45a9e38f78f9e0b9ba18beae4fae83f1d27 Mon Sep 17 00:00:00 2001 From: ando Date: Sat, 25 Feb 2023 22:09:59 +0900 Subject: [PATCH 13/29] =?UTF-8?q?=E3=82=8F=E3=81=96=E3=81=A8Lint=20warning?= =?UTF-8?q?=E5=87=BA=E3=81=99=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/leoleo/androidgithubsearch/MainActivity.kt | 3 +++ .../development/java/com/leoleo/androidgithubsearch/Foo1.java | 1 + 2 files changed, 4 insertions(+) diff --git a/app/src/main/java/com/leoleo/androidgithubsearch/MainActivity.kt b/app/src/main/java/com/leoleo/androidgithubsearch/MainActivity.kt index 9e18bbb..86b9cd9 100644 --- a/app/src/main/java/com/leoleo/androidgithubsearch/MainActivity.kt +++ b/app/src/main/java/com/leoleo/androidgithubsearch/MainActivity.kt @@ -20,5 +20,8 @@ class MainActivity : ComponentActivity() { val windowSizeClass = calculateWindowSizeClass(this) MainScreen(windowSizeClass.widthSizeClass) } + this.addOnContextAvailableListener { context -> + + } } } \ No newline at end of file diff --git a/data/src/development/java/com/leoleo/androidgithubsearch/Foo1.java b/data/src/development/java/com/leoleo/androidgithubsearch/Foo1.java index 8e7a1fa..031a448 100644 --- a/data/src/development/java/com/leoleo/androidgithubsearch/Foo1.java +++ b/data/src/development/java/com/leoleo/androidgithubsearch/Foo1.java @@ -2,4 +2,5 @@ // フレーバーでの確認: わざとLint warning出す。 public class Foo1 { + } From 3ebafa0ce045b011ca3b4f9a2007dc028e1d580f Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 22:11:50 +0900 Subject: [PATCH 14/29] Update ci.yml --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89f807a..f10d2b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,10 +14,10 @@ jobs: steps: # https://github.com/styfle/cancel-workflow-action#usage - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - access_token: ${{ secrets.GITHUB_TOKEN }} + # - name: Cancel Previous Runs + # uses: styfle/cancel-workflow-action@0.11.0 + # with: + # access_token: ${{ secrets.GITHUB_TOKEN }} - uses: actions/checkout@v3 From 2c05ff2f14f029844d83bcd824a7b68800ccb7fc Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 22:13:10 +0900 Subject: [PATCH 15/29] Update ci.yml --- .github/workflows/ci.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f10d2b4..6c5ea73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,8 +4,6 @@ on: push: branches: [ "main", "develop", "releases/**", "releases-**" ] pull_request: - types: [opened, reopened] - # types: [review_requested] jobs: build: @@ -14,10 +12,10 @@ jobs: steps: # https://github.com/styfle/cancel-workflow-action#usage - # - name: Cancel Previous Runs - # uses: styfle/cancel-workflow-action@0.11.0 - # with: - # access_token: ${{ secrets.GITHUB_TOKEN }} + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.11.0 + with: + access_token: ${{ secrets.GITHUB_TOKEN }} - uses: actions/checkout@v3 From ad38255a520d3ba41557c22cd97b24376f6d64ae Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 22:14:20 +0900 Subject: [PATCH 16/29] Update ci.yml --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c5ea73..2d17a4b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,6 @@ name: Android CI on: push: - branches: [ "main", "develop", "releases/**", "releases-**" ] pull_request: jobs: From 48108eb9592823523798662a613abde68b0ddaf1 Mon Sep 17 00:00:00 2001 From: ando Date: Sat, 25 Feb 2023 22:14:33 +0900 Subject: [PATCH 17/29] =?UTF-8?q?=E3=82=8F=E3=81=96=E3=81=A8Lint=20warning?= =?UTF-8?q?=E5=87=BA=E3=81=99=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/leoleo/androidgithubsearch/MainActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/leoleo/androidgithubsearch/MainActivity.kt b/app/src/main/java/com/leoleo/androidgithubsearch/MainActivity.kt index 86b9cd9..76faf12 100644 --- a/app/src/main/java/com/leoleo/androidgithubsearch/MainActivity.kt +++ b/app/src/main/java/com/leoleo/androidgithubsearch/MainActivity.kt @@ -20,7 +20,7 @@ class MainActivity : ComponentActivity() { val windowSizeClass = calculateWindowSizeClass(this) MainScreen(windowSizeClass.widthSizeClass) } - this.addOnContextAvailableListener { context -> + this.addOnContextAvailableListener { ctx -> } } From 0ca13ed32a76072c1557f84b89e29ff60bc23edb Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 22:35:50 +0900 Subject: [PATCH 18/29] Update ci.yml --- .github/workflows/ci.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d17a4b..626ef7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,7 @@ jobs: - name: Install Danger run: | + gem install faraday-retry:2.1.1 gem install danger:9.2.0 gem install danger-chikuwa @@ -42,17 +43,13 @@ jobs: GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | echo "GITHUB_ACCESS_TOKEN=$GITHUB_ACCESS_TOKEN" >> local.properties - - # - name: Runs lint on the default variant. - # run: ./gradlew lint - - name: Run unit tests for all variants. - run: ./gradlew test + - name: Run unit tests for developmentDebug the variants. + run: ./gradlew testDevelopmentDebugUnitTest - - name: Build tasks (Assemble main outputs for all the variants.) + - name: Build tasks (Assemble main outputs for developmentDebug the variants.) run: | - ./gradlew assemble 2>&1 | tee build.log - # continue-on-error: true + ./gradlew assembleDevelopmentDebug 2>&1 | tee build.log - name: Run Danger run: danger --remove-previous-comments From 641d9654b03db92b8ce12de12e451f556536b629 Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 22:45:27 +0900 Subject: [PATCH 19/29] Delete Dangerfile --- Dangerfile | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 Dangerfile diff --git a/Dangerfile b/Dangerfile deleted file mode 100644 index 1725ddf..0000000 --- a/Dangerfile +++ /dev/null @@ -1,4 +0,0 @@ -github.dismiss_out_of_range_messages - -chikuwa.inline_mode = true -chikuwa.report "build.log" From 8eb3b27a962edb5d494fbe6eedebdba6143c38c1 Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 23:00:54 +0900 Subject: [PATCH 20/29] Update ci.yml --- .github/workflows/ci.yml | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 626ef7e..c7293c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,19 +24,6 @@ jobs: java-version: '11' distribution: 'temurin' cache: gradle - - # https://github.com/ruby/setup-ruby#single-job - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: '3.0' - bundler-cache: true - - - name: Install Danger - run: | - gem install faraday-retry:2.1.1 - gem install danger:9.2.0 - gem install danger-chikuwa - name: Create local.properties env: @@ -44,17 +31,15 @@ jobs: run: | echo "GITHUB_ACCESS_TOKEN=$GITHUB_ACCESS_TOKEN" >> local.properties + - name: Run lint for developmentDebug the variants. + run: ./gradlew lintDevelopmentDebug + - name: Run unit tests for developmentDebug the variants. run: ./gradlew testDevelopmentDebugUnitTest - name: Build tasks (Assemble main outputs for developmentDebug the variants.) run: | ./gradlew assembleDevelopmentDebug 2>&1 | tee build.log - - - name: Run Danger - run: danger --remove-previous-comments - env: - DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/android/nowinandroid/blob/main/.github/workflows/Build.yaml - name: Upload build outputs (APKs) From cb2dba0ff1b041004a5339e5e0961e397f10be52 Mon Sep 17 00:00:00 2001 From: ando Date: Sat, 25 Feb 2023 23:03:16 +0900 Subject: [PATCH 21/29] =?UTF-8?q?=E7=BD=B2=E5=90=8D=E3=81=AE=E8=A8=AD?= =?UTF-8?q?=E5=AE=9A=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 6 ++++-- app/build.gradle | 19 ++++++++++++++++++- debug.keystore | Bin 0 -> 2473 bytes 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 debug.keystore diff --git a/.gitignore b/.gitignore index 57c25a3..6a352b0 100644 --- a/.gitignore +++ b/.gitignore @@ -54,8 +54,10 @@ captures/ # Keystore files # Uncomment the following lines if you do not want to check your keystore files in. -#*.jks -#*.keystore +*.jks +*.keystore +!debug.keystore +!debug.jks # External native build folder generated in Android Studio 2.2 and later .externalNativeBuild diff --git a/app/build.gradle b/app/build.gradle index 90a0dda..11dcc45 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,7 +4,12 @@ plugins { id 'kotlin-kapt' id 'com.google.dagger.hilt.android' } - +def localProperties = new Properties() +try { + localProperties.load(new FileInputStream(rootProject.file("local.properties"))) +} catch (Exception e) { + logger.warn("Not Found local.properties: ${e.localizedMessage}") +} android { namespace 'com.leoleo.androidgithubsearch' compileSdk 33 @@ -22,8 +27,20 @@ android { } } + signingConfigs { + debug { storeFile rootProject.file('debug.keystore') } + release { + storeFile rootProject.file('release.keystore') + storePassword localProperties['ANDROID_STORE_PASSWORD'] + keyAlias localProperties['ANDROID_KEY_ALIAS'] + keyPassword localProperties['ANDROID_KEY_PASSWORD'] + } + } + buildTypes { + debug { signingConfig signingConfigs.debug } release { + signingConfig signingConfigs.release minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' diff --git a/debug.keystore b/debug.keystore new file mode 100644 index 0000000000000000000000000000000000000000..91e5c67bf558943eac2f4a8278df68ba05d81c5b GIT binary patch literal 2473 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 aAYZVumQvbxP`lD1=N>V?#|&gjD*ZPD2a$gO literal 0 HcmV?d00001 From db6763b47ce288238f583e464ca1d80aa8d86cf7 Mon Sep 17 00:00:00 2001 From: ando Date: Sat, 25 Feb 2023 23:05:19 +0900 Subject: [PATCH 22/29] =?UTF-8?q?=E7=BD=B2=E5=90=8D=E3=81=AE=E8=A8=AD?= =?UTF-8?q?=E5=AE=9A=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/leoleo/androidgithubsearch/MainActivity.kt | 4 ---- .../java/com/leoleo/androidgithubsearch/Foo1.java | 6 ------ .../java/com/leoleo/androidgithubsearch/Foo1.java | 5 ----- .../staging/java/com/leoleo/androidgithubsearch/Foo1.java | 5 ----- data/src/stub/java/com/leoleo/androidgithubsearch/Foo1.java | 5 ----- 5 files changed, 25 deletions(-) delete mode 100644 data/src/development/java/com/leoleo/androidgithubsearch/Foo1.java delete mode 100644 data/src/production/java/com/leoleo/androidgithubsearch/Foo1.java delete mode 100644 data/src/staging/java/com/leoleo/androidgithubsearch/Foo1.java delete mode 100644 data/src/stub/java/com/leoleo/androidgithubsearch/Foo1.java diff --git a/app/src/main/java/com/leoleo/androidgithubsearch/MainActivity.kt b/app/src/main/java/com/leoleo/androidgithubsearch/MainActivity.kt index 76faf12..45e8f34 100644 --- a/app/src/main/java/com/leoleo/androidgithubsearch/MainActivity.kt +++ b/app/src/main/java/com/leoleo/androidgithubsearch/MainActivity.kt @@ -16,12 +16,8 @@ class MainActivity : ComponentActivity() { WindowCompat.setDecorFitsSystemWindows(window, false) super.onCreate(savedInstanceState) setContent { - val a = "" // わざとLint warning出す。 val windowSizeClass = calculateWindowSizeClass(this) MainScreen(windowSizeClass.widthSizeClass) } - this.addOnContextAvailableListener { ctx -> - - } } } \ No newline at end of file diff --git a/data/src/development/java/com/leoleo/androidgithubsearch/Foo1.java b/data/src/development/java/com/leoleo/androidgithubsearch/Foo1.java deleted file mode 100644 index 031a448..0000000 --- a/data/src/development/java/com/leoleo/androidgithubsearch/Foo1.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.leoleo.androidgithubsearch; - -// フレーバーでの確認: わざとLint warning出す。 -public class Foo1 { - -} diff --git a/data/src/production/java/com/leoleo/androidgithubsearch/Foo1.java b/data/src/production/java/com/leoleo/androidgithubsearch/Foo1.java deleted file mode 100644 index 8e7a1fa..0000000 --- a/data/src/production/java/com/leoleo/androidgithubsearch/Foo1.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.leoleo.androidgithubsearch; - -// フレーバーでの確認: わざとLint warning出す。 -public class Foo1 { -} diff --git a/data/src/staging/java/com/leoleo/androidgithubsearch/Foo1.java b/data/src/staging/java/com/leoleo/androidgithubsearch/Foo1.java deleted file mode 100644 index 8e7a1fa..0000000 --- a/data/src/staging/java/com/leoleo/androidgithubsearch/Foo1.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.leoleo.androidgithubsearch; - -// フレーバーでの確認: わざとLint warning出す。 -public class Foo1 { -} diff --git a/data/src/stub/java/com/leoleo/androidgithubsearch/Foo1.java b/data/src/stub/java/com/leoleo/androidgithubsearch/Foo1.java deleted file mode 100644 index 8e7a1fa..0000000 --- a/data/src/stub/java/com/leoleo/androidgithubsearch/Foo1.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.leoleo.androidgithubsearch; - -// フレーバーでの確認: わざとLint warning出す。 -public class Foo1 { -} From fba2d71e8b107cefecc96acf5edd57198ae779bd Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 23:21:02 +0900 Subject: [PATCH 23/29] Update release.yml --- .github/workflows/release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c75388e..88887ae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,11 +20,20 @@ jobs: distribution: 'temurin' cache: gradle + - name: Create release.keystore + run: echo "${{ secrets.ANDROID_STORE_BASE64 }}" | base64 -d > release.keystore + - name: Create local.properties env: GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ANDROID_STORE_PASSWORD: ${{ secrets.ANDROID_STORE_PASSWORD }} + ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} + ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} run: | echo "GITHUB_ACCESS_TOKEN=$GITHUB_ACCESS_TOKEN" >> local.properties + echo "ANDROID_STORE_PASSWORD=$ANDROID_STORE_PASSWORD" >> local.properties + echo "ANDROID_KEY_ALIAS=$ANDROID_KEY_ALIAS" >> local.properties + echo "ANDROID_KEY_PASSWORD=$ANDROID_KEY_PASSWORD" >> local.properties - name: Release Build tasks (apk and aab) run: | From 948fd6a52190005775fb88dd6d5ff78312f2028e Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 23:26:46 +0900 Subject: [PATCH 24/29] Update ci.yml --- .github/workflows/ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c7293c5..cf7cbeb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,14 @@ jobs: with: java-version: '11' distribution: 'temurin' - cache: gradle + + # gradle cache + - uses: actions/cache@v3 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- - name: Create local.properties env: From 05d2a636f2ceaaee25c7fc052500d2a3e8cfad55 Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 23:27:05 +0900 Subject: [PATCH 25/29] Update release.yml --- .github/workflows/release.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 88887ae..edfbedc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,6 +19,14 @@ jobs: java-version: '11' distribution: 'temurin' cache: gradle + + # gradle cache + - uses: actions/cache@v3 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- - name: Create release.keystore run: echo "${{ secrets.ANDROID_STORE_BASE64 }}" | base64 -d > release.keystore From 345a39e29195609a78edf6f7e7cfe4351baaab12 Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 23:27:17 +0900 Subject: [PATCH 26/29] Update release.yml --- .github/workflows/release.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index edfbedc..88887ae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,14 +19,6 @@ jobs: java-version: '11' distribution: 'temurin' cache: gradle - - # gradle cache - - uses: actions/cache@v3 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} - restore-keys: | - ${{ runner.os }}-gradle- - name: Create release.keystore run: echo "${{ secrets.ANDROID_STORE_BASE64 }}" | base64 -d > release.keystore From 9202ce1eceab2f949c321f9e50c404cc9f609800 Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 23:33:51 +0900 Subject: [PATCH 27/29] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf7cbeb..aaafd27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: - name: Build tasks (Assemble main outputs for developmentDebug the variants.) run: | - ./gradlew assembleDevelopmentDebug 2>&1 | tee build.log + ./gradlew assembleDevelopmentDebug # https://github.com/android/nowinandroid/blob/main/.github/workflows/Build.yaml - name: Upload build outputs (APKs) From 3f9529246118a2083a8e331c5eda176efb99c036 Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 23:39:23 +0900 Subject: [PATCH 28/29] Update build.gradle --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 11dcc45..5bd19e3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -18,8 +18,8 @@ android { applicationId "com.leoleo.androidgithubsearch" minSdk 29 targetSdk 33 - versionCode 104 - versionName "1.0.4" + versionCode 105 + versionName "1.0.5" testInstrumentationRunner "com.leoleo.androidgithubsearch.CustomTestRunner" vectorDrawables { From 2bfe3e70d4c45ea9287a7900490a2313bddc72e8 Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 25 Feb 2023 23:41:05 +0900 Subject: [PATCH 29/29] Update build.gradle --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 5bd19e3..f7c125a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -18,8 +18,8 @@ android { applicationId "com.leoleo.androidgithubsearch" minSdk 29 targetSdk 33 - versionCode 105 - versionName "1.0.5" + versionCode 106 + versionName "1.0.6" testInstrumentationRunner "com.leoleo.androidgithubsearch.CustomTestRunner" vectorDrawables {