Skip to content

Commit

Permalink
Merge pull request #744 from kosenda/develop
Browse files Browse the repository at this point in the history
update main (v.1.34)
  • Loading branch information
kosenda authored Nov 17, 2024
2 parents 11ddea6 + c3127df commit 329bdc1
Show file tree
Hide file tree
Showing 28 changed files with 276 additions and 261 deletions.
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
version: 2.1

orbs:
slack: circleci/slack@4.13.3
gh: circleci/github-cli@2.3.0
slack: circleci/slack@5.1.1
gh: circleci/github-cli@2.5.0

executors:
android:
docker:
- image: cimg/android:2024.01
- image: cimg/android:2024.11

commands:
check_is_skipping_vrt:
Expand Down Expand Up @@ -72,7 +72,7 @@ commands:
command: |
mkdir -p ./temp/zip
if [ $IS_EXIST_SCREENSHOTS = "true" ]; then
zip -r ./temp/zip/screenshots.zip ./app/build/outputs/roborazzi
zip -r ./temp/zip/screenshots.zip ./screenshots
fi
- save_cache:
paths:
Expand Down Expand Up @@ -176,7 +176,7 @@ commands:
git checkout --orphan screenshots_$CIRCLE_BRANCH
git rm --cached -rf .
add_files=$(find . -type f -path "./app/build/outputs/roborazzi/*")
add_files=$(find . -type f -path "./screenshots/*")
for file in $add_files; do
git add -f $file
done
Expand All @@ -200,13 +200,13 @@ commands:
if [ $IS_SKIPPING_VRT = "false" ]; then
git push origin --delete compare_$CIRCLE_BRANCH || true
fileSize=$(echo $(find ./app/build/outputs/roborazzi -type f | grep -e '.*_compare.png' | wc -l | sed -e 's/ //g'))
fileSize=$(echo $(find ./screenshots/compare -type f | grep -e '.*_compare.webp' | wc -l | sed -e 's/ //g'))
echo "fileSize: $fileSize"
if [ $fileSize -ne 0 ]; then
git checkout --orphan compare_$CIRCLE_BRANCH
git rm --cached -rf .
add_files=$(find . -type f -path "./app/build/outputs/roborazzi/*" -name "*_compare.png")
add_files=$(find . -type f -path "./screenshots/compare/*" -name "*_compare.webp")
for file in $add_files; do
git add -f $file
done
Expand All @@ -229,7 +229,7 @@ commands:
echo "| File name | Image |" >> comment
echo "|-------|-------|" >> comment
files=$(find . -type f -path "./app/build/outputs/roborazzi/*" -name "*_compare.png")
files=$(find . -type f -path "./screenshots/compare/*" -name "*_compare.webp")
for file in $files; do
fileName=$(basename "$file" | sed -r 's/(.{20})/\1<br>/g')
echo "| [$fileName](https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/blob/compare_$CIRCLE_BRANCH/$file) | ![](https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/blob/compare_$CIRCLE_BRANCH/$file?raw=true) |" >> comment
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/incoming-webhook/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
# https://github.com/slackapi/slack-github-action
- name: Send GitHub Action trigger data to Slack workflow
id: slack
uses: slackapi/slack-github-action@v1.26.0
uses: slackapi/slack-github-action@v2.0.0
with:
payload: |
{
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ runs:
cache: gradle

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ output.json
*.jks
*.keystore
keystore.properties
/screenshots/
6 changes: 6 additions & 0 deletions .idea/codeStyles/Project.xml

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

1 change: 1 addition & 0 deletions .idea/codeStyles/codeStyleConfig.xml

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

2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source "https://rubygems.org"
git_source(:github) { |repo_name| "https://github.com/kosenda/SimpleCompoundInterestCalculation" }
gem 'danger', '~> 9.4.0'
gem 'danger', '~> 9.5.0'
gem "danger-checkstyle_format"
gem "danger-jacoco"
gem 'danger-android_lint'
41 changes: 28 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
ansi (1.5.0)
ast (1.1.0)
base64 (0.2.0)
claide (1.1.0)
claide-plugins (0.9.2)
Expand All @@ -12,7 +14,8 @@ GEM
colored2 (3.1.2)
cork (0.3.0)
colored2 (~> 3.1)
danger (9.4.3)
danger (9.5.1)
base64 (~> 0.2)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
Expand All @@ -22,9 +25,12 @@ GEM
git (~> 1.13)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
no_proxy_fix
octokit (>= 4.0)
pstore (~> 0.1)
terminal-table (>= 1, < 4)
danger-android_lint (0.0.12)
danger-plugin-api (~> 1.0)
oga
danger-checkstyle_format (0.1.1)
danger-plugin-api (~> 1.0)
ox (~> 2.0)
Expand All @@ -33,11 +39,12 @@ GEM
nokogiri-happymapper (~> 0.6)
danger-plugin-api (1.0.0)
danger (> 2.0)
faraday (2.9.0)
faraday-net_http (>= 2.0, < 3.2)
faraday (2.11.0)
faraday-net_http (>= 2.0, < 3.4)
logger
faraday-http-cache (2.5.1)
faraday (>= 0.8)
faraday-net_http (3.1.0)
faraday-net_http (3.3.0)
net-http
git (1.19.1)
addressable (~> 2.8)
Expand All @@ -46,10 +53,10 @@ GEM
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
logger (1.6.1)
nap (1.1.0)
net-http (0.4.1)
uri
no_proxy_fix (0.1.2)
nokogiri (1.16.2-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.2-x86_64-linux)
Expand All @@ -60,26 +67,34 @@ GEM
base64
faraday (>= 1, < 3)
sawyer (~> 0.9)
oga (0.3.4)
ast
ruby-ll (~> 2.1)
open4 (1.3.4)
ox (2.14.17)
public_suffix (5.0.4)
pstore (0.1.3)
public_suffix (5.1.1)
racc (1.7.3)
rchardet (1.8.0)
rexml (3.2.6)
rexml (3.3.9)
ruby-ll (2.1.3)
ansi
ast
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.5.0)
uri (0.13.0)
unicode-display_width (2.6.0)
uri (0.13.1)

