build.gradle

6.6 KB · raw

1plugins {2    id "com.android.application"3    id "org.jetbrains.kotlin.android"4    id "org.jetbrains.kotlin.plugin.compose"5    id "org.jetbrains.kotlin.plugin.parcelize"6    id "org.jetbrains.kotlin.plugin.serialization"7    id "kotlin-kapt"8    id "com.google.dagger.hilt.android"9}1011android {12    namespace "com.peachpasswords"13    compileSdk 351415    defaultConfig {16        applicationId "com.peachpasswords"17        minSdk 2618        targetSdk 3519        versionCode 23670020        versionName "2.3.67"2122        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"23        vectorDrawables {24            useSupportLibrary true25        }26    }2728    signingConfigs {29        release {30            // Read from local.properties (koh-ignored) so the keystore and its31            // password never enter version history. Absent on a machine without32            // the key -> release build stays unsigned rather than failing.33            def props = new Properties()34            def f = rootProject.file("local.properties")35            if (f.exists()) { f.withInputStream { props.load(it) } }36            if (props.getProperty("peachStoreFile")) {37                storeFile file(props.getProperty("peachStoreFile"))38                storePassword props.getProperty("peachStorePassword")39                keyAlias props.getProperty("peachKeyAlias")40                keyPassword props.getProperty("peachKeyPassword")41            }42        }43    }4445    buildTypes {46        debug {47            applicationIdSuffix ".debug"48            versionNameSuffix "-debug"49            debuggable true50        }51        release {52            signingConfig signingConfigs.release53            minifyEnabled false54            proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"55        }56    }5758    compileOptions {59        sourceCompatibility JavaVersion.VERSION_1760        targetCompatibility JavaVersion.VERSION_1761    }6263    kotlinOptions {64        jvmTarget = "17"65    }6667    buildFeatures {68        compose true69        buildConfig true70    }7172    composeOptions {73        kotlinCompilerExtensionVersion "1.5.15"74    }7576    packaging {77        resources {78            excludes += [79                "/META-INF/{AL2.0,LGPL2.1}",80                "META-INF/DEPENDENCIES",81                "META-INF/LICENSE*",82                "META-INF/NOTICE*",83            ]84        }85    }86}8788dependencies {89    implementation platform("androidx.compose:compose-bom:2024.06.00")90    androidTestImplementation platform("androidx.compose:compose-bom:2024.06.00")9192    implementation "androidx.activity:activity-compose:1.9.2"93    implementation "androidx.autofill:autofill:1.1.0"94    implementation "androidx.biometric:biometric:1.1.0"95    implementation "androidx.core:core-splashscreen:1.0.1"96    implementation "androidx.appcompat:appcompat:1.7.0"97    implementation "androidx.credentials:credentials:1.5.0"98    implementation "androidx.credentials:credentials-play-services-auth:1.5.0"99    implementation "androidx.glance:glance-appwidget:1.1.0"100    implementation "androidx.glance:glance-material3:1.1.0"101    implementation "androidx.hilt:hilt-navigation-compose:1.2.0"102    // In-app updates: a periodic release check that survives Doze without a103    // service. hilt-work lets the worker take UpdateRepository by injection104    // rather than reaching for a global.105    implementation "androidx.hilt:hilt-work:1.2.0"106    kapt "androidx.hilt:hilt-compiler:1.2.0"107    implementation "androidx.work:work-runtime-ktx:2.9.1"108    implementation "androidx.lifecycle:lifecycle-runtime-compose:2.8.4"109    implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.8.4"110    implementation "androidx.lifecycle:lifecycle-process:2.8.4"111    implementation "androidx.navigation:navigation-compose:2.8.0"112    // MN-6: androidx.security:security-crypto has no stable 1.1.x release — the only113    // stable line is 1.0.0 (2021), which lacks the Tink updates and Android 12+ fixes114    // in the 1.1.0 alphas and is widely superseded in production. Deliberately pinned115    // to an exact alpha (never a floating range) so the resolved artifact is116    // reproducible. Revisit if/when 1.1.0 stabilises. Used only for the duress/license117    // EncryptedSharedPreferences; the vault slots are sealed by VaultCrypto, not this.118    implementation "androidx.security:security-crypto:1.1.0-alpha06"119    implementation "androidx.compose.material3:material3"120    implementation "androidx.compose.ui:ui"121    implementation "androidx.compose.ui:ui-tooling-preview"122    implementation "androidx.compose.foundation:foundation"123    implementation "androidx.compose.material:material-icons-extended"124    implementation "androidx.core:core-ktx:1.13.1"125    implementation "com.google.android.material:material:1.12.0"126127    implementation "com.google.dagger:hilt-android:2.51.1"128    kapt "com.google.dagger:hilt-compiler:2.51.1"129    implementation "com.google.zxing:core:3.5.3"130    implementation "androidx.camera:camera-core:1.3.4"131    implementation "androidx.camera:camera-camera2:1.3.4"132    implementation "androidx.camera:camera-lifecycle:1.3.4"133    implementation "androidx.camera:camera-view:1.3.4"134    implementation "com.squareup.okhttp3:okhttp:4.12.0"135    implementation "org.bouncycastle:bcprov-jdk18on:1.78.1"136    // zstd-jni (reference libzstd) — per-section compression for the PeachScript137    // PCHS binary format (MF-2). Required for cross-platform interop with the138    // browser's zstd sections. The @aar variant ships the Android jniLibs139    // (lib/<abi>/libzstd-jni.so); the plain jar bundles only desktop natives and140    // would fail with UnsatisfiedLinkError on-device.141    implementation "com.github.luben:zstd-jni:1.5.6-3@aar"142    // The @aar ships only Android .so; the plain jar carries the desktop natives143    // the host JVM unit tests need.144    testImplementation "com.github.luben:zstd-jni:1.5.6-3"145    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1"146    implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.1"147148    debugImplementation "androidx.compose.ui:ui-tooling"149    debugImplementation "androidx.compose.ui:ui-test-manifest"150151    androidTestImplementation "androidx.test.ext:junit:1.2.1"152    androidTestImplementation "androidx.test.espresso:espresso-core:3.6.1"153    androidTestImplementation "androidx.compose.ui:ui-test-junit4"154155    testImplementation "junit:junit:4.13.2"156    // Real org.json on the unit-test classpath; android.jar's is a throwing stub,157    // so the release-manifest parser would otherwise be untestable off-device.158    testImplementation "org.json:json:20240303"159    testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.8.1"160}