plugins { id 'com.android.application' id 'kotlin-android' id 'kotlin-parcelize' id 'com.google.devtools.ksp' } android { compileSdk 34 productFlavors.configureEach { ext.apkVersionNameSuffix = null } defaultConfig { applicationId "com.github.k1rakishou.kurobaexlite" minSdk 21 targetSdk 34 versionCode 10010 versionName "1.0.10" archivesBaseName = "KurobaExLite" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { useSupportLibrary true } ksp { arg("room.schemaLocation", "$projectDir/schemas".toString()) } } splits { abi { enable true reset() include "armeabi-v7a", "arm64-v8a", "x86", "x86_64" universalApk false } } flavorDimensions "default" productFlavors { // FLAVOR_TYPE 0 - development build // FLAVOR_TYPE 1 - production build development { dimension "default" // Different app ids for different flavors so that the users are able to install both // of them without deleting anything applicationIdSuffix ".dev" apkVersionNameSuffix = "-dev" buildConfigField "int", "FLAVOR_TYPE", "0" // The same as in stable flavor manifestPlaceholders = [ appName : "KurobaExLite-dev", iconLoc : "@mipmap/ic_launcher_dev", fileProviderAuthority: "${defaultConfig.applicationId}${applicationIdSuffix}.fileprovider" ] } production { dimension "default" applicationIdSuffix "" apkVersionNameSuffix = "" buildConfigField "int", "FLAVOR_TYPE", "1" manifestPlaceholders = [ appName : "KurobaExLite", iconLoc : "@mipmap/ic_launcher_release", fileProviderAuthority: "${defaultConfig.applicationId}${applicationIdSuffix}.fileprovider" ] } } buildTypes { release { File propsFile = file('release.properties') if (propsFile.exists()) { Properties props = new Properties() InputStream is = new FileInputStream(propsFile) props.load(is) signingConfigs { release { storeFile file(props['keystoreFile']) storePassword props['keystorePass'] keyAlias props['keyAlias'] keyPassword props['keyPass'] v1SigningEnabled true v2SigningEnabled true enableV3Signing = true enableV4Signing = true } } is.close() signingConfig signingConfigs.release } minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.cfg' debuggable = false } debug { File f = file('debug.properties') if (f.exists()) { Properties props = new Properties() InputStream is = new FileInputStream(f) props.load(is) signingConfigs { debug { storeFile file(props['keystoreFile']) storePassword props['keystorePass'] keyAlias props['keyAlias'] keyPassword props['keyPass'] v1SigningEnabled true v2SigningEnabled true enableV3Signing = true enableV4Signing = true } } is.close() signingConfig signingConfigs.debug } minifyEnabled false debuggable = true } } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = '17' freeCompilerArgs = [ "-Xopt-in=kotlin.Experimental", "-Xopt-in=kotlin.RequiresOptIn", "-Xopt-in=kotlin.ExperimentalStdlibApi", "-Xopt-in=coil.annotation.ExperimentalCoilApi", "-Xcontext-receivers", ] } buildFeatures { compose true } composeOptions { kotlinCompilerExtensionVersion = compose_compiler_version } namespace 'com.github.k1rakishou.kurobaexlite' } dependencies { implementation project(':kpnc') implementation 'androidx.core:core-ktx:1.10.1' implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'com.google.android.material:material:1.9.0' implementation "androidx.compose.ui:ui:$compose_version" implementation "androidx.compose.animation:animation:$compose_version" implementation "androidx.compose.foundation:foundation:$compose_version" implementation "androidx.compose.material:material:$compose_version" implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" implementation "androidx.compose.ui:ui-util:$compose_version" implementation 'androidx.work:work-runtime-ktx:2.8.1' implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1' implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1' implementation 'androidx.activity:activity-compose:1.7.2' implementation "androidx.datastore:datastore-preferences:1.0.0" implementation "androidx.window:window:1.2.0-alpha03" implementation "io.insert-koin:koin-core:$koin_version" implementation "io.insert-koin:koin-android:$koin_version" implementation 'dev.chrisbanes.snapper:snapper:0.3.0' implementation 'com.squareup.logcat:logcat:0.1' implementation "com.squareup.okhttp3:okhttp:${okhttp}" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${kotlin_coroutines_version}" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${kotlin_coroutines_version}" implementation 'org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.5' implementation "io.coil-kt:coil:${coil}" implementation "io.coil-kt:coil-compose:${coil}" implementation "io.coil-kt:coil-video:${coil}" implementation "joda-time:joda-time:${joda_time}" implementation 'org.nibor.autolink:autolink:0.10.0' implementation "org.jsoup:jsoup:${jsoup}" runtimeOnly "org.jetbrains.kotlin:kotlin-reflect:${kotlin_version}" implementation 'com.github.K1rakishou:ComposeCustomTextSelection:8724bc088d' implementation "com.github.K1rakishou:Fuck-Storage-Access-Framework:v1.1.2" implementation "com.squareup.moshi:moshi-kotlin:${moshi}" ksp "com.squareup.moshi:moshi-kotlin-codegen:${moshi}" implementation "androidx.room:room-runtime:${room}" implementation "androidx.room:room-ktx:${room}" ksp "androidx.room:room-compiler:${room}" testImplementation 'junit:junit:4.13.2' testImplementation "io.mockk:mockk:1.13.3" androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" debugImplementation("androidx.compose.ui:ui-test-manifest:$compose_version") testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:${kotlin_coroutines_version}" debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" developmentImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1' }