SIGN IN SIGN UP
square / leakcanary UNCLAIMED

A memory leak detection library for Android.

0 0 74 Kotlin

Update minimum SDK to API 21 (Android 5.0 Lollipop)

This commit migrates the entire LeakCanary project from minimum SDK API 14
to API 21, enabling modern Android features and simplifying the codebase.

API 21 corresponds to Android 5.0 (Lollipop), released in 2014, providing
over a decade of Android compatibility while enabling Material Design and
modern development practices.

Changes included:

## Build Configuration
- Update androidMinSdk from "14" to "21" in version catalog
- Standardize all modules to use libs.versions.androidMinSdk reference
- Update hardcoded minSdk values in sample and library modules to use TOML

## GitHub Actions / CI
- Remove API 16 and API 19 from test matrix
- Streamline CI to test only API 21+ (21, 23, 26, 31, 33, 34)
- Improve CI efficiency with fewer test combinations

## Test Infrastructure
- Upgrade androidx.test:orchestrator from 1.4.2 to 1.5.0
- Modernize test assertions to use direct assertThat(Throwable) calls
- Remove API 16 workaround comments and code

## Code Modernization
- Remove obsolete SDK version checks (9 lint issues resolved)
- Simplify file provider methods for API 21+ only
- Update notification builder usage for modern APIs
- Remove legacy view tree observer workarounds
- Modernize layout and rendering code

## Resources & UI
- Migrate drawable resources from selectors to Material ripple effects
- Update themes from Holo to Material Design (API 21+ requirement)
- Merge and remove obsolete -v21 resource folders
- Modernize button and touch feedback using ripples

## Benefits
- Access to Material Design components and APIs
- Simplified codebase with removed legacy compatibility code
- Enhanced test infrastructure with latest orchestrator
- Improved user experience with modern UI patterns
- Faster CI builds with fewer test matrix combinations

## Compatibility
All modules now consistently require Android 5.0 (API 21, 2014) or higher.
This affects minSdk but does not change the public API surface.

Co-Authored-By: Claude <noreply@anthropic.com>
P
pblundell committed
c1b9efe48204f35fc0b8865877e6253aa755f844
Parent: a6d2b6b