PLATFORMS
arm64-darwin-22
x86_64-linux

DEPENDENCIES
danger (~> 9.4.0)
danger (~> 9.5.0)
danger-android_lint
danger-checkstyle_format
danger-jacoco

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ https://github.com/kosenda/hiragana-converter/blob/develop/REFERENCE.md
|App Update|In App Update|
|App Review|In App Review|
|Coil|Image loading library|
|ComposablePreviewScanner|Help auto-generate screenshot tests|
|Crashlytics|Firebase crashlytics|
|Danger|Automatic review|
|Hilt|Dependency Injection|
Expand All @@ -55,7 +56,6 @@ https://github.com/kosenda/hiragana-converter/blob/develop/REFERENCE.md
|Roborazzi|Make JVM Android Integration Test Visible|
|Room|Database|
|Secrets gradle plugin|Reading API keys from `local.properties`|
|Showkase|auto-generates a browser for Jetpack Compose UI|
|Timber|Log output library|
|Truth|Assertions used in testing|
|Turbine|testing library for kotlinx.coroutines Flow|
Expand Down
48 changes: 33 additions & 15 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import com.github.takahirom.roborazzi.ExperimentalRoborazziApi
import com.google.firebase.perf.plugin.FirebasePerfExtension
import ksnd.hiraganaconverter.kotlinOptions
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import java.io.FileInputStream
import java.util.Properties

Expand All @@ -22,21 +23,23 @@ plugins {

android {
namespace = "ksnd.hiraganaconverter"
compileSdk = 34
compileSdk = 35
defaultConfig {
applicationId = "ksnd.hiraganaconverter"
minSdk = 26
targetSdk = 34
versionCode = 44
versionName = "1.33"
targetSdk = 35
versionCode = 45
versionName = "1.34"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}
androidResources {
generateLocaleConfig = true
Expand Down Expand Up @@ -91,9 +94,6 @@ android {
buildConfig = true
compose = true
}
composeCompiler {
enableStrongSkippingMode = true
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
Expand All @@ -102,6 +102,18 @@ android {
testOptions {
unitTests.isIncludeAndroidResources = true
unitTests.isReturnDefaultValues = true
unitTests.all {
it.systemProperties["robolectric.pixelCopyRenderMode"] = "hardware"
}
}
}

roborazzi {
@OptIn(ExperimentalRoborazziApi::class)
generateComposePreviewRobolectricTests {
enable = true
testerQualifiedClassName = "ksnd.hiraganaconverter.RoborazziComposePreviewTest"
packages = listOf("ksnd.hiraganaconverter")
}
}

Expand Down Expand Up @@ -130,6 +142,10 @@ dependencies {
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.lifecycle.runtime.compose)

// Supported: Workaround for AGP not merging test manifest
// ref: https://github.com/robolectric/robolectric/pull/4736
debugImplementation(libs.androidx.compose.ui.test.manifest)

// Lottie
implementation(libs.lottie)

Expand All @@ -151,16 +167,18 @@ dependencies {
// Navigation
implementation(libs.androidx.navigation.compose)

// Showkase
debugImplementation(libs.showkase)
implementation(libs.showkase.annotation)
kspDebug(libs.showkase.processor)

// kotlinx serialization
implementation(libs.kotlinx.serialization.json)

// AboutLibraries
implementation(libs.aboutLibraries)

// Roborazzi (for ComposablePreviewScanner)
testImplementation(libs.roborazzi.compose.preview.scanner.support)
testImplementation(libs.junit)
testImplementation(libs.robolectric)
testImplementation(libs.composable.preview.scanner)
testImplementation(libs.webp.image.io)
}

tasks.withType<Test>().configureEach {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.res.stringResource
import ksnd.hiraganaconverter.core.resource.R
import ksnd.hiraganaconverter.core.ui.preview.UiModePreview
import ksnd.hiraganaconverter.core.ui.theme.HiraganaConverterTheme

@Composable
fun RequestReviewDialog(onLater: () -> Unit, onOk: () -> Unit) {
Expand Down Expand Up @@ -44,15 +46,13 @@ fun RequestReviewDialog(onLater: () -> Unit, onOk: () -> Unit) {
)
}

// FIXME: Skip in ShowkaseComposable does not work.
// @UiModePreview
// @Composable
// @ShowkaseComposable(skip = true)
// fun PreviewRequestReviewDialog() {
// HiraganaConverterTheme {
// RequestReviewDialog(
// onLater = {},
// onOk = {},
// )
// }
// }
@UiModePreview
@Composable
private fun PreviewRequestReviewDialog() {
HiraganaConverterTheme {
RequestReviewDialog(
onLater = {},
onOk = {},
)
}
}
Loading

0 comments on commit 329bdc1

Please sign in to comment.