Skip to content

fix: use build-time config for copyright year#503

Closed
torlando-tech wants to merge 1 commit intomainfrom
fix/copyright-year-buildconfig
Closed

fix: use build-time config for copyright year#503
torlando-tech wants to merge 1 commit intomainfrom
fix/copyright-year-buildconfig

Conversation

@torlando-tech
Copy link
Copy Markdown
Owner

Summary

Replaces the hardcoded "2025" copyright year with BuildConfig.COPYRIGHT_YEAR, set at build time in build.gradle.kts. This supersedes PRs #495 and #496 which used Calendar.getInstance().get(Calendar.YEAR) — a runtime approach that reads from the device's system clock, which users can set to any date.

Why not dynamic year?

  • A user with their clock set to 2030 or 1999 would see a wrong copyright range
  • Copyright years should reflect when the code was actually written, not what the device thinks the date is
  • Build-time config is the standard approach (same pattern as GIT_COMMIT_HASH and BUILD_TIMESTAMP)

Maintenance: Update the COPYRIGHT_YEAR value in app/build.gradle.kts once per year.

Closes #490
Supersedes #495, #496

Test plan

  • Open Settings > About — verify copyright shows "2025–2026"
  • Change device date to 2030 — copyright should still show "2025–2026"
  • Change device date to 2024 — copyright should still show "2025–2026"

🤖 Generated with Claude Code

Use BuildConfig.COPYRIGHT_YEAR (set in build.gradle.kts) instead of
dynamic year calculation from the device clock. This prevents users
with incorrect system time from seeing wrong copyright dates.

Update yearly by changing the value in build.gradle.kts.

Closes #490

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 19, 2026

Greptile Summary

replaced hardcoded copyright year with build-time configuration to prevent users with incorrect device clocks from seeing wrong copyright dates

  • Follows existing pattern used for GIT_COMMIT_HASH and BUILD_TIMESTAMP
  • Copyright now shows "2025–2026" independent of device system clock
  • Requires annual manual update of COPYRIGHT_YEAR in build.gradle.kts

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • Clean implementation using established patterns, simple changes with clear intent, no logic or security issues
  • No files require special attention

Important Files Changed

Filename Overview
app/build.gradle.kts added COPYRIGHT_YEAR build config field set to "2026", following existing pattern for build-time configuration
app/src/main/java/com/lxmf/messenger/ui/screens/settings/cards/AboutCard.kt replaced hardcoded "2025" with dynamic copyright range using BuildConfig.COPYRIGHT_YEAR

Last reviewed commit: 3e27b29

@sentry
Copy link
Copy Markdown
Contributor

sentry bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@torlando-tech
Copy link
Copy Markdown
Owner Author

Superseded by clean single-commit PRs targeting both main and release/v0.8.x

@torlando-tech torlando-tech deleted the fix/copyright-year-buildconfig branch February 19, 2026 23:11
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.

Date in About is still at the year 2025

1 participant