Skip to content

Commit

Permalink
Merge pull request #120 from uhooi/release/1.5.0
Browse files Browse the repository at this point in the history
Release/1.5.0
  • Loading branch information
uhooi authored Apr 21, 2021
2 parents 4984879 + 9c8a089 commit cfed304
Show file tree
Hide file tree
Showing 46 changed files with 494 additions and 54 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,29 @@ jobs:
- name: Test with Gradle
run: ./gradlew test --stacktrace

# コードカバレッジをJaCoCo形式で取得
- name: Get code coverage for JaCoCo
run: ./gradlew jacocoDevelopDebugTestReport

# コードカバレッジをCodecovへアップロード
- name: Upload code coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

# テスト結果とコードカバレッジのアップロード
- name: Upload test results and code coverage Artifact
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: results
path: |
**/build/reports/tests/**/*
**/build/reports/test-results/**/*
**/build/reports/jacoco/**/*
if-no-files-found: warn
retention-days: 14

lint:
runs-on: ubuntu-latest
steps:
Expand All @@ -60,6 +83,18 @@ jobs:
- name: Run Inspection
run: ./gradlew lint

# アーティファクトへアップロード
- name: Upload results Artifact
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: results
path: |
**/build/reports/lint-results.html
**/build/reports/lint-results.xml
if-no-files-found: error
retention-days: 14

detekt:
runs-on: ubuntu-latest
steps:
Expand All @@ -69,3 +104,15 @@ jobs:
# 静的解析
- name: Lint with detekt
run: ./gradlew detekt

# アーティファクトへアップロード
- name: Upload results Artifact
uses: actions/upload-artifact@v2
if: failure()
with:
name: results
path: |
**/build/reports/detekt/**/*
if-no-files-found: error
retention-days: 14

4 changes: 2 additions & 2 deletions .github/workflows/generate-aab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

# AABの生成
- name: Generate AAB
run: ./gradlew :app:bundleRelease
run: ./gradlew :app:bundleProductionRelease
env:
RELEASE_KEYSTORE_STORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_STORE_PASSWORD }}
RELEASE_KEYSTORE_KEY_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_KEY_PASSWORD }}
Expand All @@ -42,6 +42,6 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: aab
path: app/build/outputs/bundle/release/app-release.aab
path: app/build/outputs/bundle/productionRelease/app-production-release.aab
if-no-files-found: error

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@

*.keystore

# jEnv
.java-version

3 changes: 3 additions & 0 deletions .idea/dictionaries/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 19 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# UhooiPicBook-Android

