diff --git a/build.gradle b/build.gradle index 6e164b29dd..11d739b37b 100644 --- a/build.gradle +++ b/build.gradle @@ -1,19 +1,12 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile -// Top-level build file where you can add configuration options common to all sub-projects/modules. -buildscript { - ext { - compose_compiler_version = '1.5.14' - kotlin_version = '1.9.24' - agp_version = '8.6.0' - } -} plugins { - id 'com.android.application' version "$agp_version" apply false - id 'com.android.library' version "$agp_version" apply false - id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false - id 'com.android.dynamic-feature' version "$agp_version" apply false - id("com.google.devtools.ksp") version "$kotlin_version-1.0.20" apply false + alias libs.plugins.android.application apply false + alias libs.plugins.android.library apply false + alias libs.plugins.android.dynamic.feature apply false + alias libs.plugins.jetbrains.kotlin.android apply false + alias libs.plugins.ksp apply false + alias libs.plugins.compose.compiler apply false //drive //id 'com.google.gms.google-services' version '4.4.0' apply false } @@ -29,42 +22,6 @@ ext { androidSupportTestVersion = "1.6.1" androidxTextExtJunit = "1.2.1" daggerVersion = '2.51.1' - okHttpVersion = "4.12.0" - acraVersion = "5.11.3" - robolectricVersion = '4.13' - roomVersion = "2.6.1" - archLifecycleVersion = '2.8.5' - androidxArchVersion = '2.2.0' - fragmentVersion = "1.8.3" - coroutines = '1.8.1' - mockitoVersion = '5.12.0' - retrofitVersion = '2.11.0' - androidXCoreVersion = "1.13.1" - appcompatVersion = "1.7.0" - picassoVersion = "2.8" - recyclerview = "1.3.2" - materialComponents = "1.12.0" - junitVersion = "4.13.2" - timberVersion = "5.0.1" - assertjVersion = "3.19.0" - assertjVersionAndroid = "2.9.1" - annotations = '1.8.0' - commonsLang = '3.14.0' - commonsText = '1.12.0' - ktor = '2.3.11' - bouncycastle = "1.71" - desugarVersion = '2.0.4' - mlkitTextRecognition = "16.0.1" - truthVersion = '1.4.2' - accompanist = "0.36.0" - requery = "3.36.0" - androidxSqlite = "2.4.0" - barista = "4.3.0" - googleHttp = "1.44.1" - //composeDevBom = "dev.chrisbanes.compose:compose-bom:2024.05.00-alpha02" - composeBom = "androidx.compose:compose-bom:2024.09.00" - activityCompose = "1.9.2" - workManager = "2.9.1" } subprojects { diff --git a/drive/build.gradle b/drive/build.gradle index 2f4b5f4b0f..2f4b26c980 100644 --- a/drive/build.gradle +++ b/drive/build.gradle @@ -21,24 +21,24 @@ android { dependencies { implementation project(":myExpenses") - implementation 'com.evernote:android-state:1.4.1' - kapt 'com.evernote:android-state-processor:1.4.1' + implementation libs.android.state + kapt libs.android.state.processor - implementation 'com.google.android.gms:play-services-auth:21.2.0' - implementation("com.google.http-client:google-http-client-gson:$googleHttp") { + implementation libs.play.services.auth + implementation(libs.google.http.client.gson) { exclude module: 'httpclient' exclude module: 'commons-logging' } - implementation("com.google.http-client:google-http-client-android:$googleHttp") { + implementation(libs.google.http.client.android) { exclude group: 'org.apache.httpcomponents' } - implementation('com.google.api-client:google-api-client-android:2.3.0') { + implementation(libs.google.api.client.android) { exclude group: 'org.apache.httpcomponents' } - implementation('com.google.apis:google-api-services-drive:v3-rev20240123-2.0.0') { + implementation(libs.google.api.services.drive) { exclude group: 'org.apache.httpcomponents' } - kapt "com.google.dagger:dagger-compiler:$daggerVersion" - implementation "com.google.dagger:dagger:$daggerVersion" + kapt libs.dagger.compiler + implementation libs.dagger } \ No newline at end of file diff --git a/dropbox/build.gradle b/dropbox/build.gradle index 4b6e867cad..a570e3a6c6 100644 --- a/dropbox/build.gradle +++ b/dropbox/build.gradle @@ -21,9 +21,9 @@ android { dependencies { implementation project(":myExpenses") implementation project(":jackson") - implementation 'com.evernote:android-state:1.4.1' - kapt 'com.evernote:android-state-processor:1.4.1' + implementation libs.android.state + kapt libs.android.state.processor - implementation 'com.dropbox.core:dropbox-core-sdk:7.0.0' - implementation 'com.dropbox.core:dropbox-android-sdk:7.0.0' + implementation libs.dropbox.core.sdk + implementation libs.dropbox.android.sdk } \ No newline at end of file diff --git a/fints/build.gradle b/fints/build.gradle index 1dacc37d4f..e6aceae207 100644 --- a/fints/build.gradle +++ b/fints/build.gradle @@ -3,6 +3,7 @@ plugins { id 'kotlin-android' id 'kotlin-parcelize' id 'kotlin-kapt' + alias libs.plugins.compose.compiler } android { @@ -24,35 +25,31 @@ android { buildFeatures { compose true } - composeOptions { - kotlinCompilerExtensionVersion compose_compiler_version - } } dependencies { implementation project(':myExpenses') - coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:$desugarVersion" - def composeBom = platform("$composeBom") - implementation composeBom - implementation "androidx.compose.ui:ui" - implementation("androidx.compose.material3:material3") - implementation "androidx.compose.ui:ui-tooling-preview" - debugImplementation "androidx.compose.ui:ui-tooling" - implementation "androidx.activity:activity-compose:$activityCompose" - implementation "androidx.compose.material:material-icons-extended" - implementation "androidx.compose.runtime:runtime-livedata" + coreLibraryDesugaring libs.android.desugar + implementation platform(libs.androidx.compose.bom) + implementation libs.androidx.ui + implementation(libs.androidx.compose.material3) + implementation libs.androidx.ui.tooling.preview + debugImplementation libs.androidx.ui.tooling + implementation libs.androidx.activity.compose + implementation libs.androidx.material.icons.extended + implementation libs.androidx.runtime.livedata - implementation 'com.github.hbci4j:hbci4j-core:3.1.82' - implementation 'xerces:xercesImpl:2.12.2' - implementation "org.apache.commons:commons-lang3:$commonsLang" + implementation libs.hbci4j.core + implementation libs.xercesimpl + implementation libs.commons.lang3 - implementation "androidx.core:core-ktx:$androidXCoreVersion" + implementation libs.androidx.core.ktx - kapt "com.google.dagger:dagger-compiler:$daggerVersion" - implementation "com.google.dagger:dagger:$rootProject.daggerVersion" + kapt libs.dagger.compiler + implementation libs.dagger - testImplementation "junit:junit:4.13.2" - androidTestImplementation "androidx.test.ext:junit:$androidxTextExtJunit" - androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion" - androidTestImplementation "androidx.annotation:annotation:$annotations" + testImplementation libs.junit + androidTestImplementation libs.androidx.junit + androidTestImplementation libs.androidx.espresso.core + androidTestImplementation libs.androidx.annotation } \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000000..61d7689201 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,268 @@ +[versions] +accompanist = "0.36.0" +acraVersion = "5.11.3" +activityCompose = "1.9.2" +androidDesugar = "2.1.2" +androidGradlePlugin = "8.6.0" +androidImageCropper = "96a06733f3" +androidSupportTestVersion = "1.6.1" +androidxArchVersion = "2.2.0" +androidxCollection = "1.4.0" +androidXCoreVersion = "1.13.1" +androidxSqlite = "2.4.0" +androidxTextExtJunit = "1.2.1" +annotation = "1.8.2" +appcompatVersion = "1.7.0" +arrowCore = "1.2.4" +assertjVersion = "3.19.0" +assertjVersionAndroid = "2.9.1" +autoValue = "1.11.0" +autoValueCursor = "2.0.1" +autoValueGson = "1.3.1" +autoValueParcel = "0.2.9" +barista = "4.3.0" +bouncycastle = "1.71" +browser = "1.8.0" +caldroid = "377d10a2a2" +cardview = "1.0.0" +circleprogress = "1.2.1" +commonsCollections4 = "4.4" +commonsCsv = "1.11.0" +commonsLang = "3.14.0" +commonsText = "1.12.0" +constraintlayout = "2.1.4" +copperFlow = "1.0.0" +coreRemoteviews = "1.1.0" +coroutines = "1.8.1" +dav4android = "2c26db1e24" +dropbox = "7.0.0" +easypermissionsKtx = "7ab6997271" +emailIntentBuilder = "2.0.0" +espressoVersion = "3.6.1" +evernote = "1.4.1" +composeBom = "2024.09.01" +dagger = "2.51.1" +datastorePreferences = "1.1.1" +donutCompose = "2.2.3" +flexbox = "3.0.0" +fontdrawable = "39e8f63ce2" +fragmentVersion = "1.8.3" +googleApiClientAndroid = "2.3.0" +googleApiServicesDrive = "v3-rev20240123-2.0.0" +googleHttpClient = "1.44.1" +gridlayout = "1.0.0" +gson = "2.11.0" +guava = "33.2.1-android" +hbci4jCore = "3.1.82" +itextpdf = "5.5.13.3" +jacksonCore = "2.17.1" +junitparams = "1.1.1" +junitVersion = "4.13.2" +kotlin = "2.0.20" +kotlinxHtml = "0.11.0" +ksp = "2.0.20-1.0.24" +sealed-enum = "0.7.0" +ktor = "2.3.11" +legacySupportV4 = "1.0.0" +lifecycleExtensions = "2.2.0" +lifecycleRuntimeKtx = "2.8.5" +logbackAndroid = "3.0.0" +materialComponents = "1.12.0" +microsoftGraph = "5.80.0" +mockitoKotlin = "4.0.0" +mockitoVersion = "5.12.0" +mpandroidchart = "47240bb94c" +msal = "5.1.0" +okHttpVersion = "4.12.0" +orchestrator = "1.5.0" +pageindicatorview = "b1bad589b5" +pagingCompose = "3.3.2" +phrase = "1.2.0" +picassoVersion = "2.8" +playServicesAuth = "21.2.0" +playServicesMlkitTextRecognitionCommon = "19.1.0" +recyclerview = "1.3.2" +relinker = "1.4.4" +requery = "3.36.0" +retrofitVersion = "2.11.0" +robolectricVersion = "4.13" +roomVersion = "2.6.1" +runner = "1.6.2" +runtime = "0.7.0" +screengrab = "2.1.1" +securityCrypto = "1.1.0-alpha06" +simpledialogfragments = "09a642bc42" +slf4jApi = "2.0.13" +snakeyaml = "2.2" +sqlcipher = "4.5.4" +taptargetview = "1.13.3" +tesseract4androidOpenmp = "4.7.0" +mlkitTextRecognition = "16.0.1" +mlkitTextRecognitionBundledCommon = "17.0.0" +timberVersion = "5.0.1" +truthVersion = "1.4.2" +workManager = "2.9.1" +xercesimpl = "2.12.2" + +[libraries] +accompanist-drawablepainter = { module = "com.google.accompanist:accompanist-drawablepainter", version.ref = "accompanist" } +accompanist-themeadapter-material3 = { module = "com.google.accompanist:accompanist-themeadapter-material3", version.ref = "accompanist" } +acra-core = { module = "ch.acra:acra-core", version.ref = "acraVersion" } +acra-dialog = { module = "ch.acra:acra-dialog", version.ref = "acraVersion" } +acra-mail = { module = "ch.acra:acra-mail", version.ref = "acraVersion" } +android-database-sqlcipher = { module = "net.zetetic:android-database-sqlcipher", version.ref = "sqlcipher" } +android-image-cropper = { module = "com.github.mtotschnig:Android-Image-Cropper", version.ref = "androidImageCropper" } +android-state = { module = "com.evernote:android-state", version.ref = "evernote" } +android-state-processor = { module = "com.evernote:android-state-processor", version.ref = "evernote" } +androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" } +androidx-annotation = { module = "androidx.annotation:annotation", version.ref = "annotation" } +androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompatVersion" } +androidx-browser = { module = "androidx.browser:browser", version.ref = "browser" } +androidx-cardview = { module = "androidx.cardview:cardview", version.ref = "cardview" } +androidx-collection = { module = "androidx.collection:collection", version.ref = "androidxCollection" } +androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "composeBom" } +androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" } +androidx-test-core = { module = "androidx.test:core", version.ref = "androidSupportTestVersion" } +androidx-core = { module = "androidx.core:core", version.ref = "androidXCoreVersion" } +androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidXCoreVersion" } +androidx-core-remoteviews = { module = "androidx.core:core-remoteviews", version.ref = "coreRemoteviews" } +androidx-core-testing = { module = "androidx.arch.core:core-testing", version.ref = "androidxArchVersion" } +androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastorePreferences" } +android-desugar = { module = "com.android.tools:desugar_jdk_libs", version.ref = "androidDesugar" } +androidx-espresso-contrib = { module = "androidx.test.espresso:espresso-contrib", version.ref = "espressoVersion" } +androidx-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoVersion" } +androidx-espresso-idling-resource = { module = "androidx.test.espresso:espresso-idling-resource", version.ref = "espressoVersion" } +androidx-espresso-intents = { module = "androidx.test.espresso:espresso-intents", version.ref = "espressoVersion" } +androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "fragmentVersion" } +androidx-fragment-testing = { module = "androidx.fragment:fragment-testing", version.ref = "fragmentVersion" } +androidx-fragment-testing-manifest = { module = "androidx.fragment:fragment-testing-manifest", version.ref = "fragmentVersion" } +androidx-gridlayout = { module = "androidx.gridlayout:gridlayout", version.ref = "gridlayout" } +androidx-junit = { module = "androidx.test.ext:junit", version.ref = "androidxTextExtJunit" } +androidx-legacy-support-v4 = { module = "androidx.legacy:legacy-support-v4", version.ref = "legacySupportV4" } +androidx-lifecycle-common-java8 = { module = "androidx.lifecycle:lifecycle-common-java8", version.ref = "lifecycleRuntimeKtx" } +androidx-lifecycle-extensions = { module = "androidx.lifecycle:lifecycle-extensions", version.ref = "lifecycleExtensions" } +androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycleRuntimeKtx" } +androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "lifecycleRuntimeKtx" } +androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" } +androidx-lifecycle-service = { module = "androidx.lifecycle:lifecycle-service", version.ref = "lifecycleRuntimeKtx" } +androidx-lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycleRuntimeKtx" } +androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleRuntimeKtx" } +androidx-material-icons-extended = { module = "androidx.compose.material:material-icons-extended" } +androidx-compose-material3 = { module = "androidx.compose.material3:material3" } +androidx-orchestrator = { module = "androidx.test:orchestrator", version.ref = "orchestrator" } +androidx-paging-compose = { module = "androidx.paging:paging-compose", version.ref = "pagingCompose" } +androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" } +androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "roomVersion" } +androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "roomVersion" } +androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "roomVersion" } +androidx-room-testing = { module = "androidx.room:room-testing", version.ref = "roomVersion" } +androidx-rules = { module = "androidx.test:rules", version.ref = "androidSupportTestVersion" } +androidx-runner = { module = "androidx.test:runner", version.ref = "runner" } +androidx-runtime-livedata = { module = "androidx.compose.runtime:runtime-livedata" } +androidx-security-crypto = { module = "androidx.security:security-crypto", version.ref = "securityCrypto" } +androidx-sqlite-ktx = { module = "androidx.sqlite:sqlite-ktx", version.ref = "androidxSqlite" } +androidx-ui = { module = "androidx.compose.ui:ui" } +androidx-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4" } +androidx-ui-tooling = { module = "androidx.compose.ui:ui-tooling" } +androidx-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" } +androidx-work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "workManager" } +androidx-work-testing = { module = "androidx.work:work-testing", version.ref = "workManager" } +arrow-core = { module = "io.arrow-kt:arrow-core", version.ref = "arrowCore" } +assertj-core = { module = "org.assertj:assertj-core", version.ref = "assertjVersionAndroid" } +assertj-core-v3190 = { module = "org.assertj:assertj-core", version.ref = "assertjVersion" } +auto-value = { module = "com.google.auto.value:auto-value", version.ref = "autoValue" } +auto-value-annotations = { module = "com.google.auto.value:auto-value-annotations", version.ref = "autoValue" } +auto-value-cursor = { module = "com.gabrielittner.auto.value:auto-value-cursor", version.ref = "autoValueCursor" } +auto-value-cursor-annotations = { module = "com.gabrielittner.auto.value:auto-value-cursor-annotations", version.ref = "autoValueCursor" } +auto-value-gson = { module = "com.ryanharter.auto.value:auto-value-gson", version.ref = "autoValueGson" } +auto-value-gson-runtime = { module = "com.ryanharter.auto.value:auto-value-gson-runtime", version.ref = "autoValueGson" } +auto-value-parcel = { module = "com.ryanharter.auto.value:auto-value-parcel", version.ref = "autoValueParcel" } +barista = { module = "com.adevinta.android:barista", version.ref = "barista" } +bcpkix-jdk18on = { module = "org.bouncycastle:bcpkix-jdk18on", version.ref = "bouncycastle" } +bcprov-jdk18on = { module = "org.bouncycastle:bcprov-jdk18on", version.ref = "bouncycastle" } +caldroid = { module = "com.github.mtotschnig:Caldroid", version.ref = "caldroid" } +circleprogress = { module = "com.github.lzyzsd:circleprogress", version.ref = "circleprogress" } +commons-collections4 = { module = "org.apache.commons:commons-collections4", version.ref = "commonsCollections4" } +commons-csv = { module = "org.apache.commons:commons-csv", version.ref = "commonsCsv" } +commons-lang3 = { module = "org.apache.commons:commons-lang3", version.ref = "commonsLang" } +commons-text = { module = "org.apache.commons:commons-text", version.ref = "commonsText" } +converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofitVersion" } +copper-flow = { module = "app.cash.copper:copper-flow", version.ref = "copperFlow" } +dagger = { module = "com.google.dagger:dagger", version.ref = "dagger" } +dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "dagger" } +dav4android = { module = "com.gitlab.mtotschn:dav4android", version.ref = "dav4android" } +donut-compose = { module = "app.futured.donut:donut-compose", version.ref = "donutCompose" } +dropbox-android-sdk = { module = "com.dropbox.core:dropbox-android-sdk", version.ref = "dropbox" } +dropbox-core-sdk = { module = "com.dropbox.core:dropbox-core-sdk", version.ref = "dropbox" } +easypermissions-ktx = { module = "com.github.mtotschnig:easypermissions-ktx", version.ref = "easypermissionsKtx" } +email-intent-builder = { module = "de.cketti.mailto:email-intent-builder", version.ref = "emailIntentBuilder" } +flexbox = { module = "com.google.android.flexbox:flexbox", version.ref = "flexbox" } +fontdrawable = { module = "com.github.mtotschnig:FontDrawable", version.ref = "fontdrawable" } +google-api-client-android = { module = "com.google.api-client:google-api-client-android", version.ref = "googleApiClientAndroid" } +google-api-services-drive = { module = "com.google.apis:google-api-services-drive", version.ref = "googleApiServicesDrive" } +google-http-client-android = { module = "com.google.http-client:google-http-client-android", version.ref = "googleHttpClient" } +google-http-client-gson = { module = "com.google.http-client:google-http-client-gson", version.ref = "googleHttpClient" } +gson = { module = "com.google.code.gson:gson", version.ref = "gson" } +guava = { module = "com.google.guava:guava", version.ref = "guava" } +hbci4j-core = { module = "com.github.hbci4j:hbci4j-core", version.ref = "hbci4jCore" } +itextpdf = { module = "com.itextpdf:itextpdf", version.ref = "itextpdf" } +jackson-core = { module = "com.fasterxml.jackson.core:jackson-core", version.ref = "jacksonCore" } +junit = { module = "junit:junit", version.ref = "junitVersion" } +junitparams = { module = "pl.pragmatists:JUnitParams", version.ref = "junitparams" } +kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" } +kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" } +kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" } +kotlinx-html = { module = "org.jetbrains.kotlinx:kotlinx-html", version.ref = "kotlinxHtml" } +sealed-enum = { module = "com.github.livefront.sealed-enum:ksp", version.ref = "sealed-enum" } +ktor-network-tls-certificates = { module = "io.ktor:ktor-network-tls-certificates", version.ref = "ktor" } +ktor-serialization-gson = { module = "io.ktor:ktor-serialization-gson", version.ref = "ktor" } +ktor-server-auth = { module = "io.ktor:ktor-server-auth", version.ref = "ktor" } +ktor-server-cio = { module = "io.ktor:ktor-server-cio", version.ref = "ktor" } +ktor-server-content-negotiation = { module = "io.ktor:ktor-server-content-negotiation", version.ref = "ktor" } +ktor-server-core = { module = "io.ktor:ktor-server-core", version.ref = "ktor" } +ktor-server-netty = { module = "io.ktor:ktor-server-netty", version.ref = "ktor" } +ktor-server-status-pages = { module = "io.ktor:ktor-server-status-pages", version.ref = "ktor" } +logback-android = { module = "com.github.tony19:logback-android", version.ref = "logbackAndroid" } +logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okHttpVersion" } +material = { module = "com.google.android.material:material", version.ref = "materialComponents" } +microsoft-graph = { module = "com.microsoft.graph:microsoft-graph", version.ref = "microsoftGraph" } +mockito-android = { module = "org.mockito:mockito-android", version.ref = "mockitoVersion" } +mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockitoVersion" } +mockito-kotlin = { module = "org.mockito.kotlin:mockito-kotlin", version.ref = "mockitoKotlin" } +mpandroidchart = { module = "com.github.mtotschnig:MPAndroidChart", version.ref = "mpandroidchart" } +msal = { module = "com.microsoft.identity.client:msal", version.ref = "msal" } +okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okHttpVersion" } +pageindicatorview = { module = "com.github.romandanylyk:PageIndicatorView", version.ref = "pageindicatorview" } +phrase = { module = "com.squareup.phrase:phrase", version.ref = "phrase" } +picasso = { module = "com.squareup.picasso:picasso", version.ref = "picassoVersion" } +play-services-auth = { module = "com.google.android.gms:play-services-auth", version.ref = "playServicesAuth" } +play-services-mlkit-text-recognition-common = { module = "com.google.android.gms:play-services-mlkit-text-recognition-common", version.ref = "playServicesMlkitTextRecognitionCommon" } +relinker = { module = "com.getkeepsafe.relinker:relinker", version.ref = "relinker" } +retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofitVersion" } +robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectricVersion" } +runtime = { module = "com.github.livefront.sealed-enum:runtime", version.ref = "runtime" } +screengrab = { module = "tools.fastlane:screengrab", version.ref = "screengrab" } +simpledialogfragments = { module = "com.github.eltos:SimpleDialogFragments", version.ref = "simpledialogfragments" } +slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4jApi" } +snakeyaml = { module = "org.yaml:snakeyaml", version.ref = "snakeyaml" } +sqlite-android = { module = "com.github.requery:sqlite-android", version.ref = "requery" } +taptargetview = { module = "com.getkeepsafe.taptargetview:taptargetview", version.ref = "taptargetview" } +tesseract4android-openmp = { module = "cz.adaptech.tesseract4android:tesseract4android-openmp", version.ref = "tesseract4androidOpenmp" } +text-recognition = { module = "com.google.mlkit:text-recognition", version.ref = "mlkitTextRecognition" } +text-recognition-bundled-common = { module = "com.google.mlkit:text-recognition-bundled-common", version.ref = "mlkitTextRecognitionBundledCommon" } +text-recognition-chinese = { module = "com.google.mlkit:text-recognition-chinese", version.ref = "mlkitTextRecognition" } +text-recognition-devanagari = { module = "com.google.mlkit:text-recognition-devanagari", version.ref = "mlkitTextRecognition" } +text-recognition-japanese = { module = "com.google.mlkit:text-recognition-japanese", version.ref = "mlkitTextRecognition" } +text-recognition-korean = { module = "com.google.mlkit:text-recognition-korean", version.ref = "mlkitTextRecognition" } +timber = { module = "com.jakewharton.timber:timber", version.ref = "timberVersion" } +truth = { module = "com.google.truth:truth", version.ref = "truthVersion" } +ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4" } +xercesimpl = { module = "xerces:xercesImpl", version.ref = "xercesimpl" } + +[plugins] +android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" } +android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" } +android-dynamic-feature = { id = "com.android.dynamic-feature", version.ref = "androidGradlePlugin" } +jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } +compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } \ No newline at end of file diff --git a/jackson/build.gradle b/jackson/build.gradle index d5c78525c1..499300f780 100644 --- a/jackson/build.gradle +++ b/jackson/build.gradle @@ -14,5 +14,5 @@ android { dependencies { implementation project(":myExpenses") - implementation 'com.fasterxml.jackson.core:jackson-core:2.17.1' + implementation libs.jackson.core } \ No newline at end of file diff --git a/mlkit/build.gradle b/mlkit/build.gradle index 62a70336e9..f31170ec70 100644 --- a/mlkit/build.gradle +++ b/mlkit/build.gradle @@ -20,12 +20,12 @@ android { dependencies { api project(":ocr") - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines" - testImplementation "junit:junit:$junitVersion" - androidTestImplementation "androidx.test.ext:junit:$androidxTextExtJunit" - androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion" - androidTestImplementation "androidx.annotation:annotation:$annotations" - api 'com.google.android.gms:play-services-mlkit-text-recognition-common:19.1.0' - api "com.google.mlkit:text-recognition-bundled-common:17.0.0" - implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" + implementation libs.kotlinx.coroutines.android + testImplementation libs.junit + androidTestImplementation libs.androidx.junit + androidTestImplementation libs.androidx.espresso.core + androidTestImplementation libs.androidx.annotation + api libs.play.services.mlkit.text.recognition.common + api libs.text.recognition.bundled.common + implementation libs.kotlin.reflect } \ No newline at end of file diff --git a/mlkit_deva/build.gradle b/mlkit_deva/build.gradle index 3a31980223..15c019a1a1 100644 --- a/mlkit_deva/build.gradle +++ b/mlkit_deva/build.gradle @@ -19,5 +19,5 @@ android { dependencies { implementation project(":mlkit") - implementation "com.google.mlkit:text-recognition-devanagari:$mlkitTextRecognition" + implementation libs.text.recognition.devanagari } \ No newline at end of file diff --git a/mlkit_han/build.gradle b/mlkit_han/build.gradle index b85cccee0b..43740a24d5 100644 --- a/mlkit_han/build.gradle +++ b/mlkit_han/build.gradle @@ -19,5 +19,5 @@ android { dependencies { implementation project(":mlkit") - implementation "com.google.mlkit:text-recognition-chinese:$mlkitTextRecognition" + implementation libs.text.recognition.chinese } \ No newline at end of file diff --git a/mlkit_jpan/build.gradle b/mlkit_jpan/build.gradle index 58f7d75937..059dec78b2 100644 --- a/mlkit_jpan/build.gradle +++ b/mlkit_jpan/build.gradle @@ -19,5 +19,5 @@ android { dependencies { implementation project(":mlkit") - implementation "com.google.mlkit:text-recognition-japanese:$mlkitTextRecognition" + implementation libs.text.recognition.japanese } \ No newline at end of file diff --git a/mlkit_kore/build.gradle b/mlkit_kore/build.gradle index a19e28c56e..992ff61b67 100644 --- a/mlkit_kore/build.gradle +++ b/mlkit_kore/build.gradle @@ -19,5 +19,5 @@ android { dependencies { implementation project(":mlkit") - implementation "com.google.mlkit:text-recognition-korean:$mlkitTextRecognition" + implementation libs.text.recognition.korean } \ No newline at end of file diff --git a/mlkit_latn/build.gradle b/mlkit_latn/build.gradle index 884474b010..b0020f9122 100644 --- a/mlkit_latn/build.gradle +++ b/mlkit_latn/build.gradle @@ -19,5 +19,5 @@ android { dependencies { implementation project(":mlkit") - implementation "com.google.mlkit:text-recognition:$mlkitTextRecognition" + implementation libs.text.recognition } \ No newline at end of file diff --git a/myExpenses/build.gradle b/myExpenses/build.gradle index 4910384bbc..46fcf8b5e3 100644 --- a/myExpenses/build.gradle +++ b/myExpenses/build.gradle @@ -15,7 +15,7 @@ plugins { id 'kotlin-parcelize' id 'kotlin-kapt' id 'com.google.devtools.ksp' - + alias libs.plugins.compose.compiler } def getPropertyIfDefined(property, defaultValue) { @@ -132,10 +132,6 @@ android { //drive for Sync with Google Drive dynamicFeatures = [':ocr', ':webui', ':dropbox', ':webdav', ':sqlcrypt', ':fints', ':onedrive', ':jackson'] - composeOptions { - kotlinCompilerExtensionVersion compose_compiler_version - } - lint { abortOnError true checkDependencies true @@ -163,191 +159,190 @@ dependencies { //LeakCanary leads to failure of Screengrab's LocaleUtil: //https://github.com/fastlane/fastlane/issues/19521#issuecomment-1170017435 //debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.10' - api("androidx.datastore:datastore-preferences:1.1.1") - coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:$desugarVersion" + api(libs.androidx.datastore.preferences) + coreLibraryDesugaring libs.android.desugar implementation project(':transactionscontract') - implementation 'com.squareup.phrase:phrase:1.2.0' - def composeBom = platform("$composeBom") - implementation composeBom - implementation "androidx.compose.ui:ui" - implementation("androidx.compose.material3:material3") - implementation "androidx.compose.ui:ui-tooling-preview" - implementation "androidx.activity:activity-compose:$activityCompose" - implementation "androidx.compose.runtime:runtime-livedata" - debugImplementation "androidx.compose.ui:ui-tooling" - implementation "androidx.compose.material:material-icons-extended" - implementation "androidx.paging:paging-compose:3.3.2" - implementation "com.google.accompanist:accompanist-drawablepainter:$accompanist" - implementation "com.google.accompanist:accompanist-themeadapter-material3:$accompanist" - implementation('app.futured.donut:donut-compose:2.2.3') - - kapt "com.google.dagger:dagger-compiler:$daggerVersion" - implementation "com.google.dagger:dagger:$daggerVersion" - implementation 'com.evernote:android-state:1.4.1' - kapt 'com.evernote:android-state-processor:1.4.1' - implementation 'com.google.code.gson:gson:2.11.0' - - api 'com.google.auto.value:auto-value-annotations:1.11.0' - kapt 'com.google.auto.value:auto-value:1.11.0' - - kapt 'com.ryanharter.auto.value:auto-value-gson:1.3.1' - api 'com.ryanharter.auto.value:auto-value-gson-runtime:1.3.1' - - kapt 'com.gabrielittner.auto.value:auto-value-cursor:2.0.1' - implementation 'com.gabrielittner.auto.value:auto-value-cursor-annotations:2.0.1' - - kapt 'com.ryanharter.auto.value:auto-value-parcel:0.2.9' + implementation libs.phrase + implementation platform(libs.androidx.compose.bom) + implementation libs.androidx.ui + implementation(libs.androidx.compose.material3) + implementation libs.androidx.ui.tooling.preview + implementation libs.androidx.activity.compose + implementation libs.androidx.runtime.livedata + debugImplementation libs.androidx.ui.tooling + implementation libs.androidx.material.icons.extended + implementation libs.androidx.paging.compose + implementation libs.accompanist.drawablepainter + implementation libs.accompanist.themeadapter.material3 + implementation(libs.donut.compose) + + kapt libs.dagger.compiler + implementation libs.dagger + implementation libs.android.state + kapt libs.android.state.processor + implementation libs.gson + + api libs.auto.value.annotations + kapt libs.auto.value + + kapt libs.auto.value.gson + api libs.auto.value.gson.runtime + + kapt libs.auto.value.cursor + implementation libs.auto.value.cursor.annotations + + kapt libs.auto.value.parcel implementation project(':PlayLicensingOrig') - implementation 'com.itextpdf:itextpdf:5.5.13.3' - api "ch.acra:acra-core:$acraVersion" - implementation "ch.acra:acra-mail:$acraVersion" - implementation "ch.acra:acra-dialog:$acraVersion" - implementation "org.apache.commons:commons-lang3:$commonsLang" - implementation 'org.apache.commons:commons-csv:1.11.0' - api "org.apache.commons:commons-text:$commonsText" + implementation libs.itextpdf + api libs.acra.core + implementation libs.acra.mail + implementation libs.acra.dialog + implementation libs.commons.lang3 + implementation libs.commons.csv + api libs.commons.text //noinspection GradleDependency - api "com.squareup.picasso:picasso:$picassoVersion" - implementation 'com.github.mtotschnig:MPAndroidChart:47240bb94c' - implementation 'com.github.mtotschnig:Caldroid:377d10a2a2' - api 'com.github.eltos:SimpleDialogFragments:09a642bc42' + api libs.picasso + implementation libs.mpandroidchart + implementation libs.caldroid + api libs.simpledialogfragments - implementation 'com.getkeepsafe.taptargetview:taptargetview:1.13.3' + implementation libs.taptargetview - implementation 'org.apache.commons:commons-collections4:4.4' + implementation libs.commons.collections4 - api "com.jakewharton.timber:timber:$timberVersion" + api libs.timber - implementation 'org.slf4j:slf4j-api:2.0.13' - implementation 'com.github.tony19:logback-android:3.0.0' + implementation libs.slf4j.api + implementation libs.logback.android - implementation "androidx.appcompat:appcompat:$appcompatVersion" - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation "androidx.recyclerview:recyclerview:$recyclerview" - implementation 'androidx.cardview:cardview:1.0.0' + implementation libs.androidx.appcompat + implementation libs.androidx.legacy.support.v4 + implementation libs.androidx.recyclerview + implementation libs.androidx.cardview - api "com.google.android.material:material:$materialComponents" + api libs.material - implementation 'androidx.gridlayout:gridlayout:1.0.0' + implementation libs.androidx.gridlayout api project(':preferences') - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + implementation libs.androidx.constraintlayout - implementation 'com.google.android.flexbox:flexbox:3.0.0' + implementation libs.flexbox implementation project(path: ':setupwizard') //licence validation - implementation "com.squareup.retrofit2:retrofit:$retrofitVersion" - implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion" - implementation "com.squareup.okhttp3:logging-interceptor:$okHttpVersion" + implementation libs.retrofit + implementation libs.converter.gson + implementation libs.logging.interceptor - implementation 'com.github.lzyzsd:circleprogress:1.2.1' + implementation libs.circleprogress - implementation 'app.cash.copper:copper-flow:1.0.0' + implementation libs.copper.flow //https://github.com/romandanylyk/PageIndicatorView/issues/141 - implementation 'com.github.romandanylyk:PageIndicatorView:b1bad589b5' + implementation libs.pageindicatorview - implementation "androidx.sqlite:sqlite-ktx:$androidxSqlite" + implementation libs.androidx.sqlite.ktx // dynamic feature module compilation fails with //Cannot access 'com.vmadalin.easypermissions.EasyPermissions.PermissionCallbacks' which is a supertype of 'org.totschnig.myexpenses.activity.BaseActivity' - api "com.github.mtotschnig:easypermissions-ktx:7ab6997271" + api libs.easypermissions.ktx - implementation('org.jetbrains.kotlinx:kotlinx-html:0.11.0') - implementation('io.arrow-kt:arrow-core:1.2.4') + implementation(libs.kotlinx.html) + implementation(libs.arrow.core) - implementation 'com.github.mtotschnig:FontDrawable:39e8f63ce2' + implementation libs.fontdrawable // Room components - implementation "androidx.room:room-runtime:$roomVersion" - implementation "androidx.room:room-ktx:$roomVersion" - ksp "androidx.room:room-compiler:$roomVersion" + implementation libs.androidx.room.runtime + implementation libs.androidx.room.ktx + ksp libs.androidx.room.compiler - implementation "com.github.requery:sqlite-android:$requery" + implementation libs.sqlite.android // Lifecycle components - implementation "androidx.lifecycle:lifecycle-runtime-ktx:$archLifecycleVersion" - implementation "androidx.lifecycle:lifecycle-common-java8:$archLifecycleVersion" - implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$archLifecycleVersion" - implementation("androidx.lifecycle:lifecycle-runtime-compose:$archLifecycleVersion") + implementation libs.androidx.lifecycle.runtime.ktx + implementation libs.androidx.lifecycle.common.java8 + implementation libs.androidx.lifecycle.viewmodel.compose + implementation(libs.androidx.lifecycle.runtime.compose) // ViewModel Kotlin support - implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$archLifecycleVersion" - implementation "androidx.lifecycle:lifecycle-livedata-ktx:$archLifecycleVersion" - implementation "androidx.lifecycle:lifecycle-extensions:2.2.0" + implementation libs.androidx.lifecycle.viewmodel.ktx + implementation libs.androidx.lifecycle.livedata.ktx + implementation libs.androidx.lifecycle.extensions - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines" + implementation libs.kotlinx.coroutines.android //implementation "androidx.activity:activity-ktx:$activity_version" - implementation "androidx.fragment:fragment-ktx:$fragmentVersion" + implementation libs.androidx.fragment.ktx //Mlkit / Drive //implementation "com.google.android.gms:play-services-base:18.4.0" //implementation "com.google.mlkit:vision-interfaces:+" - implementation("com.google.guava:guava:33.2.1-android") + implementation(libs.guava) - implementation 'com.github.mtotschnig:Android-Image-Cropper:96a06733f3' - api "androidx.core:core-ktx:$androidXCoreVersion" - implementation "androidx.core:core-remoteviews:1.1.0" - implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" + implementation libs.android.image.cropper + api libs.androidx.core.ktx + implementation libs.androidx.core.remoteviews + implementation libs.kotlin.reflect - implementation "androidx.work:work-runtime-ktx:$workManager" + implementation libs.androidx.work.runtime.ktx - implementation 'de.cketti.mailto:email-intent-builder:2.0.0' + implementation libs.email.intent.builder - implementation 'androidx.browser:browser:1.8.0' + implementation libs.androidx.browser - implementation("com.github.livefront.sealed-enum:runtime:0.7.0") - ksp("com.github.livefront.sealed-enum:ksp:0.7.0") + implementation(libs.runtime) + ksp(libs.sealed.enum) - implementation 'androidx.security:security-crypto:1.1.0-alpha06' + implementation libs.androidx.security.crypto - debugImplementation("androidx.fragment:fragment-testing-manifest:$fragmentVersion") - testImplementation("androidx.fragment:fragment-testing:$fragmentVersion") - androidTestImplementation("androidx.fragment:fragment-testing:$fragmentVersion") - androidTestImplementation composeBom - androidTestImplementation 'tools.fastlane:screengrab:2.1.1' - androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion" - debugImplementation "androidx.test.espresso:espresso-idling-resource:$espressoVersion" - androidTestImplementation "androidx.test.ext:junit:$androidxTextExtJunit" - androidTestImplementation "androidx.test:runner:1.6.2" - androidTestUtil "androidx.test:orchestrator:1.5.0" - androidTestImplementation "androidx.test:rules:$androidSupportTestVersion" - androidTestImplementation "androidx.test.espresso:espresso-intents:$espressoVersion" - androidTestImplementation("androidx.test.espresso:espresso-contrib:$espressoVersion") + debugImplementation(libs.androidx.fragment.testing.manifest) + testImplementation(libs.androidx.fragment.testing) + androidTestImplementation(libs.androidx.fragment.testing) + androidTestImplementation platform(libs.androidx.compose.bom) + androidTestImplementation libs.screengrab + androidTestImplementation libs.androidx.espresso.core + debugImplementation libs.androidx.espresso.idling.resource + androidTestImplementation libs.androidx.junit + androidTestImplementation libs.androidx.runner + androidTestUtil libs.androidx.orchestrator + androidTestImplementation libs.androidx.rules + androidTestImplementation libs.androidx.espresso.intents + androidTestImplementation(libs.androidx.espresso.contrib) //androidTestImplementation "androidx.test.espresso.idling:idling-concurrent:$espressoVersion" - androidTestImplementation "org.mockito:mockito-android:$mockitoVersion" - androidTestImplementation("com.adevinta.android:barista:$barista") { + androidTestImplementation libs.mockito.android + androidTestImplementation(libs.barista) { exclude group: 'org.jetbrains.kotlin' // Only if you already use Kotlin in your project } - androidTestImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version" - androidTestImplementation "androidx.room:room-testing:$roomVersion" - androidTestImplementation "androidx.compose.ui:ui-test-junit4" + androidTestImplementation libs.kotlin.test.junit + androidTestImplementation libs.androidx.room.testing + androidTestImplementation libs.androidx.ui.test.junit4 //noinspection GradleDependency - androidTestImplementation "org.assertj:assertj-core:$assertjVersionAndroid" - androidTestImplementation "com.google.truth:truth:$truthVersion" - androidTestImplementation "androidx.arch.core:core-testing:$androidxArchVersion" + androidTestImplementation libs.assertj.core + androidTestImplementation libs.truth + androidTestImplementation libs.androidx.core.testing androidTestImplementation(project(":shared-test")) - testImplementation("com.adevinta.android:barista:$barista") { + testImplementation(libs.barista) { exclude group: 'org.jetbrains.kotlin' // Only if you already use Kotlin in your project } - testImplementation "androidx.compose.ui:ui-test-junit4" - testImplementation "junit:junit:$junitVersion" - testImplementation 'pl.pragmatists:JUnitParams:1.1.1' - testImplementation "org.mockito:mockito-core:$mockitoVersion" - testImplementation "org.mockito.kotlin:mockito-kotlin:4.0.0" - testImplementation "org.robolectric:robolectric:$robolectricVersion" - testImplementation "androidx.test:core:$androidSupportTestVersion" - testImplementation "org.assertj:assertj-core:$assertjVersion" - testImplementation "com.google.truth:truth:$truthVersion" - testImplementation "androidx.test.espresso:espresso-core:$espressoVersion" - testImplementation "androidx.test:rules:$androidSupportTestVersion" - testImplementation "androidx.test.ext:junit:$androidxTextExtJunit" + testImplementation libs.ui.test.junit4 + testImplementation libs.junit + testImplementation libs.junitparams + testImplementation libs.mockito.core + testImplementation libs.mockito.kotlin + testImplementation libs.robolectric + testImplementation libs.androidx.test.core + testImplementation libs.assertj.core.v3190 + testImplementation libs.truth + testImplementation libs.androidx.espresso.core + testImplementation libs.androidx.rules + testImplementation libs.androidx.junit testImplementation(project(":shared-test")) - testImplementation "androidx.work:work-testing:$workManager" - testImplementation 'org.yaml:snakeyaml:2.2' + testImplementation libs.androidx.work.testing + testImplementation libs.snakeyaml } static def getDate() { diff --git a/myExpenses/src/main/java/org/totschnig/myexpenses/delegate/TransferDelegate.kt b/myExpenses/src/main/java/org/totschnig/myexpenses/delegate/TransferDelegate.kt index 8b66c3e36f..b8a0b18e6f 100644 --- a/myExpenses/src/main/java/org/totschnig/myexpenses/delegate/TransferDelegate.kt +++ b/myExpenses/src/main/java/org/totschnig/myexpenses/delegate/TransferDelegate.kt @@ -299,7 +299,7 @@ class TransferDelegate( if (!amount.isNullOr0() || transferAmount.isNullOr0()) { this.amount = amount ?: Money(currentAccount.currency, 0) setTransferAccountId(transferAccount.id) - } else if (!isSame) { + } else if (!isSame && transferAmount != null) { this.accountId = transferAccount.id setTransferAccountId(currentAccount.id) this.amount = transferAmount diff --git a/myExpenses/src/main/java/org/totschnig/myexpenses/model/Transaction.java b/myExpenses/src/main/java/org/totschnig/myexpenses/model/Transaction.java index e48049625c..e27a5dfb75 100644 --- a/myExpenses/src/main/java/org/totschnig/myexpenses/model/Transaction.java +++ b/myExpenses/src/main/java/org/totschnig/myexpenses/model/Transaction.java @@ -160,11 +160,12 @@ public void setInitialPlan(@Nullable Triple