├── .github └── workflows │ └── copy-issues.yml ├── .gitignore ├── .idea ├── .gitignore ├── .name ├── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml └── compiler.xml ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── kotlin │ │ └── jp │ │ └── co │ │ └── yumemi │ │ └── android │ │ └── code_check │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── kotlin │ │ └── jp │ │ │ └── co │ │ │ └── yumemi │ │ │ └── android │ │ │ └── code_check │ │ │ ├── OneFragment.kt │ │ │ ├── OneViewModel.kt │ │ │ ├── TwoFragment.kt │ │ │ └── topActivity.kt │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ ├── ic_launcher_background.xml │ │ └── jetbrains.png │ │ ├── layout │ │ ├── activity_top.xml │ │ ├── fragment_one.xml │ │ ├── fragment_two.xml │ │ └── layout_item.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── navigation │ │ └── nav_graph.xml │ │ ├── values-night │ │ └── themes.xml │ │ ├── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── themes.xml │ │ └── xml │ │ └── backup_descriptor.xml │ └── test │ └── kotlin │ └── jp │ └── co │ └── yumemi │ └── android │ └── code_check │ └── ExampleUnitTest.kt ├── build.gradle ├── docs └── app.gif ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.github/workflows/copy-issues.yml: -------------------------------------------------------------------------------- 1 | name: "Copy issues" 2 | on: 3 | workflow_dispatch: 4 | 5 | jobs: 6 | get-issue-labels: 7 | if: github.repository != 'yumemi-inc/android-engineer-codecheck' 8 | runs-on: ubuntu-latest 9 | outputs: 10 | labels: ${{ steps.output_label_data.outputs.value }} 11 | steps: 12 | - name: Getting Labels data 13 | id: get_label_data 14 | uses: octokit/request-action@v2.1.7 15 | with: 16 | route: GET /repos/yumemi-inc/android-engineer-codecheck/labels 17 | env: 18 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 19 | - id: output_label_data 20 | run: | 21 | result=$(echo '${{ steps.get_label_data.outputs.data }}' | sed -z 's/\n//g') 22 | echo "value=${result}" >> $GITHUB_OUTPUT 23 | 24 | create-issue-labels: 25 | needs: get-issue-labels 26 | runs-on: ubuntu-latest 27 | permissions: 28 | issues: write 29 | strategy: 30 | matrix: 31 | label: ${{ fromJson(needs.get-issue-labels.outputs.labels) }} 32 | steps: 33 | - name: Create a label 34 | uses: octokit/request-action@v2.1.7 35 | with: 36 | route: POST /repos/${{ github.repository }}/labels 37 | name: ${{ matrix.label.name }} 38 | color: ${{ matrix.label.color }} 39 | description: ${{ matrix.label.description }} 40 | env: 41 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 42 | 43 | get-milestones: 44 | if: github.repository != 'yumemi-inc/android-engineer-codecheck' 45 | runs-on: ubuntu-latest 46 | outputs: 47 | milestones: ${{ steps.output_milestones_data.outputs.value }} 48 | steps: 49 | - name: Getting Milestones data 50 | id: get_milestones_data 51 | uses: octokit/request-action@v2.1.7 52 | with: 53 | route: GET /repos/yumemi-inc/android-engineer-codecheck/milestones 54 | env: 55 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 56 | - id: output_milestones_data 57 | run: | 58 | result=$(echo '${{ steps.get_milestones_data.outputs.data }}' | sed -z 's/\n//g') 59 | echo "value=${result}" >> $GITHUB_OUTPUT 60 | 61 | create-milestones: 62 | needs: get-milestones 63 | runs-on: ubuntu-latest 64 | permissions: 65 | issues: write 66 | strategy: 67 | matrix: 68 | milestone: ${{ fromJson(needs.get-milestones.outputs.milestones) }} 69 | steps: 70 | - name: Create a milestone 71 | uses: octokit/request-action@v2.1.7 72 | with: 73 | route: POST /repos/${{ github.repository }}/milestones 74 | title: ${{ matrix.milestone.title }} 75 | description: ${{ matrix.milestone.description }} 76 | env: 77 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 78 | 79 | get-myrepo-milestones: 80 | needs: create-milestones 81 | runs-on: ubuntu-latest 82 | permissions: 83 | issues: read 84 | outputs: 85 | milestones: ${{ steps.output_milestones_data.outputs.value }} 86 | steps: 87 | - name: Getting Milestones data 88 | id: get_milestones_data 89 | uses: octokit/request-action@v2.1.7 90 | with: 91 | route: GET /repos/${{ github.repository }}/milestones 92 | env: 93 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 94 | - id: output_milestones_data 95 | run: | 96 | result=$(echo '${{ steps.get_milestones_data.outputs.data }}' | sed -z 's/\n//g') 97 | echo "value=${result}" >> $GITHUB_OUTPUT 98 | get-issues: 99 | if: github.repository != 'yumemi-inc/android-engineer-codecheck' 100 | runs-on: ubuntu-latest 101 | outputs: 102 | issues: ${{ steps.output_issues_data.outputs.value }} 103 | steps: 104 | - name: Getting issues data 105 | id: get_issues_data 106 | uses: octokit/request-action@v2.1.7 107 | with: 108 | route: GET /repos/yumemi-inc/android-engineer-codecheck/issues 109 | sort: created 110 | direction: asc 111 | env: 112 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 113 | - id: output_issues_data 114 | run: | 115 | result=$(echo '${{ steps.get_issues_data.outputs.data }}' | jq -c '[.[] | select(has("milestone")) | select(.milestone != null)]') 116 | echo "value=${result}" >> $GITHUB_OUTPUT 117 | 118 | get-myrepo-issues: 119 | if: github.repository != 'yumemi-inc/android-engineer-codecheck' 120 | runs-on: ubuntu-latest 121 | permissions: 122 | issues: read 123 | outputs: 124 | issues: ${{ steps.output_issues_data.outputs.value }} 125 | steps: 126 | - name: Getting issues data 127 | id: get_issues_data 128 | uses: octokit/request-action@v2.1.7 129 | with: 130 | route: GET /repos/${{ github.repository }}/issues 131 | state: all 132 | per_page: 100 133 | env: 134 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 135 | - id: output_issues_data 136 | run: | 137 | result=$(echo '${{ steps.get_issues_data.outputs.data }}' | sed -z 's/\n//g') 138 | echo "value=${result}" >> $GITHUB_OUTPUT 139 | 140 | create-issues: 141 | needs: [ create-issue-labels, get-myrepo-milestones, get-issues, get-myrepo-issues ] 142 | runs-on: ubuntu-latest 143 | permissions: 144 | issues: write 145 | strategy: 146 | max-parallel: 1 147 | matrix: 148 | issue: ${{ fromJson(needs.get-issues.outputs.issues) }} 149 | steps: 150 | - name: Find milestone 151 | id: find-milestone 152 | run: | 153 | milestones='${{ needs.get-myrepo-milestones.outputs.milestones }}' 154 | milestone_number=$(echo ${milestones} | jq '.[] | select (.title=="${{ matrix.issue.milestone.title }}") | .number' ) 155 | echo "number=${milestone_number}" >> $GITHUB_OUTPUT 156 | - name: Create a issue 157 | run: | 158 | body=$(echo '${{ matrix.issue.body }}') 159 | body="${body//$'\n'/\\n}" 160 | body="${body//$'\r'/\\r}" 161 | 162 | if [[ "$body" =~ '#'[0-9] ]]; then 163 | link=$(echo "$body" | grep -o -E "#[0-9]+") 164 | num=$(echo $link | tr -d '#') 165 | 166 | issues=$(echo '${{ needs.get-issues.outputs.issues }}' | jq '[ . as $d | keys[] | $d[.] + {index:.} ]') 167 | issue_index=$(echo "$issues" | jq ".[] | select (.number==${num}) | .index") 168 | my_issue_count=$(echo '${{ needs.get-myrepo-issues.outputs.issues }}' | jq '. | length') 169 | 170 | num=$(($issue_index+$my_issue_count+1)) 171 | body=$(echo $body | sed "s/$link/#${num}/g") 172 | fi 173 | 174 | labels='${{ toJson(matrix.issue.labels.*.name) }}' 175 | curl -X POST -H "Accept: application/vnd.github.v3+json" \ 176 | -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ 177 | https://api.github.com/repos/${{ github.repository }}/issues \ 178 | -d "{ 179 | \"title\" : \"${{ matrix.issue.title }}\", 180 | \"body\" : \"$body\", 181 | \"labels\" : ${labels}, 182 | \"milestone\" : ${{ steps.find-milestone.outputs.number }} 183 | }" 184 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # https://github.com/github/gitignore/blob/master/Android.gitignore 2 | # Built application files 3 | *.apk 4 | *.aar 5 | *.ap_ 6 | *.aab 7 | 8 | # Files for the ART/Dalvik VM 9 | *.dex 10 | 11 | # Java class files 12 | *.class 13 | 14 | # Generated files 15 | bin/ 16 | gen/ 17 | out/ 18 | # Uncomment the following line in case you need and you don't have the release build type files in your app 19 | # release/ 20 | 21 | # Gradle files 22 | .gradle/ 23 | build/ 24 | 25 | # Local configuration file (sdk path, etc) 26 | local.properties 27 | 28 | # Proguard folder generated by Eclipse 29 | proguard/ 30 | 31 | # Log Files 32 | *.log 33 | 34 | # Android Studio Navigation editor temp files 35 | .navigation/ 36 | 37 | # Android Studio captures folder 38 | captures/ 39 | 40 | # IntelliJ 41 | *.iml 42 | .idea/workspace.xml 43 | .idea/tasks.xml 44 | .idea/gradle.xml 45 | .idea/assetWizardSettings.xml 46 | .idea/dictionaries 47 | .idea/libraries 48 | .idea/jarRepositories.xml 49 | .idea/misc.xml 50 | # Android Studio 3 in .gitignore file. 51 | .idea/caches 52 | .idea/modules.xml 53 | # Comment next line if keeping position of elements in Navigation Editor is relevant for you 54 | .idea/navEditor.xml 55 | # Android Studio Arctic Fox in .gitignore file. 56 | .idea/deploymentTargetDropDown.xml 57 | 58 | # Keystore files 59 | # Uncomment the following lines if you do not want to check your keystore files in. 60 | #*.jks 61 | #*.keystore 62 | 63 | # External native build folder generated in Android Studio 2.2 and later 64 | .externalNativeBuild 65 | .cxx/ 66 | 67 | # Google Services (e.g. APIs or Firebase) 68 | # google-services.json 69 | 70 | # Freeline 71 | freeline.py 72 | freeline/ 73 | freeline_project_description.json 74 | 75 | # fastlane 76 | fastlane/report.xml 77 | fastlane/Preview.html 78 | fastlane/screenshots 79 | fastlane/test_output 80 | fastlane/readme.md 81 | 82 | # Version control 83 | vcs.xml 84 | 85 | # lint 86 | lint/intermediates/ 87 | lint/generated/ 88 | lint/outputs/ 89 | lint/tmp/ 90 | # lint/reports/ 91 | 92 | # Android Profiling 93 | *.hprof 94 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | Android Engineer CodeCheck -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 119 | 120 | 122 | 123 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright © 2021 YUMEMI Inc. All rights reserved. 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 株式会社ゆめみ Android エンジニアコードチェック課題 2 | 3 | ## 概要 4 | 5 | 本プロジェクトは株式会社ゆめみ(以下弊社)が、弊社に Android エンジニアを希望する方に出す課題のベースプロジェクトです。本課題が与えられた方は、下記の概要を詳しく読んだ上で課題を取り組んでください。 6 | 7 | ## アプリ仕様 8 | 9 | 本アプリは GitHub のリポジトリを検索するアプリです。 10 | 11 | 12 | 13 | ### 環境 14 | 15 | - IDE:Android Studio Flamingo | 2022.2.1 Patch 2 16 | - Kotlin:1.6.21 17 | - Java:17 18 | - Gradle:8.0 19 | - minSdk:23 20 | - targetSdk:31 21 | 22 | ※ ライブラリの利用はオープンソースのものに限ります。 23 | ※ 環境は適宜更新してください。 24 | 25 | ### 動作 26 | 27 | 1. 何かしらのキーワードを入力 28 | 2. GitHub API(`search/repositories`)でリポジトリを検索し、結果一覧を概要(リポジトリ名)で表示 29 | 3. 特定の結果を選択したら、該当リポジトリの詳細(リポジトリ名、オーナーアイコン、プロジェクト言語、Star 数、Watcher 数、Fork 数、Issue 数)を表示 30 | 31 | ## 課題取り組み方法 32 | 33 | Issues を確認した上、本プロジェクトを [**Duplicate** してください](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/duplicating-a-repository)(Fork しないようにしてください。必要ならプライベートリポジトリにしても大丈夫です)。今後のコミットは全てご自身のリポジトリで行ってください。 34 | 35 | コードチェックの課題 Issue は全て [`課題`](https://github.com/yumemi-inc/android-engineer-codecheck/milestone/1) Milestone がついており、難易度に応じて Label が [`初級`](https://github.com/yumemi-inc/android-engineer-codecheck/issues?q=is%3Aopen+is%3Aissue+label%3A初級+milestone%3A課題)、[`中級`](https://github.com/yumemi-inc/android-engineer-codecheck/issues?q=is%3Aopen+is%3Aissue+label%3A中級+milestone%3A課題+) と [`ボーナス`](https://github.com/yumemi-inc/android-engineer-codecheck/issues?q=is%3Aopen+is%3Aissue+label%3Aボーナス+milestone%3A課題+) に分けられています。課題の必須/選択は下記の表とします。 36 | 37 | | | 初級 | 中級 | ボーナス 38 | |--:|:--:|:--:|:--:| 39 | | 新卒/未経験者 | 必須 | 選択 | 選択 | 40 | | 中途/経験者 | 必須 | 必須 | 選択 | 41 | 42 | 課題 Issueをご自身のリポジトリーにコピーするGitHub Actionsをご用意しております。 43 | [こちらのWorkflow](./.github/workflows/copy-issues.yml)を[手動でトリガーする](https://docs.github.com/ja/actions/managing-workflow-runs/manually-running-a-workflow)ことでコピーできますのでご活用下さい。 44 | 45 | 課題が完成したら、リポジトリのアドレスを教えてください。 46 | 47 | ## 参考記事 48 | 49 | 提出された課題の評価ポイントに関しては、[こちらの記事](https://qiita.com/blendthink/items/aa70b8b3106fb4e3555f)に詳しく書かれてありますので、ぜひご覧ください。 50 | 51 | ## AIサービスの利用について 52 | 53 | ChatGPTなどAIサービスの利用は禁止しておりません。 54 | 55 | 利用にあたって工夫したプロンプトやソースコメント等をご提出頂くことで、加点評価する場合もございます。 (減点評価はありません) 56 | 57 | また、弊社コードチェック担当者もAIサービスを利用させていただく場合があります。 58 | 59 | AIサービスの利用は差し控えてもらいたいなどのご要望がある場合は、お気軽にお申し出ください。 60 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.application' 3 | id 'kotlin-android' 4 | id 'kotlin-kapt' 5 | id 'kotlin-parcelize' 6 | id 'androidx.navigation.safeargs.kotlin' 7 | } 8 | 9 | android { 10 | namespace 'jp.co.yumemi.android.code_check' 11 | compileSdk 31 12 | 13 | defaultConfig { 14 | applicationId "jp.co.yumemi.android.codecheck" 15 | minSdk 23 16 | targetSdk 31 17 | versionCode 1 18 | versionName "1.0" 19 | 20 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 21 | } 22 | 23 | buildTypes { 24 | release { 25 | minifyEnabled true 26 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 27 | } 28 | } 29 | compileOptions { 30 | sourceCompatibility JavaVersion.VERSION_11 31 | targetCompatibility JavaVersion.VERSION_11 32 | } 33 | kotlinOptions { 34 | jvmTarget = '11' 35 | } 36 | buildFeatures { 37 | viewBinding true 38 | } 39 | } 40 | 41 | dependencies { 42 | 43 | implementation 'androidx.core:core-ktx:1.6.0' 44 | implementation 'androidx.appcompat:appcompat:1.3.1' 45 | implementation 'com.google.android.material:material:1.4.0' 46 | implementation 'androidx.constraintlayout:constraintlayout:2.1.1' 47 | implementation 'androidx.recyclerview:recyclerview:1.2.1' 48 | 49 | implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1' 50 | implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1' 51 | implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1' 52 | 53 | implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3' 54 | implementation 'androidx.navigation:navigation-ui-ktx:2.5.3' 55 | 56 | implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1' 57 | implementation 'io.ktor:ktor-client-android:1.6.4' 58 | 59 | implementation 'io.coil-kt:coil:1.3.2' 60 | 61 | testImplementation 'junit:junit:4.13.2' 62 | androidTestImplementation 'androidx.test.ext:junit:1.1.3' 63 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' 64 | } 65 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/src/androidTest/kotlin/jp/co/yumemi/android/code_check/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package jp.co.yumemi.android.code_check 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("jp.co.yumemi.android.codecheck", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/kotlin/jp/co/yumemi/android/code_check/OneFragment.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2021 YUMEMI Inc. All rights reserved. 3 | */ 4 | package jp.co.yumemi.android.code_check 5 | 6 | import android.os.Bundle 7 | import android.view.LayoutInflater 8 | import android.view.View 9 | import android.view.ViewGroup 10 | import android.view.inputmethod.EditorInfo 11 | import android.widget.TextView 12 | import androidx.fragment.app.Fragment 13 | import androidx.navigation.fragment.findNavController 14 | import androidx.recyclerview.widget.* 15 | import jp.co.yumemi.android.code_check.databinding.FragmentOneBinding 16 | 17 | class OneFragment: Fragment(R.layout.fragment_one){ 18 | 19 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) 20 | { 21 | super.onViewCreated(view, savedInstanceState) 22 | 23 | val _binding= FragmentOneBinding.bind(view) 24 | 25 | val _viewModel= OneViewModel(context!!) 26 | 27 | val _layoutManager= LinearLayoutManager(context!!) 28 | val _dividerItemDecoration= 29 | DividerItemDecoration(context!!, _layoutManager.orientation) 30 | val _adapter= CustomAdapter(object : CustomAdapter.OnItemClickListener{ 31 | override fun itemClick(item: item){ 32 | gotoRepositoryFragment(item) 33 | } 34 | }) 35 | 36 | _binding.searchInputText 37 | .setOnEditorActionListener{ editText, action, _ -> 38 | if (action== EditorInfo.IME_ACTION_SEARCH){ 39 | editText.text.toString().let { 40 | _viewModel.searchResults(it).apply{ 41 | _adapter.submitList(this) 42 | } 43 | } 44 | return@setOnEditorActionListener true 45 | } 46 | return@setOnEditorActionListener false 47 | } 48 | 49 | _binding.recyclerView.also{ 50 | it.layoutManager= _layoutManager 51 | it.addItemDecoration(_dividerItemDecoration) 52 | it.adapter= _adapter 53 | } 54 | } 55 | 56 | fun gotoRepositoryFragment(item: item) 57 | { 58 | val _action= OneFragmentDirections 59 | .actionRepositoriesFragmentToRepositoryFragment(item= item) 60 | findNavController().navigate(_action) 61 | } 62 | } 63 | 64 | val diff_util= object: DiffUtil.ItemCallback(){ 65 | override fun areItemsTheSame(oldItem: item, newItem: item): Boolean 66 | { 67 | return oldItem.name== newItem.name 68 | } 69 | 70 | override fun areContentsTheSame(oldItem: item, newItem: item): Boolean 71 | { 72 | return oldItem== newItem 73 | } 74 | 75 | } 76 | 77 | class CustomAdapter( 78 | private val itemClickListener: OnItemClickListener, 79 | ) : ListAdapter(diff_util){ 80 | 81 | class ViewHolder(view: View): RecyclerView.ViewHolder(view) 82 | 83 | interface OnItemClickListener{ 84 | fun itemClick(item: item) 85 | } 86 | 87 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder 88 | { 89 | val _view= LayoutInflater.from(parent.context) 90 | .inflate(R.layout.layout_item, parent, false) 91 | return ViewHolder(_view) 92 | } 93 | 94 | override fun onBindViewHolder(holder: ViewHolder, position: Int) 95 | { 96 | val _item= getItem(position) 97 | (holder.itemView.findViewById(R.id.repositoryNameView) as TextView).text= 98 | _item.name 99 | 100 | holder.itemView.setOnClickListener{ 101 | itemClickListener.itemClick(_item) 102 | } 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /app/src/main/kotlin/jp/co/yumemi/android/code_check/OneViewModel.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2021 YUMEMI Inc. All rights reserved. 3 | */ 4 | package jp.co.yumemi.android.code_check 5 | 6 | import android.content.Context 7 | import android.os.Parcelable 8 | import androidx.lifecycle.ViewModel 9 | import io.ktor.client.* 10 | import io.ktor.client.call.* 11 | import io.ktor.client.engine.android.* 12 | import io.ktor.client.request.* 13 | import io.ktor.client.statement.* 14 | import jp.co.yumemi.android.code_check.TopActivity.Companion.lastSearchDate 15 | import kotlinx.coroutines.GlobalScope 16 | import kotlinx.coroutines.async 17 | import kotlinx.coroutines.runBlocking 18 | import kotlinx.parcelize.Parcelize 19 | import org.json.JSONObject 20 | import java.util.* 21 | 22 | /** 23 | * TwoFragment で使う 24 | */ 25 | class OneViewModel( 26 | val context: Context 27 | ) : ViewModel() { 28 | 29 | // 検索結果 30 | fun searchResults(inputText: String): List = runBlocking { 31 | val client = HttpClient(Android) 32 | 33 | return@runBlocking GlobalScope.async { 34 | val response: HttpResponse = client?.get("https://api.github.com/search/repositories") { 35 | header("Accept", "application/vnd.github.v3+json") 36 | parameter("q", inputText) 37 | } 38 | 39 | val jsonBody = JSONObject(response.receive()) 40 | 41 | val jsonItems = jsonBody.optJSONArray("items")!! 42 | 43 | val items = mutableListOf() 44 | 45 | /** 46 | * アイテムの個数分ループする 47 | */ 48 | for (i in 0 until jsonItems.length()) { 49 | val jsonItem = jsonItems.optJSONObject(i)!! 50 | val name = jsonItem.optString("full_name") 51 | val ownerIconUrl = jsonItem.optJSONObject("owner")!!.optString("avatar_url") 52 | val language = jsonItem.optString("language") 53 | val stargazersCount = jsonItem.optLong("stargazers_count") 54 | val watchersCount = jsonItem.optLong("watchers_count") 55 | val forksCount = jsonItem.optLong("forks_conut") 56 | val openIssuesCount = jsonItem.optLong("open_issues_count") 57 | 58 | items.add( 59 | item( 60 | name = name, 61 | ownerIconUrl = ownerIconUrl, 62 | language = context.getString(R.string.written_language, language), 63 | stargazersCount = stargazersCount, 64 | watchersCount = watchersCount, 65 | forksCount = forksCount, 66 | openIssuesCount = openIssuesCount 67 | ) 68 | ) 69 | } 70 | 71 | lastSearchDate = Date() 72 | 73 | return@async items.toList() 74 | }.await() 75 | } 76 | } 77 | 78 | @Parcelize 79 | data class item( 80 | val name: String, 81 | val ownerIconUrl: String, 82 | val language: String, 83 | val stargazersCount: Long, 84 | val watchersCount: Long, 85 | val forksCount: Long, 86 | val openIssuesCount: Long, 87 | ) : Parcelable -------------------------------------------------------------------------------- /app/src/main/kotlin/jp/co/yumemi/android/code_check/TwoFragment.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2021 YUMEMI Inc. All rights reserved. 3 | */ 4 | package jp.co.yumemi.android.code_check 5 | 6 | import android.os.Bundle 7 | import android.util.Log 8 | import android.view.View 9 | import androidx.fragment.app.Fragment 10 | import androidx.navigation.fragment.navArgs 11 | import coil.load 12 | import jp.co.yumemi.android.code_check.TopActivity.Companion.lastSearchDate 13 | import jp.co.yumemi.android.code_check.databinding.FragmentTwoBinding 14 | 15 | class TwoFragment : Fragment(R.layout.fragment_two) { 16 | 17 | private val args: TwoFragmentArgs by navArgs() 18 | 19 | private var binding: FragmentTwoBinding? = null 20 | private val _binding get() = binding!! 21 | 22 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 23 | super.onViewCreated(view, savedInstanceState) 24 | 25 | Log.d("検索した日時", lastSearchDate.toString()) 26 | 27 | binding = FragmentTwoBinding.bind(view) 28 | 29 | var item = args.item 30 | 31 | _binding.ownerIconView.load(item.ownerIconUrl); 32 | _binding.nameView.text = item.name; 33 | _binding.languageView.text = item.language; 34 | _binding.starsView.text = "${item.stargazersCount} stars"; 35 | _binding.watchersView.text = "${item.watchersCount} watchers"; 36 | _binding.forksView.text = "${item.forksCount} forks"; 37 | _binding.openIssuesView.text = "${item.openIssuesCount} open issues"; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/kotlin/jp/co/yumemi/android/code_check/topActivity.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2021 YUMEMI Inc. All rights reserved. 3 | */ 4 | package jp.co.yumemi.android.code_check 5 | 6 | import androidx.appcompat.app.AppCompatActivity 7 | import java.util.* 8 | 9 | class TopActivity : AppCompatActivity(R.layout.activity_top) { 10 | 11 | companion object { 12 | lateinit var lastSearchDate: Date 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 110 | 115 | 120 | 125 | 130 | 135 | 140 | 145 | 150 | 155 | 160 | 165 | 170 | 171 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/jetbrains.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yumemi-inc/android-engineer-codecheck/06e32c7fe9879ad35d4b8e02688169fc805f30f0/app/src/main/res/drawable/jetbrains.png -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_one.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 20 | 21 | 36 | 37 | 46 | 47 | 48 | 49 | 50 | 51 | 59 | 60 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_two.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 20 | 21 | 32 | 33 | 39 | 40 | 51 | 52 | 65 | 66 | 79 | 80 | 93 | 94 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yumemi-inc/android-engineer-codecheck/06e32c7fe9879ad35d4b8e02688169fc805f30f0/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yumemi-inc/android-engineer-codecheck/06e32c7fe9879ad35d4b8e02688169fc805f30f0/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yumemi-inc/android-engineer-codecheck/06e32c7fe9879ad35d4b8e02688169fc805f30f0/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yumemi-inc/android-engineer-codecheck/06e32c7fe9879ad35d4b8e02688169fc805f30f0/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yumemi-inc/android-engineer-codecheck/06e32c7fe9879ad35d4b8e02688169fc805f30f0/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yumemi-inc/android-engineer-codecheck/06e32c7fe9879ad35d4b8e02688169fc805f30f0/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yumemi-inc/android-engineer-codecheck/06e32c7fe9879ad35d4b8e02688169fc805f30f0/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yumemi-inc/android-engineer-codecheck/06e32c7fe9879ad35d4b8e02688169fc805f30f0/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yumemi-inc/android-engineer-codecheck/06e32c7fe9879ad35d4b8e02688169fc805f30f0/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yumemi-inc/android-engineer-codecheck/06e32c7fe9879ad35d4b8e02688169fc805f30f0/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/navigation/nav_graph.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 16 | 17 | 18 | 23 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Android Engineer CodeCheck 3 | GitHub のリポジトリを検索できるよー 4 | Written in %s 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/xml/backup_descriptor.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/test/kotlin/jp/co/yumemi/android/code_check/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package jp.co.yumemi.android.code_check 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:8.0.2' 9 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21" 10 | classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3" 11 | 12 | // NOTE: Do not place your application dependencies here; they belong 13 | // in the individual module build.gradle files 14 | } 15 | } 16 | 17 | tasks.register('clean', Delete) { 18 | delete rootProject.buildDir 19 | } -------------------------------------------------------------------------------- /docs/app.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yumemi-inc/android-engineer-codecheck/06e32c7fe9879ad35d4b8e02688169fc805f30f0/docs/app.gif -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true 20 | # Kotlin code style for this project: "official" or "obsolete": 21 | kotlin.code.style=official -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yumemi-inc/android-engineer-codecheck/06e32c7fe9879ad35d4b8e02688169fc805f30f0/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | # 21 | # Gradle start up script for POSIX generated by Gradle. 22 | # 23 | # Important for running: 24 | # 25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 26 | # noncompliant, but you have some other compliant shell such as ksh or 27 | # bash, then to run this script, type that shell name before the whole 28 | # command line, like: 29 | # 30 | # ksh Gradle 31 | # 32 | # Busybox and similar reduced shells will NOT work, because this script 33 | # requires all of these POSIX shell features: 34 | # * functions; 35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 37 | # * compound commands having a testable exit status, especially «case»; 38 | # * various built-in commands including «command», «set», and «ulimit». 39 | # 40 | # Important for patching: 41 | # 42 | # (2) This script targets any POSIX shell, so it avoids extensions provided 43 | # by Bash, Ksh, etc; in particular arrays are avoided. 44 | # 45 | # The "traditional" practice of packing multiple parameters into a 46 | # space-separated string is a well documented source of bugs and security 47 | # problems, so this is (mostly) avoided, by progressively accumulating 48 | # options in "$@", and eventually passing that to Java. 49 | # 50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 52 | # see the in-line comments for details. 53 | # 54 | # There are tweaks for specific operating systems such as AIX, CygWin, 55 | # Darwin, MinGW, and NonStop. 56 | # 57 | # (3) This script is generated from the Groovy template 58 | # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 59 | # within the Gradle project. 60 | # 61 | # You can find Gradle at https://github.com/gradle/gradle/. 62 | # 63 | ############################################################################## 64 | 65 | # Attempt to set APP_HOME 66 | 67 | # Resolve links: $0 may be a link 68 | app_path=$0 69 | 70 | # Need this for daisy-chained symlinks. 71 | while 72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 73 | [ -h "$app_path" ] 74 | do 75 | ls=$( ls -ld "$app_path" ) 76 | link=${ls#*' -> '} 77 | case $link in #( 78 | /*) app_path=$link ;; #( 79 | *) app_path=$APP_HOME$link ;; 80 | esac 81 | done 82 | 83 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit 84 | 85 | APP_NAME="Gradle" 86 | APP_BASE_NAME=${0##*/} 87 | 88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 90 | 91 | # Use the maximum available, or set MAX_FD != -1 to use that value. 92 | MAX_FD=maximum 93 | 94 | warn () { 95 | echo "$*" 96 | } >&2 97 | 98 | die () { 99 | echo 100 | echo "$*" 101 | echo 102 | exit 1 103 | } >&2 104 | 105 | # OS specific support (must be 'true' or 'false'). 106 | cygwin=false 107 | msys=false 108 | darwin=false 109 | nonstop=false 110 | case "$( uname )" in #( 111 | CYGWIN* ) cygwin=true ;; #( 112 | Darwin* ) darwin=true ;; #( 113 | MSYS* | MINGW* ) msys=true ;; #( 114 | NONSTOP* ) nonstop=true ;; 115 | esac 116 | 117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 118 | 119 | 120 | # Determine the Java command to use to start the JVM. 121 | if [ -n "$JAVA_HOME" ] ; then 122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 123 | # IBM's JDK on AIX uses strange locations for the executables 124 | JAVACMD=$JAVA_HOME/jre/sh/java 125 | else 126 | JAVACMD=$JAVA_HOME/bin/java 127 | fi 128 | if [ ! -x "$JAVACMD" ] ; then 129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 130 | 131 | Please set the JAVA_HOME variable in your environment to match the 132 | location of your Java installation." 133 | fi 134 | else 135 | JAVACMD=java 136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 137 | 138 | Please set the JAVA_HOME variable in your environment to match the 139 | location of your Java installation." 140 | fi 141 | 142 | # Increase the maximum file descriptors if we can. 143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 144 | case $MAX_FD in #( 145 | max*) 146 | MAX_FD=$( ulimit -H -n ) || 147 | warn "Could not query maximum file descriptor limit" 148 | esac 149 | case $MAX_FD in #( 150 | '' | soft) :;; #( 151 | *) 152 | ulimit -n "$MAX_FD" || 153 | warn "Could not set maximum file descriptor limit to $MAX_FD" 154 | esac 155 | fi 156 | 157 | # Collect all arguments for the java command, stacking in reverse order: 158 | # * args from the command line 159 | # * the main class name 160 | # * -classpath 161 | # * -D...appname settings 162 | # * --module-path (only if needed) 163 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 164 | 165 | # For Cygwin or MSYS, switch paths to Windows format before running java 166 | if "$cygwin" || "$msys" ; then 167 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 168 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 169 | 170 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 171 | 172 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 173 | for arg do 174 | if 175 | case $arg in #( 176 | -*) false ;; # don't mess with options #( 177 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 178 | [ -e "$t" ] ;; #( 179 | *) false ;; 180 | esac 181 | then 182 | arg=$( cygpath --path --ignore --mixed "$arg" ) 183 | fi 184 | # Roll the args list around exactly as many times as the number of 185 | # args, so each arg winds up back in the position where it started, but 186 | # possibly modified. 187 | # 188 | # NB: a `for` loop captures its iteration list before it begins, so 189 | # changing the positional parameters here affects neither the number of 190 | # iterations, nor the values presented in `arg`. 191 | shift # remove old arg 192 | set -- "$@" "$arg" # push replacement arg 193 | done 194 | fi 195 | 196 | # Collect all arguments for the java command; 197 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of 198 | # shell script including quotes and variable substitutions, so put them in 199 | # double quotes to make sure that they get re-expanded; and 200 | # * put everything else in single quotes, so that it's not re-expanded. 201 | 202 | set -- \ 203 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 204 | -classpath "$CLASSPATH" \ 205 | org.gradle.wrapper.GradleWrapperMain \ 206 | "$@" 207 | 208 | # Use "xargs" to parse quoted args. 209 | # 210 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 211 | # 212 | # In Bash we could simply go: 213 | # 214 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 215 | # set -- "${ARGS[@]}" "$@" 216 | # 217 | # but POSIX shell has neither arrays nor command substitution, so instead we 218 | # post-process each arg (as a line of input to sed) to backslash-escape any 219 | # character that might be a shell metacharacter, then use eval to reverse 220 | # that process (while maintaining the separation between arguments), and wrap 221 | # the whole thing up as a single "set" statement. 222 | # 223 | # This will of course break if any of these variables contains a newline or 224 | # an unmatched quote. 225 | # 226 | 227 | eval "set -- $( 228 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 229 | xargs -n1 | 230 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 231 | tr '\n' ' ' 232 | )" '"$@"' 233 | 234 | exec "$JAVACMD" "$@" 235 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | dependencyResolutionManagement { 2 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 3 | repositories { 4 | google() 5 | mavenCentral() 6 | jcenter() // Warning: this repository is going to shut down soon 7 | } 8 | } 9 | rootProject.name = "Android Engineer CodeCheck" 10 | include ':app' 11 | --------------------------------------------------------------------------------