[![](https://github.com/uhooi/UhooiPicBook-Android/workflows/CI/badge.svg)](https://github.com/uhooi/UhooiPicBook-Android/actions?query=workflow%3ACI)
[![Release](https://img.shields.io/github/v/release/uhooi/UhooiPicBook-Android)](https://github.com/uhooi/UhooiPicBook-Android/releases/latest)
[![License](https://img.shields.io/github/license/uhooi/UhooiPicBook-Android)](https://github.com/uhooi/UhooiPicBook-Android/blob/master/LICENSE)
[![Twitter](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Ftwitter.com%2Fthe_uhooi)](https://twitter.com/the_uhooi)
[![Platform](https://img.shields.io/badge/platform-Android-lightgrey)](https://github.com/uhooi/UhooiPicBook-Android)
[![Twitter](https://img.shields.io/twitter/follow/the_uhooi?style=social)](https://twitter.com/the_uhooi)

|Branch|CI|Code coverage|
|:--|:--|:--|
|[master](https://github.com/uhooi/UhooiPicBook-Android/tree/master)|[![CI](https://github.com/uhooi/UhooiPicBook-Android/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/uhooi/UhooiPicBook-Android/actions/workflows/ci.yml)|[![codecov](https://codecov.io/gh/uhooi/UhooiPicBook-Android/branch/master/graph/badge.svg?token=NXWCPDDFIR)](https://codecov.io/gh/uhooi/UhooiPicBook-Android)|
|[develop](https://github.com/uhooi/UhooiPicBook-Android/tree/develop)|[![CI](https://github.com/uhooi/UhooiPicBook-Android/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/uhooi/UhooiPicBook-Android/actions/workflows/ci.yml)|[![codecov](https://codecov.io/gh/uhooi/UhooiPicBook-Android/branch/develop/graph/badge.svg?token=NXWCPDDFIR)](https://codecov.io/gh/uhooi/UhooiPicBook-Android)|

![Logo](./docs/logo.png)

Expand All @@ -16,29 +22,29 @@ UhooiPicBook-Android is Uhooi's character book for Android.

|MonsterList|MonsterDetail|DancingMonster|
|:--|:--|:--|
|<img src="./docs/screenshots/pixel3a/light/monster_list.png" width="270">|<img src="./docs/screenshots/pixel3a/light/monster_detail.png" width="270">|<img src="./docs/screenshots/pixel3a/light/dancing_monster.png" width="270">|
|<img src="./docs/screenshots/pixel3a/Android10/light/monster_list.png" width="270">|<img src="./docs/screenshots/pixel3a/Android10/light/monster_detail.png" width="270">|<img src="./docs/screenshots/pixel3a/Android10/light/dancing_monster.png" width="270">|

|Menu opened in MonsterList|Licenses|
|:--|:--|
|<img src="./docs/screenshots/pixel3a/light/menu_opened_in_monster_list.png" width="270">|<img src="./docs/screenshots/pixel3a/light/oss_licenses_menu.png" width="270">|
|Menu opened in MonsterList|
|:--|
|<img src="./docs/screenshots/pixel3a/Android10/light/menu_opened_in_monster_list_japanese.png" width="270">|

### Dark

|MonsterList|MonsterDetail|DancingMonster|
|:--|:--|:--|
|<img src="./docs/screenshots/pixel3a/dark/monster_list.png" width="270">|<img src="./docs/screenshots/pixel3a/dark/monster_detail.png" width="270">|<img src="./docs/screenshots/pixel3a/dark/dancing_monster.png" width="270">|
|<img src="./docs/screenshots/pixel3a/Android10/dark/monster_list.png" width="270">|<img src="./docs/screenshots/pixel3a/Android10/dark/monster_detail.png" width="270">|<img src="./docs/screenshots/pixel3a/Android10/dark/dancing_monster.png" width="270">|

|Menu opened in MonsterList|Licenses|
|:--|:--|
|<img src="./docs/screenshots/pixel3a/dark/menu_opened_in_monster_list.png" width="270">|<img src="./docs/screenshots/pixel3a/dark/oss_licenses_menu.png" width="270">|
|Menu opened in MonsterList|
|:--|
|<img src="./docs/screenshots/pixel3a/Android10/dark/menu_opened_in_monster_list_japanese.png" width="270">|

## Development

You can develop UhooiPicBook-Android.
You can develop this project.

### Environment

- Android Studio: 4.1.2
- Android Studio: 4.1.3

### Configuration

Expand All @@ -49,7 +55,7 @@ You can develop UhooiPicBook-Android.

1. Clone the project.

```
```shell
$ git clone https://github.com/uhooi/UhooiPicBook-Android.git
$ cd UhooiPicBook-Android
```
Expand Down
77 changes: 66 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ plugins {
id 'kotlin-kapt'
id 'com.google.android.gms.oss-licenses-plugin'
id 'dagger.hilt.android.plugin'
id 'jacoco'
}

android {
Expand All @@ -20,10 +21,14 @@ android {
applicationId "com.theuhooi.uhooipicbook"
minSdkVersion 26
targetSdkVersion 29
versionCode 5
versionName "1.4.0"
versionCode 6
versionName "1.5.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

// For LeakCanary in instrumentation tests
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArgument "listener", "leakcanary.FailTestOnLeakRunListener"
}

signingConfigs {
Expand Down Expand Up @@ -62,6 +67,17 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

flavorDimensions 'environment'
productFlavors {
production {
dimension 'environment'
}
develop {
dimension 'environment'
applicationIdSuffix '.develop'
versionNameSuffix '-develop'
}
}
}

dependencies {
Expand All @@ -71,13 +87,14 @@ dependencies {
implementation "io.coil-kt:coil-gif:$coil_version"

// Firebase
implementation 'com.google.firebase:firebase-analytics-ktx:18.0.2'
implementation 'com.google.firebase:firebase-crashlytics-ktx:17.3.1'
implementation 'com.google.firebase:firebase-firestore-ktx:22.0.2'
implementation 'com.google.firebase:firebase-messaging:21.0.1'
implementation 'com.google.firebase:firebase-perf:19.1.0'
implementation platform('com.google.firebase:firebase-bom:27.0.0')
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.firebase:firebase-crashlytics-ktx'
implementation 'com.google.firebase:firebase-firestore-ktx'
implementation 'com.google.firebase:firebase-messaging'
implementation 'com.google.firebase:firebase-perf'

implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.2.0'

implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
Expand All @@ -100,8 +117,15 @@ dependencies {

implementation "com.google.android.gms:play-services-oss-licenses:17.0.0"

implementation 'com.jakewharton.timber:timber:4.7.1'

testImplementation 'org.robolectric:robolectric:4.3.1'
testImplementation 'androidx.test:runner:1.3.0'

// LeakCanary
def leakcanary_version = '2.6'
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakcanary_version"
androidTestImplementation "com.squareup.leakcanary:leakcanary-android-instrumentation:$leakcanary_version"
}

kapt {
Expand All @@ -116,15 +140,46 @@ detekt {
reports {
xml {
enabled = true
destination = file("build/reports/detekt/detekt.xml")
destination = file("$buildDir/reports/detekt/detekt.xml")
}
html {
enabled = true
destination = file("build/reports/detekt/detekt.html")
destination = file("$buildDir/reports/detekt/detekt.html")
}
txt {
enabled = true
destination = file("build/reports/detekt/detekt.txt")
destination = file("$buildDir/reports/detekt/detekt.txt")
}
}
}

jacoco {
toolVersion = "0.8.6"
}

task jacocoDevelopDebugTestReport(type: JacocoReport, dependsOn: 'testDevelopDebugUnitTest', group: 'verification') {
def excludedClasses = []
sourceDirectories.from("$projectDir/src/main/java")
classDirectories.from(fileTree(
dir: "$buildDir/tmp/kotlin-classes/developDebug",
excludes: excludedClasses
))
executionData.from("$buildDir/jacoco/testDevelopDebugUnitTest.exec")
}

jacocoDevelopDebugTestReport {
reports {
xml {
enabled = true
destination = file("$buildDir/reports/jacoco/jacoco.xml")
}
csv {
enabled = false
destination = file("$buildDir/reports/jacoco/jacoco.csv")
}
html {
enabled = true
destination = file("$buildDir/reports/jacoco/html")
}
}
}
11 changes: 8 additions & 3 deletions app/config/detekt/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ build:
maxIssues: 3
weights:
ForbiddenComment: 0
MagicNumber: 0
MatchingDeclarationName: 1
ReturnCount: 0
TooGenericExceptionCaught: 0
TooGenericExceptionThrown: 1

style:
MagicNumber:
active: false

console-reports:
active: true
exclude:
# exclude:
# - 'ProjectStatisticsReport'
# - 'ComplexityReport'
# - 'NotificationReport'
Expand All @@ -18,7 +23,7 @@ console-reports:

processors:
active: true
exclude:
# exclude:
# - 'FunctionCountProcessor'
# - 'PropertyCountProcessor'
# - 'ClassCountProcessor'
Expand Down
46 changes: 46 additions & 0 deletions app/src/develop/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"project_info": {
"project_number": "559779602190",
"project_id": "uhooipicbook-develop",
"storage_bucket": "uhooipicbook-develop.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:559779602190:android:2f19b44c2acb9ac3b7015f",
"android_client_info": {
"package_name": "com.theuhooi.uhooipicbook.develop"
}
},
"oauth_client": [
{
"client_id": "559779602190-mlj4ajgcbj0j7ee76aepcle1av4mhe15.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDCtzMbHsj9V4AjjKOWh4tLIOMOADTOo8M"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "559779602190-mlj4ajgcbj0j7ee76aepcle1av4mhe15.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "559779602190-6lrd347f0954fuvjk0q0tje0srklujru.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.theuhooi.UhooiPicBook-Develop"
}
}
]
}
}
}
],
"configuration_version": "1"
}
4 changes: 4 additions & 0 deletions app/src/develop/res/values-en/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">dev-UhooiPicBook</string>
</resources>
4 changes: 4 additions & 0 deletions app/src/develop/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">dev-ウホーイ図鑑</string>
</resources>
Loading

0 comments on commit cfed304

Please sign in to comment.