JGoodies の依存と互換用クラス、クラスパスの順番の決め打ちを消す

Open
#1,388 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
java

Research direction

Start by checking the listed com.jgoodies references in modules and confirm the prerequisite issues are merged. Then follow the file list and steps in the issue to remove the compatibility classes, dependency and launcher classpath customization, and update licensing files. Run the specified Gradle checks and source inventory check; done means no remaining JGoodies references in the stated locations, the fixed layout tests pass, and the installed launcher works with the standard classpath.

Written by the indexing model from the issue text.

Description

area: build area: ui enhancement priority: low status: blocked

親:#1381
前提:#1382、#1383、#1384、#1385、#1386、#1387 がすべてマージされていること

概要

#1383〜#1387 で、すべての画面のコードが com.microproject.ui.layout を使うようになったあと、JGoodies Forms の依存と、互換用のクラス、クラスパスの順番の決め打ちを消す。

消すもの(master 80ce3279c 時点の位置):

  • 互換用クラス modules/microproject_ui/src/main/java/com/jgoodies/forms/builder/DefaultFormBuilder.java(com.jgoodies のパッケージに置いた自前のクラス)
  • modules/microproject_ui/build.gradle.kts の implementation(libs.forms)
  • 同じファイルの tasks.named<CreateStartScripts>("startScripts") { doLast { ... } }:起動スクリプトの CLASSPATH を microproject_ui.jar → jgoodies-forms-1.9.0.jar → * の順に書き換えるためだけにある
  • 同じファイルの guiTest の、クラスパスの順番についてのコメント
  • ルートの build.gradle.kts の exclude(group = "com.jgoodies", module = "forms") と、その上のコメント
  • #1382 で足した、JGoodies の jar と結果を比べるテスト

作業手順

  1. 残りがないことを確かめる:rg -n "com\.jgoodies" modules --glob "!**/com/jgoodies/**" が、#1382 の比べるテストのほかは 0 件であること。0 件でなければ作業を止め、残っているファイルをこの issue にコメントする。
  2. modules/microproject_ui/src/main/java/com/jgoodies/ のディレクトリを丸ごと消す。com.microproject.ui.layout.FormRowBuilder の実装が新しい DefaultFormBuilder だけになるので、FormRowBuilder はそのまま残す。
  3. #1382 の、JGoodies の jar と結果を比べるテストを消す。期待値を固定した配置のテストは残す。
  4. modules/microproject_ui/build.gradle.kts を変える。
    • implementation(libs.forms) を消す。
    • tasks.named<CreateStartScripts>("startScripts") { ... } のブロックを丸ごと消す。
    • guiTest の classpath = files(tasks.jar).plus(guiTestSourceSet.runtimeClasspath) は残す。その上の 4 行のコメント("The installed desktop launcher intentionally puts microproject_ui.jar before jgoodies-forms ...")を、// Run GUI acceptance against the packaged jar, as the installed launcher does. の 1 行に書き換える。
  5. ルートの build.gradle.kts の subprojects の configurations.configureEach から、exclude(group = "com.jgoodies", module = "forms") と、その上のコメントを消す。verifyDependencyAllowlist の allowedGroups から "com.jgoodies" を消す。
  6. gradle/libs.versions.toml の forms = { module = "com.jgoodies:jgoodies-forms", version = "1.9.0" } を消す。
  7. gradle/verification-metadata.xml から com.jgoodies:jgoodies-forms:1.9.0 を消す。jgoodies-common と jgoodies-binding は、.\gradlew.bat dependencies のどのモジュールの出力にも出てこなければ消す。
  8. 文書を直す。
    • scripts/launch_installdist.sh の 2〜3 行目のコメントから、DefaultFormBuilder の互換用クラスの話を消す。jar の並び(preferred=(...))は変えない。
    • docs/gui-recovery-sequence.md の「Keep the bundled DefaultFormBuilder.nextLine(int) grid-row contract aligned with JGoodies ...」を、com.microproject.ui.layout.DefaultFormBuilder.nextLine(int) の契約として書き直す(意味は変えない)。
    • packaging/licenses/license.txt と license.rtf から「9. JGoodies Forms」の節を消し、後ろの節の番号を詰め直す。packaging/licenses/third-party/index.html の JGoodies の行を消す。packaging/licenses/third-party/jgoodies-forms.txt を消す。

検証

.\gradlew.bat :microproject_ui:compileJava :microproject_ui:compileTestJava :microproject_ui:compileGuiTestJava --console=plain
.\gradlew.bat :microproject_ui:test --console=plain
.\gradlew.bat verifyDependencyAllowlist verifyArchitectureBoundaries verifyNamingConventions --console=plain
.\gradlew.bat clean build installDist --console=plain
python scripts/test_source_inventory.py --check --output build/audit/test-source-inventory.json
git diff --check

完了条件

  • rg -n "com\.jgoodies|jgoodies-forms" modules gradle/libs.versions.toml build.gradle.kts が 0 件
  • modules/microproject_ui/src/main/java/com/jgoodies がない
  • installDist で作った modules\microproject_ui\build\install\microproject_ui\lib に jgoodies- で始まる jar がない
  • installDist で作った bin\microproject_ui.bat と bin/microproject_ui の CLASSPATH の行が、Gradle の標準の形(%APP_HOME%\lib\... の一覧)であり、jgoodies を含まない
  • 期待値を固定した配置のテスト(com.microproject.ui.layout.*)が通る
  • verifyDependencyAllowlist が通る
  • PR の build と GUI acceptance が通る。インストールした起動スクリプトから起動し、主なダイアログ(プロジェクト情報、タスク情報、稼働時間の変更)が、変更の前と同じに見えることを画像で PR に書く

範囲外

  • com.microproject.ui.layout の機能の追加。
  • ダイアログの配置の変更。

共通ルール

  • master から作業ブランチを作り、PR で出す(master へ直接 push しない)。必須チェックは build と GUI acceptance。
  • .editorconfig に従う(UTF-8、CRLF、タブ)。
  • 関係のない整形やリネームを混ぜない。
  • テスト出力は失敗と要約だけを報告する。実行していない確認を「通った」と書かない。
  • 依存を変えたら、docs/agent-workflows.md の「Dependency verification」の手順で gradle/verification-metadata.xml を更新する。

Generated by Claude Code

Dominant language
Java
Stars
2
Forks
1
Avg merge
4h 52m
Merged PRs (30d)
349

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tetsuji16/microProject

All issues in tetsuji16/microProject

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.