## Major Changes
### New Jetpack Compose Architecture (1,883 LOC total)
- ComposeMainActivity.kt (370L): Main activity with Compose integration
- MainScreen.kt (322L): Root Compose screen with layout orchestration
- MainViewModel.kt (564L): MVVM state management for notes and sync
- components/NoteCard.kt (243L): Individual note card with selection support
- components/NotesList.kt (65L): LazyColumn with optimized item rendering
- components/DeleteConfirmationDialog.kt (93L): Dialog with Server/Local options
- components/EmptyState.kt (73L): Empty state UI
- components/NoteTypeFAB.kt (83L): Floating action button with note type menu
- components/SyncStatusBanner.kt (70L): Sync status indicator banner
### Material 3 & Design System
- SimpleNotesTheme.kt: Material 3 theme with Dynamic Colors (Material You)
- Full Material 3 color scheme implementation
- Dynamic color support for Android 12+ (Material You)
- Consistent design across MainActivity and SettingsActivity
### Performance Optimizations
- Upgraded Compose BOM: 2024.12.01 → 2026.01.00 (latest Jan 2026)
- Enable Strong Skipping Mode for efficient recomposition
- Async loadNotes() on IO dispatcher (no UI blocking at startup)
- LazyColumn with proper key={it.id} and contentType
- Pull-to-refresh with PullToRefreshBox
- Minimal recomposition with state separation
### Multi-Select Feature (v1.5.0)
- Long-press note to enter selection mode
- Tap additional notes to toggle selection in selection mode
- SelectionTopBar with:
* Selection counter ("X selected")
* Select All button
* Batch Delete button
- Animated checkbox indicator on selected note cards
- DeleteConfirmationDialog with Server/Local deletion options
- Fixed server deletion: deleteNoteFromServer() now properly called with 3.5s delay
### Dependency Updates
- Added org.jetbrains.kotlin.plugin.compose (Compose Compiler)
- Jetpack Compose libraries:
* androidx.compose.bom:2026.01.00
* androidx.compose.ui, material3, material-icons-extended
* androidx.activity-compose, androidx.navigation-compose
* androidx.lifecycle-runtime-compose
- All dependencies remain Apache 2.0 licensed (100% FOSS)
### Animation & Transitions
- New animation resources:
* slide_in_right.xml, slide_out_left.xml
* slide_in_left.xml, slide_out_right.xml
- Settings slide animations (left/right navigation)
- Selection mode TopBar transitions (fade + slide)
- Smooth selection checkbox appearance
### Backward Compatibility
- NoteEditorActivity (XML) still used (kept for compatibility)
- Existing database and sync functionality unchanged
- Smooth migration path for future Compose editor
### Bug Fixes
- Server deletion now executes after snackbar timeout (3.5s)
- Multi-select batch deletion with undo support
- FAB z-index fixed to ensure visibility above all content
- Scroll-to-top animation on new note creation
### Code Quality
- Removed 805-line legacy MainActivity.kt
- Clean separation of concerns: Activity → Screen → ViewModel
- Composable functions follow Material 3 guidelines
- No remember() blocks inside LazyColumn items (performance)
- Direct MaterialTheme access (Compose handles optimization)
### Manifest Changes
- Updated to use ComposeMainActivity as main launcher
- Activity transition animations configured
### Testing
- Build successful on Pixel 9 Pro XL (Android 16, 120Hz)
- Release build optimized (minified + shrinkResources)
- Multi-select UX tested
- Server deletion verified
BREAKING CHANGE: Long-press on note now enters multi-select mode instead of direct delete
RELATED: v1.5.0_EXTENDED_FEATURES_PLAN.md added to project-docs
187 lines
6.9 KiB
Plaintext
187 lines
6.9 KiB
Plaintext
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.android)
|
|
alias(libs.plugins.kotlin.compose) // v1.5.0: Jetpack Compose Compiler
|
|
// ⚡ v1.3.1: ktlint deaktiviert wegen Parser-Problemen, aktivieren in v1.4.0
|
|
// alias(libs.plugins.ktlint)
|
|
alias(libs.plugins.detekt)
|
|
}
|
|
|
|
import java.util.Properties
|
|
import java.io.FileInputStream
|
|
import java.text.SimpleDateFormat
|
|
import java.util.Date
|
|
import java.util.Locale
|
|
|
|
android {
|
|
namespace = "dev.dettmer.simplenotes"
|
|
compileSdk = 36
|
|
|
|
defaultConfig {
|
|
applicationId = "dev.dettmer.simplenotes"
|
|
minSdk = 24
|
|
targetSdk = 36
|
|
versionCode = 13 // 🔧 v1.5.0: Jetpack Compose Settings Redesign
|
|
versionName = "1.5.0" // 🔧 v1.5.0: Jetpack Compose Settings Redesign
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
// Disable Google dependency metadata for F-Droid/IzzyOnDroid compatibility
|
|
dependenciesInfo {
|
|
includeInApk = false // Removes DEPENDENCY_INFO_BLOCK from APK
|
|
includeInBundle = false // Also disable for AAB (Google Play)
|
|
}
|
|
|
|
// Product Flavors for F-Droid and standard builds
|
|
// Note: APK splits are disabled to ensure single APK output
|
|
flavorDimensions += "distribution"
|
|
productFlavors {
|
|
create("fdroid") {
|
|
dimension = "distribution"
|
|
// F-Droid builds have no proprietary dependencies
|
|
// All dependencies in this project are already FOSS-compatible
|
|
// No APK splits - F-Droid expects single universal APK
|
|
}
|
|
|
|
create("standard") {
|
|
dimension = "distribution"
|
|
// Standard builds can include Play Services in the future if needed
|
|
}
|
|
}
|
|
|
|
// Signing configuration for release builds
|
|
signingConfigs {
|
|
create("release") {
|
|
// Load keystore configuration from key.properties file
|
|
val keystorePropertiesFile = rootProject.file("key.properties")
|
|
if (keystorePropertiesFile.exists()) {
|
|
val keystoreProperties = Properties()
|
|
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
|
|
|
storeFile = file(keystoreProperties.getProperty("storeFile"))
|
|
storePassword = keystoreProperties.getProperty("storePassword")
|
|
keyAlias = keystoreProperties.getProperty("keyAlias")
|
|
keyPassword = keystoreProperties.getProperty("keyPassword")
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
// ⚡ v1.3.1: Debug-Builds können parallel zur Release-App installiert werden
|
|
applicationIdSuffix = ".debug"
|
|
versionNameSuffix = "-debug"
|
|
isDebuggable = true
|
|
|
|
// Optionales separates Icon-Label für Debug-Builds
|
|
resValue("string", "app_name_debug", "Simple Notes (Debug)")
|
|
}
|
|
|
|
release {
|
|
isMinifyEnabled = true
|
|
isShrinkResources = true
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
// Use release signing config if available, otherwise debug
|
|
signingConfig = if (rootProject.file("key.properties").exists()) {
|
|
signingConfigs.getByName("release")
|
|
} else {
|
|
signingConfigs.getByName("debug")
|
|
}
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
viewBinding = true
|
|
buildConfig = true // Enable BuildConfig generation
|
|
compose = true // v1.5.0: Jetpack Compose für Settings Redesign
|
|
}
|
|
|
|
// v1.5.0 Hotfix: Strong Skipping Mode für bessere 120Hz Performance
|
|
composeCompiler {
|
|
enableStrongSkippingMode = true
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = "11"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// Existing (bleiben so)
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.appcompat)
|
|
implementation(libs.material)
|
|
implementation(libs.androidx.activity)
|
|
implementation(libs.androidx.constraintlayout)
|
|
|
|
// Splash Screen API (Android 12+)
|
|
implementation("androidx.core:core-splashscreen:1.0.1")
|
|
|
|
// Unsere Dependencies (DIREKT mit Versionen - viel einfacher!)
|
|
implementation("com.github.thegrizzlylabs:sardine-android:0.8") {
|
|
exclude(group = "xpp3", module = "xpp3")
|
|
}
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
|
|
implementation("com.google.code.gson:gson:2.10.1")
|
|
implementation("androidx.work:work-runtime-ktx:2.9.0")
|
|
implementation("androidx.recyclerview:recyclerview:1.3.2")
|
|
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
|
|
|
|
// LocalBroadcastManager für UI Refresh
|
|
implementation("androidx.localbroadcastmanager:localbroadcastmanager:1.1.0")
|
|
|
|
// SwipeRefreshLayout für Pull-to-Refresh
|
|
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
|
|
|
|
// ═══════════════════════════════════════════════════════════════════════
|
|
// v1.5.0: Jetpack Compose für Settings Redesign
|
|
// ═══════════════════════════════════════════════════════════════════════
|
|
implementation(platform(libs.androidx.compose.bom))
|
|
implementation(libs.androidx.compose.ui)
|
|
implementation(libs.androidx.compose.ui.graphics)
|
|
implementation(libs.androidx.compose.ui.tooling.preview)
|
|
implementation(libs.androidx.compose.material3)
|
|
implementation(libs.androidx.compose.material.icons)
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(libs.androidx.navigation.compose)
|
|
implementation(libs.androidx.lifecycle.runtime.compose)
|
|
debugImplementation(libs.androidx.compose.ui.tooling)
|
|
|
|
// Testing (bleiben so)
|
|
testImplementation(libs.junit)
|
|
androidTestImplementation(libs.androidx.junit)
|
|
androidTestImplementation(libs.androidx.espresso.core)
|
|
}
|
|
|
|
// ⚡ v1.3.1: ktlint deaktiviert wegen Parser-Problemen
|
|
// Aktivieren in v1.4.0 wenn Code-Stil bereinigt wurde
|
|
// ktlint {
|
|
// android = true
|
|
// outputToConsole = true
|
|
// ignoreFailures = true
|
|
// enableExperimentalRules = false
|
|
// filter {
|
|
// exclude("**/generated/**")
|
|
// exclude("**/build/**")
|
|
// }
|
|
// }
|
|
|
|
// ⚡ v1.3.1: detekt-Konfiguration
|
|
detekt {
|
|
buildUponDefaultConfig = true
|
|
allRules = false
|
|
config.setFrom(files("$rootDir/config/detekt/detekt.yml"))
|
|
baseline = file("$rootDir/config/detekt/baseline.xml")
|
|
|
|
// Parallel-Verarbeitung für schnellere Checks
|
|
parallel = true
|
|
} |