Skip to content

Refactor build and upgrade to librime 1.18.0 - #2239

Merged
Bambooin merged 5 commits into
osfans:developfrom
Bambooin:cmake-modernization
Nov 25, 2026
Merged

Bambooin merged 5 commits into
osfans:developfrom
Bambooin:cmake-modernization

Conversation

@Bambooin

Copy link
Copy Markdown
Collaborator

Pull request

Issue tracker

Fixes will automatically close the related issues

Fixes #
Fixes #

Feature

Describe features of this pull request

  • chore: upgrade librime to 1.18.0
  • build: silence CMake configure output for OpenCC data
  • build(jni): modernize CMake configuration
  • build(jni): centralize reproducible build flags
  • fix(ci): stop Gradle daemon before Windows cache save

This patch is verified with daily usage.

Code of conduct

Code style

Build pass

  • make debug

Manually test

  • Done

Code Review

  1. No wildcards import
  2. Manual build and test pass
  3. GitHub Action CI pass
  4. At least one contributor review and approve
  5. Merged clean without conflicts
  6. PR will be merged by rebase upstream base

Daily build

Login and download artifact at https://github.com/osfans/trime/actions

Additional Info

  /usr/bin/tar: C\:/Users/runneradmin/.gradle/caches/9.8.2/.../modules-2.lock:
    Read error at byte 0, while reading 38 bytes: Device or resource busy
  /usr/bin/tar: Exiting with failure status due to previous errors
  ##[warning]Failed to save: tar.exe failed with exit code 2

The setup-java Gradle cache save runs after the job, while the Gradle daemon
still holds lock files. Windows forbids reading them, so the cache is not
saved. Stop the daemon in a final step of the commit and PR build jobs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain in the native-build configuration and CI cleanup changes.

No open issues 🎉

What changed in this PR

This PR refactors Trime’s native build configuration to support the planned librime 1.18.0 upgrade and improves build output and CI cleanup.

Changes:

  • Modernizes CMake configuration, centralizes reproducible-build flags, and updates dependency discovery.
  • Captures OpenCC host-build output, displaying it only when the command fails.
  • Stops Gradle daemons at the end of both CI workflows to avoid Windows cache-save conflicts.
File Description
build-logic/​convention/​src/​main/​kotlin/​OpenCCDataPlugin.kt Suppresses successful command output while preserving failure diagnostics.
app/​src/​main/​jni/​librime_jni/​CMakeLists.txt Updates source discovery, scopes linking, and adds keysym headers.
app/​src/​main/​jni/​CMakeLists.txt Requires CMake 4.1 and centralizes reproducible-build options.
app/​src/​main/​jni/​cmake/​Rime.cmake Applies shared reproducibility settings to librime and plugins.
app/​src/​main/​jni/​cmake/​OpenccWorkarounds.cmake Updates header discovery to track added or removed headers.
app/​src/​main/​jni/​cmake/​FindLevelDb.cmake Corrects the discovery flag and exports the include path.
app/​src/​main/​jni/​cmake/​FindBoost.cmake Exports Boost version metadata and simplifies include-path collection.
.github/​workflows/​pull-request-ci.yml Adds unconditional Gradle daemon cleanup.
.github/​workflows/​commit-ci.yml Adds unconditional Gradle daemon cleanup.

Review effort: Balanced

@WhiredPlanck WhiredPlanck left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are neat. Great!

@Bambooin
Bambooin merged commit 8cb8f5a into osfans:develop Nov 25, 2026
5 checks passed
@Bambooin
Bambooin deleted the cmake-modernization branch November 25, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants