-
Notifications
You must be signed in to change notification settings - Fork 0
ライブラリ/環境の更新 #306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ライブラリ/環境の更新 #306
Conversation
WalkthroughKotlin・AGP・Gradle Wrapperおよび関連ツールのバージョンが更新され、複数のモジュールのビルドスクリプトで Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 分 Possibly related PRs
詩
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@AndroidApp/.idea/kotlinc.xml`:
- Line 4: The kotlinc.xml currently sets the Kotlin JPS plugin version via the
option name="version" value="2.2.21", which conflicts with the Kotlin version
declared in libs.versions.toml (kotlin = "2.3.0"); update the option value in
kotlinc.xml to match the libs.versions.toml Kotlin entry (set the option
name="version" to "2.3.0") so IDE and build system use the same Kotlin version.
In `@AndroidApp/gradle/wrapper/gradle-wrapper.properties`:
- Line 3: The Gradle version in gradle-wrapper.properties (distributionUrl) is
set to 9.3.0 which is not officially compatible with AGP 8.13.2; either
downgrade Gradle to 8.13 by updating distributionUrl to the Gradle 8.13
distribution (e.g., gradle-8.13-bin.zip) or upgrade the Android Gradle Plugin to
a 9.x release to match Gradle 9.x; locate the distributionUrl entry in
gradle-wrapper.properties and change it accordingly, or instead update the AGP
version in your build.gradle files (classpath
'com.android.tools.build:gradle:..') so both Gradle and AGP versions are
compatible.
🧹 Nitpick comments (1)
AndroidApp/model/build.gradle.kts (1)
10-14: LGTM! Kotlin 2.0の新しいcompilerOptions DSLへの移行は正しいです。
kotlinOptions { jvmTarget = "17" }からkotlin { compilerOptions { jvmTarget = JvmTarget.JVM_17 } }への移行は、Kotlin Gradle Plugin 2.0+での推奨パターンです。AIサマリーによると、他のモジュールでは異なる参照スタイルが使用されています(例:
appではJvmTarget.JVM_17、domainではJVM_17)。必須ではありませんが、プロジェクト全体で参照スタイルを統一すると可読性が向上します。
| <project version="4"> | ||
| <component name="KotlinJpsPluginSettings"> | ||
| <option name="version" value="2.0.21" /> | ||
| <option name="version" value="2.2.21" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kotlin バージョンの不整合があります。
kotlinc.xml では Kotlin JPS プラグインのバージョンが 2.2.21 に設定されていますが、libs.versions.toml では kotlin = "2.3.0" となっています。IDE とビルドシステム間でバージョンの不一致が発生する可能性があります。
🔧 提案される修正
libs.versions.toml のバージョンと一致させる場合:
- <option name="version" value="2.2.21" />
+ <option name="version" value="2.3.0" />📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <option name="version" value="2.2.21" /> | |
| <option name="version" value="2.3.0" /> |
🤖 Prompt for AI Agents
In `@AndroidApp/.idea/kotlinc.xml` at line 4, The kotlinc.xml currently sets the
Kotlin JPS plugin version via the option name="version" value="2.2.21", which
conflicts with the Kotlin version declared in libs.versions.toml (kotlin =
"2.3.0"); update the option value in kotlinc.xml to match the libs.versions.toml
Kotlin entry (set the option name="version" to "2.3.0") so IDE and build system
use the same Kotlin version.
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Gradle 9.3.0 AGP 8.13.2 compatibility
💡 Result:
Short answer: Not officially — AGP 8.13.2 declares Gradle 8.13 as the required/default Gradle version, so the supported/expected combination is AGP 8.13.2 + Gradle 8.13. (developer.android.com)
Detail important for trying Gradle 9.3.0:
- Gradle 9.x requires AGP >= 8.4 (so AGP 8.13.2 satisfies Gradle’s minimum supported-AGP check). (docs.gradle.org)
- However, the AGP 8.13 release notes still list Gradle 8.13 as the minimum/default tested version; using Gradle 9.3 may work but is not the officially documented/tested combination and may expose incompatibilities in AGP or third‑party plugins. (developer.android.com)
Recommendation: stay on Gradle 8.13 with AGP 8.13.2 for guaranteed support. If you need Gradle 9.3, test thoroughly (CI + full clean builds) or upgrade AGP to a 9.x release that explicitly targets Gradle 9.0+. (developer.android.com)
Citations:
- 1: https://developer.android.com/studio/releases/gradle-plugin?utm_source=openai
- 2: https://docs.gradle.org/current/userguide/upgrading_major_version_9.html?utm_source=openai
- 3: https://developer.android.com/studio/releases/gradle-plugin?utm_source=openai
- 4: https://developer.android.com/build/releases/agp-preview?utm_source=openai
🌐 Web query:
Android Gradle Plugin 8.13.2 required Gradle version
💡 Result:
Android Gradle Plugin 8.13.2 requires Gradle 8.13. [1][2]
Sources:
[1] Android Developers — Android Gradle plugin release notes/compatibility.
[2] Gradle 8.13 release notes.
Gradle 9.3.0 は AGP 8.13.2 と互換性がありません。
AGP 8.13.2 の公式要件は Gradle 8.13 です。Gradle 9.3.0 は AGP >= 8.4 を要件としますが、AGP 8.13.2 は Gradle 9.3.0 との組み合わせについて公式にはテストされていません。以下のいずれかの対応が必要です:
- Gradle を 8.13 にダウングレードする、または
- AGP を 9.x 系にアップグレードする
現在の構成では、ビルド失敗やプラグイン非互換性が発生する可能性があります。
🤖 Prompt for AI Agents
In `@AndroidApp/gradle/wrapper/gradle-wrapper.properties` at line 3, The Gradle
version in gradle-wrapper.properties (distributionUrl) is set to 9.3.0 which is
not officially compatible with AGP 8.13.2; either downgrade Gradle to 8.13 by
updating distributionUrl to the Gradle 8.13 distribution (e.g.,
gradle-8.13-bin.zip) or upgrade the Android Gradle Plugin to a 9.x release to
match Gradle 9.x; locate the distributionUrl entry in gradle-wrapper.properties
and change it accordingly, or instead update the AGP version in your
build.gradle files (classpath 'com.android.tools.build:gradle:..') so both
Gradle and AGP versions are compatible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@AndroidApp/ui/build.gradle.kts`:
- Around line 39-41: The current tasks.withType<Test>().configureEach block sets
failOnNoDiscoveredTests=false for all Test tasks; narrow this to only
Paparazzi-related test tasks (e.g. tasks whose names are recordPaparazzi or
verifyPaparazzi) so other test tasks still fail when no tests are discovered.
Update the tasks configuration to target only those Paparazzi tasks (referencing
the existing tasks.withType<Test>().configureEach and the task names
recordPaparazzi / verifyPaparazzi) and set failOnNoDiscoveredTests=false only
for that filtered set.
| tasks.withType<Test>().configureEach { | ||
| // FIXME: ScreenshotTestを全部コメントアウトしてるので一時的にfalseにしておく | ||
| failOnNoDiscoveredTests = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
# First, let's examine the build.gradle.kts file
cat -n AndroidApp/ui/build.gradle.kts | head -60Repository: ptkNktq/AndroidNotificationNotifier
Length of output: 1552
🏁 Script executed:
# Search for screenshot test references in the codebase
rg -i "screenshot" AndroidApp/ui/ --type kotlin --type gradle -B 2 -A 2Repository: ptkNktq/AndroidNotificationNotifier
Length of output: 11719
🏁 Script executed:
# Look for Test task configuration and custom tasks
rg -i "tasks\.with|test" AndroidApp/ui/build.gradle.kts -B 2 -A 5Repository: ptkNktq/AndroidNotificationNotifier
Length of output: 891
🏁 Script executed:
# Check if there are other test-related tasks or configurations
rg -i "unitTest|androidTest|paparazzi\|screenshot" AndroidApp/ui/ --type kotlin --type gradle | head -20Repository: ptkNktq/AndroidNotificationNotifier
Length of output: 151
🏁 Script executed:
# Check for other test sources in the ui module
find AndroidApp/ui/src -type d -name "*test*" | head -20Repository: ptkNktq/AndroidNotificationNotifier
Length of output: 61
🏁 Script executed:
# List all test-related directories and files
ls -la AndroidApp/ui/src/Repository: ptkNktq/AndroidNotificationNotifier
Length of output: 303
🏁 Script executed:
# Search for any unitTest or androidTest test classes
find AndroidApp/ui -path "*/src/*/kotlin/*Test*.kt" -o -path "*/src/*/java/*Test*.java" 2>/dev/nullRepository: ptkNktq/AndroidNotificationNotifier
Length of output: 166
🏁 Script executed:
# Check what other modules look like to see if this pattern is normal
find AndroidApp -name "build.gradle.kts" -exec grep -l "failOnNoDiscoveredTests" {} \;Repository: ptkNktq/AndroidNotificationNotifier
Length of output: 109
🏁 Script executed:
# Check what test tasks paparazzi creates - look for gradle logs or inspect plugin behavior
# by searching for any references to paparazzi or screenshot task naming
rg -i "paparazzi\|screenshot.*test\|test.*screenshot" --type gradle --type kotlin -B 1 -A 1Repository: ptkNktq/AndroidNotificationNotifier
Length of output: 61
🏁 Script executed:
# Look for gradle files to understand the test task naming better
find AndroidApp -name "*.gradle.kts" | xargs grep -l "Test" | head -5Repository: ptkNktq/AndroidNotificationNotifier
Length of output: 188
🏁 Script executed:
# Let's verify if there are androidTest or unitTest sources anywhere
find AndroidApp/ui -type d \( -name "androidTest" -o -name "unitTest" -o -name "test" \)Repository: ptkNktq/AndroidNotificationNotifier
Length of output: 61
🏁 Script executed:
# Check all test source sets in the ui module
find AndroidApp/ui/src -maxdepth 1 -type dRepository: ptkNktq/AndroidNotificationNotifier
Length of output: 152
スクリーンショット関連タスクに限定して failOnNoDiscoveredTests=false を適用してください。
全 Test タスクに適用すると、スクリーンショット以外のテスト不検出も黙って通り、誤設定に気づけません。Paparazziタスク(recordPaparazzi や verifyPaparazzi など)に限定するのが安全です。
🛠️ 例: Paparazziタスクのみに限定
tasks.withType<Test>().configureEach {
// FIXME: ScreenshotTestを全部コメントアウトしてるので一時的にfalseにしておく
- failOnNoDiscoveredTests = false
+ if (name.contains("paparazzi", ignoreCase = true)) {
+ failOnNoDiscoveredTests = false
+ }
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| tasks.withType<Test>().configureEach { | |
| // FIXME: ScreenshotTestを全部コメントアウトしてるので一時的にfalseにしておく | |
| failOnNoDiscoveredTests = false | |
| tasks.withType<Test>().configureEach { | |
| // FIXME: ScreenshotTestを全部コメントアウトしてるので一時的にfalseにしておく | |
| if (name.contains("paparazzi", ignoreCase = true)) { | |
| failOnNoDiscoveredTests = false | |
| } | |
| } |
🤖 Prompt for AI Agents
In `@AndroidApp/ui/build.gradle.kts` around lines 39 - 41, The current
tasks.withType<Test>().configureEach block sets failOnNoDiscoveredTests=false
for all Test tasks; narrow this to only Paparazzi-related test tasks (e.g. tasks
whose names are recordPaparazzi or verifyPaparazzi) so other test tasks still
fail when no tests are discovered. Update the tasks configuration to target only
those Paparazzi tasks (referencing the existing
tasks.withType<Test>().configureEach and the task names recordPaparazzi /
verifyPaparazzi) and set failOnNoDiscoveredTests=false only for that filtered
set.
Summary by CodeRabbit
リリースノート
✏️ Tip: You can customize this high-level summary in your review settings.