Implement 10 reusable Jetpack Compose UI components: - ShieldButton: 4 variants (primary/secondary/ghost/danger), 3 sizes, loading state, icon support - ShieldCard: gradient background matching web .gradient-card, click handling, header/footer slots - ShieldTextField: validation, password toggle, error/helper text, focus styling - ShieldBadge: 5 variants (default/success/warning/error/info), pill shape, icon support - ShieldModal: ModalBottomSheet + AlertDialog, swipe-to-dismiss - ShieldToast: Snackbar-based with 4 variants, auto-dismiss, action buttons - ShieldAvatar: Coil async image loading, initials fallback, online status indicator - ShieldProgressBar: linear progress with percentage, 5 color variants - ShieldEmptyState: icon, title, description, action button - ShieldSkeleton: shimmer animation with infinite transition All components use theme tokens (no hardcoded colors) and support light/dark modes. Add Coil dependency for avatar image loading. Add ComponentShowcase preview with light/dark mode support. Add instrumented Compose UI tests for all components.
62 lines
1.9 KiB
Kotlin
62 lines
1.9 KiB
Kotlin
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.compose)
|
|
}
|
|
|
|
android {
|
|
namespace = "com.shieldai.android"
|
|
compileSdk {
|
|
version = release(36) {
|
|
minorApiLevel = 1
|
|
}
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId = "com.shieldai.android"
|
|
minSdk = 26
|
|
targetSdk = 36
|
|
versionCode = 1
|
|
versionName = "1.0"
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(libs.androidx.navigation.compose)
|
|
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.material3.adaptive.navigation.suite)
|
|
implementation(libs.coil.compose)
|
|
testImplementation(libs.junit)
|
|
androidTestImplementation(libs.androidx.junit)
|
|
androidTestImplementation(libs.androidx.espresso.core)
|
|
androidTestImplementation(platform(libs.androidx.compose.bom))
|
|
androidTestImplementation(libs.androidx.compose.ui.test.junit4)
|
|
debugImplementation(libs.androidx.compose.ui.tooling)
|
|
debugImplementation(libs.androidx.compose.ui.test.manifest)
|
|
}
|