Files
simplefileupload-android/app/build.gradle
Matt Hills 2c8315cb5d Migrate UI to Jetpack Compose with Material 3 design
- Replace XML layouts with Compose screens for all 5 Activities
- Implement Material 3 theme with Google Blue/Green color scheme matching app icon
- Add device-aware navigation with bottom tabs for Samsung devices
- Remove action bar for modern edge-to-edge UI design
- Update Kotlin to 1.9.22 for Compose Compiler compatibility
- Add Compose dependencies and configure build system
- Implement MainViewModel for upload state management
- Create reusable dialog components for upload parameters and results
- Preserve all existing Java controllers and services (UI-only migration)
2025-12-27 18:47:29 -05:00

120 lines
3.8 KiB
Groovy

plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
}
android {
namespace 'com.mattintech.simplelogupload'
compileSdkVersion 36
defaultConfig {
applicationId "com.mattintech.simplelogupload"
minSdkVersion 30
targetSdkVersion 36
versionCode 2
versionName "25.12.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
// Optional: explicitly specify Java toolchain
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = '1.5.8'
}
}
dependencies {
// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
// Core Android UI
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
// Networking
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'androidx.palette:palette:1.0.0'
// QR Code scanning
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
// Room
def room_version = "2.6.1"
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
// Lifecycle
def lifecycle_version = "2.6.2"
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
// UI Components
implementation "androidx.recyclerview:recyclerview:1.3.2"
implementation "androidx.cardview:cardview:1.0.0"
// Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3"
// Jetpack Compose
def composeBom = platform('androidx.compose:compose-bom:2024.12.01')
implementation composeBom
implementation 'androidx.compose.ui:ui'
implementation 'androidx.compose.ui:ui-tooling-preview'
implementation 'androidx.compose.material3:material3'
implementation 'androidx.compose.material:material-icons-extended'
implementation 'androidx.activity:activity-compose:1.9.3'
implementation 'androidx.navigation:navigation-compose:2.8.5'
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.8.7'
implementation 'androidx.lifecycle:lifecycle-runtime-compose:2.8.7'
implementation 'androidx.compose.runtime:runtime-livedata'
// Compose Debug
debugImplementation 'androidx.compose.ui:ui-tooling'
debugImplementation 'androidx.compose.ui:ui-test-manifest'
// Testing
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
// Kotlin compatibility
constraints {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version") {
because("Merged into kotlin-stdlib")
}
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version") {
because("Merged into kotlin-stdlib")
}
}
}