Files
calendula/app/build.gradle.kts
T
Jean-Luc Makiolaandmakiolaj e10fae0710
Release — F-Droid repo + Gitea/Codeberg release + Play / detect (push) Successful in 5s
Release — F-Droid repo + Gitea/Codeberg release + Play / release (push) Successful in 32m28s
Release — F-Droid repo + Gitea/Codeberg release + Play / play (push) Failing after 1m21s
Release v2.20.0 (#286)
Release 2.20.0.

**Added**
- Long-press an event's title, location or description to copy it ([#195]).
- Settings → About lists the open-source projects Calendula ships, with
  copyright holder, licence and a link to each project's source ([#281]).

**Changed**
- Week and day view seat every hour in its own rounded cell instead of drawing a
  separator line across the column; an on-the-hour event fills its cell rather
  than overhanging the seam ([#113]).
- Event titles run to the edge of their chip in all three grid views — no
  ellipsis. RTL keeps it, where clipping would cut the start of the title
  ([#164]).
- Month events show their start time where the chip is wide enough, and event
  times across month, week and day are set in a regular weight ([#219]).
- An invitation you haven't answered is drawn as an outline; declined events
  keep their filled, struck-through chip and now sort last in the month view
  ([#230]).
- The top-bar title falls back to a shorter form instead of being cut off, and
  the bar's trailing edge lines up with the grid under it ([#165]).
- The jump-to-today button carries today's date and rolls over at midnight
  ([#220]).
- The quick-switch pill hides when there is nothing to switch between, and views
  can now be turned off down to a single one ([#150]).

**Fixed**
- A long location wraps and its card grows, instead of scrolling sideways out of
  sight ([#273]).
- The event form capitalizes sentences again; location stays uncapitalized,
  being as often a URL as an address ([#146]).
- A dragged block's floating copy wraps its time and title the way the block
  does, instead of clipping to one line while held ([#267]).

### Release preparation

`versionName`/`versionCode` → 2.20.0/22000, `CHANGELOG.md`'s Unreleased section
moved under a dated 2.20.0 heading, and a hand-written 497-character
`fastlane/metadata/android/en-US/changelogs/22000.txt`.

Six of the merged PRs had no CHANGELOG entry (#146, #150, #195, #230, #267,
#281); they are written up here. The existing #164 entry only described the
month view and did not mention the RTL exception — both corrected.

### Also here

`scripts/check_changelog_lengths.sh`, run in CI next to the reproducible-release
invariant. Play rejects a "What's New" over 500 characters, which would fail the
upload *after* the release had already shipped to F-Droid and Codeberg —
2.19.4 went out at 697. The script walks every locale, fails on the current
`versionCode` and only warns on the already-published files, of which 13 are
over the limit from when the pipeline auto-generated them from `CHANGELOG.md`.

Deviation worth naming: this does not fix those 13. They are published and Play
never re-reads them, so failing on them would paint every PR red for no gain;
`--strict` covers them if they are ever backfilled.

Follow-up filed as #285 — the store listing exists in only 4 of 12 locales and
its graphics still don't qualify for Play.

All twelve issues above are closed by their own PRs; this branch ships them.

Co-authored-by: Jean-Luc Makiola <business@jeanlucmakiola.de>
Reviewed-on: https://codeberg.org/jlmakiola/calendula/pulls/286
2026-09-07 21:25:35 +02:00

192 lines
7.2 KiB
Kotlin

import java.util.Properties
import java.io.FileInputStream
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.ksp)
alias(libs.plugins.hilt)
}
val keystorePropertiesFile = rootProject.file("key.properties")
val keystoreProperties = Properties().apply {
if (keystorePropertiesFile.exists()) {
load(FileInputStream(keystorePropertiesFile))
}
}
android {
namespace = "de.jeanlucmakiola.calendula"
compileSdk = 37
defaultConfig {
applicationId = "de.jeanlucmakiola.calendula"
minSdk = 29
targetSdk = 36
// These committed values ARE the source of truth for a release: merging
// a bumped versionName into main triggers .gitea/workflows/release.yaml,
// which builds this version and then creates the matching vX.Y.Z tag +
// release itself (versionCode is pinned to MAJOR*10000 + MINOR*100 +
// PATCH from versionName, e.g. 2.7.2 -> 20702). See docs/RELEASING.md.
versionCode = 22000
versionName = "2.20.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
if (keystorePropertiesFile.exists()) {
create("release") {
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
storeFile = file(keystoreProperties["storeFile"] as String)
storePassword = keystoreProperties["storePassword"] as String
}
}
}
buildTypes {
release {
// Keep release builds reproducible for F-Droid: don't let AGP embed
// build-environment git metadata (META-INF/version-control-info.textproto),
// whose `revision`/path content varies by build machine and is the only
// thing that otherwise differs from a clean from-source rebuild.
vcsInfo { include = false }
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
if (keystorePropertiesFile.exists()) {
signingConfig = signingConfigs.getByName("release")
}
}
debug {
applicationIdSuffix = ".debug"
isMinifyEnabled = false
}
// A locally-installable twin of `release`: same R8 shrinking + obfuscation
// and resource shrinking, but debug-signed and given its own applicationId
// suffix so it installs alongside both the production app (signed with the
// real key) and the debug build. Used to smoke-test a release candidate on
// a real device before tagging — R8-only breakage and first-run/permission
// states don't surface in the unminified debug build, nor on a device that
// already holds the permission. Never published. See docs/RELEASING.md.
create("releaseTest") {
initWith(getByName("release"))
applicationIdSuffix = ".releasetest"
signingConfig = signingConfigs.getByName("debug")
isMinifyEnabled = true
isShrinkResources = true
matchingFallbacks += "release"
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
buildFeatures {
compose = true
// BuildConfig.DEBUG gates the in-app debug ribbon (see DebugRibbon).
buildConfig = true
}
// Don't embed AGP's dependency-metadata block in the APK signing block. It's
// a Play-oriented blob, and F-Droid's reproducible-build scanner rejects any
// "extra signing block" — so leaving it in blocks publishing to the official
// repo. It lives in the signing block, not the zip entries, so disabling it
// doesn't change the build output (reproducibility is unaffected).
dependenciesInfo {
includeInApk = false
includeInBundle = false
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
lint {
// Community translations are expected to be partial — a missing string
// falls back to the English base at runtime — so don't fail the build on
// it. Likewise a translated <plurals> may not fill every CLDR quantity
// form its locale defines (e.g. Arabic needs "zero"); the missing form
// falls back to "other" at runtime, so MissingQuantity is informational
// too. Stale/extra keys (ExtraTranslation) stay fatal; scripts/
// check_translations.py guards the same invariants with clearer,
// translator-facing messages.
informational += listOf("MissingTranslation", "MissingQuantity")
}
testOptions {
unitTests {
all { it.useJUnitPlatform() }
isReturnDefaultValues = true
}
}
}
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}
dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.lifecycle.runtime.compose)
implementation(libs.androidx.activity.compose)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.ui)
implementation(libs.androidx.ui.graphics)
implementation(libs.androidx.ui.tooling.preview)
implementation(libs.androidx.material3)
implementation(libs.androidx.compose.material.icons.core)
implementation(libs.androidx.compose.material.icons.extended)
implementation(libs.hilt.android)
implementation(libs.androidx.hilt.navigation.compose)
ksp(libs.hilt.compiler)
implementation(libs.androidx.datastore.preferences)
implementation(libs.androidx.work.runtime.ktx)
implementation(libs.androidx.documentfile)
implementation(libs.androidx.glance.appwidget)
implementation(libs.androidx.glance.material3)
implementation(libs.kotlinx.datetime)
implementation("de.jeanlucmakiola.floret:core-time")
implementation("de.jeanlucmakiola.floret:core-locale")
implementation("de.jeanlucmakiola.floret:core-crash")
implementation("de.jeanlucmakiola.floret:core-reminders")
implementation("de.jeanlucmakiola.floret:identity")
implementation("de.jeanlucmakiola.floret:components")
implementation(libs.kotlinx.coroutines.core)
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)
testImplementation(libs.junit.jupiter.api)
testRuntimeOnly(libs.junit.jupiter.engine)
testRuntimeOnly(libs.junit.platform.launcher)
testImplementation(libs.truth)
testImplementation(libs.turbine)
testImplementation(libs.kotlinx.coroutines.test)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(libs.androidx.test.rules)
androidTestImplementation(libs.truth)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.ui.test.junit4)
}