From f63aa6aaefd87571b4d9fa304f982b6a004e6665 Mon Sep 17 00:00:00 2001 From: J-Jamet Date: Sat, 15 Aug 2026 17:23:09 +0200 Subject: [PATCH] fix: Gradle Groovy to Kotlin and toml file --- app/build.gradle | 187 ---------------------------- app/build.gradle.kts | 169 +++++++++++++++++++++++++ build.gradle | 31 ----- build.gradle.kts | 12 ++ crypto/build.gradle | 61 --------- crypto/build.gradle.kts | 62 +++++++++ database/build.gradle | 55 -------- database/build.gradle.kts | 58 +++++++++ gradle.properties | 1 - gradle/libs.versions.toml | 72 +++++++++++ icon-pack/build.gradle | 26 ---- icon-pack/build.gradle.kts | 27 ++++ icon-pack/classic/build.gradle | 13 -- icon-pack/classic/build.gradle.kts | 14 +++ icon-pack/material/build.gradle | 13 -- icon-pack/material/build.gradle.kts | 14 +++ settings.gradle | 4 - settings.gradle.kts | 24 ++++ 18 files changed, 452 insertions(+), 391 deletions(-) delete mode 100644 app/build.gradle create mode 100644 app/build.gradle.kts delete mode 100644 build.gradle create mode 100644 build.gradle.kts delete mode 100644 crypto/build.gradle create mode 100644 crypto/build.gradle.kts delete mode 100644 database/build.gradle create mode 100644 database/build.gradle.kts create mode 100644 gradle/libs.versions.toml delete mode 100644 icon-pack/build.gradle create mode 100644 icon-pack/build.gradle.kts delete mode 100644 icon-pack/classic/build.gradle create mode 100644 icon-pack/classic/build.gradle.kts delete mode 100644 icon-pack/material/build.gradle create mode 100644 icon-pack/material/build.gradle.kts delete mode 100644 settings.gradle create mode 100644 settings.gradle.kts diff --git a/app/build.gradle b/app/build.gradle deleted file mode 100644 index dd34475ee..000000000 --- a/app/build.gradle +++ /dev/null @@ -1,187 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-parcelize' -apply plugin: 'kotlin-kapt' - -android { - namespace 'com.kunzisoft.keepass' - compileSdkVersion 36 - - def gms_package = "com.google.android.gms" - - defaultConfig { - applicationId "com.kunzisoft.keepass" - minSdkVersion 19 - targetSdkVersion 36 - versionCode = 45005 - versionName = "4.5.0_beta05" - multiDexEnabled true - - testApplicationId = "com.kunzisoft.keepass.tests" - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - - buildConfigField "String", "GOOGLE_PLAY_SERVICES_PACKAGE", "\"${gms_package}\"" - buildConfigField "String[]", "ICON_PACKS", "{\"classic\",\"material\"}" - manifestPlaceholders = [ - googleAndroidBackupAPIKey:"unused", - googlePlayServicesPackage: gms_package - ] - - kapt { - arguments { - arg("room.incremental", "true") - arg("room.schemaLocation", "$projectDir/schemas".toString()) - } - } - } - - buildTypes { - release { - minifyEnabled = false - } - } - - buildFeatures { - buildConfig true - } - - dependenciesInfo { - // Disables dependency metadata when building APKs. - includeInApk = false - // Disables dependency metadata when building Android App Bundles. - includeInBundle = false - } - - flavorDimensions "version" - productFlavors { - libre { - dimension "version" - applicationIdSuffix = ".libre" - buildConfigField "String", "BUILD_VERSION", "\"libre\"" - buildConfigField "boolean", "CLOSED_STORE", "false" - buildConfigField "String[]", "STYLES_DISABLED", - "{\"KeepassDXStyle_Red\"," + - "\"KeepassDXStyle_Red_Night\"," + - "\"KeepassDXStyle_Reply\"," + - "\"KeepassDXStyle_Reply_Night\"," + - "\"KeepassDXStyle_Purple\"," + - "\"KeepassDXStyle_Purple_Dark\"," + - "\"KeepassDXStyle_Dynamic_Light\"," + - "\"KeepassDXStyle_Dynamic_Night\"}" - buildConfigField "String[]", "ICON_PACKS_DISABLED", "{}" - } - free { - dimension "version" - applicationIdSuffix = ".free" - buildConfigField "String", "BUILD_VERSION", "\"free\"" - buildConfigField "boolean", "CLOSED_STORE", "true" - buildConfigField "String[]", "STYLES_DISABLED", - "{\"KeepassDXStyle_Blue\"," + - "\"KeepassDXStyle_Blue_Night\"," + - "\"KeepassDXStyle_Red\"," + - "\"KeepassDXStyle_Red_Night\"," + - "\"KeepassDXStyle_Reply\"," + - "\"KeepassDXStyle_Reply_Night\"," + - "\"KeepassDXStyle_Purple\"," + - "\"KeepassDXStyle_Purple_Dark\"," + - "\"KeepassDXStyle_Dynamic_Light\"," + - "\"KeepassDXStyle_Dynamic_Night\"}" - buildConfigField "String[]", "ICON_PACKS_DISABLED", "{}" - manifestPlaceholders = [ - googleAndroidBackupAPIKey:"AEdPqrEAAAAIbRfbV8fHLItXo8OcHwrO0sSNblqhPwkc0DPTqg", - googlePlayServicesPackage: gms_package - ] - } - } - - sourceSets { - libre.res.srcDir 'src/libre/res' - free.res.srcDir 'src/free/res' - } - - testOptions { - unitTests.includeAndroidResources = true - } - - compileOptions { - targetCompatibility JavaVersion.VERSION_17 - sourceCompatibility JavaVersion.VERSION_17 - } - - kotlinOptions { - jvmTarget = "17" - } - buildFeatures { - buildConfig true - } - - packaging { - // Bouncy castle bug https://github.com/bcgit/bc-java/issues/1685 - resources.pickFirsts.add('META-INF/versions/9/OSGI-INF/MANIFEST.MF') - } - - androidResources { - generateLocaleConfig true - } -} - -def room_version = "2.6.1" - -repositories { - maven { - url "https://jitpack.io" - content { - includeGroup "com.github.Kunzisoft" - } - } -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines_version" - implementation "com.android.support:multidex:1.0.3" - implementation "androidx.appcompat:appcompat:$android_appcompat_version" - implementation 'androidx.preference:preference-ktx:1.2.0' - implementation 'androidx.cardview:cardview:1.0.0' - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation 'androidx.viewpager2:viewpager2:1.1.0-beta02' - implementation 'androidx.documentfile:documentfile:1.0.1' - implementation 'androidx.biometric:biometric:1.1.0' - implementation 'androidx.media:media:1.6.0' - // Lifecycle - ViewModel - Coroutines - implementation "androidx.core:core-ktx:$android_core_version" - implementation "androidx.lifecycle:lifecycle-process:$android_lifecycle" - implementation "androidx.lifecycle:lifecycle-service:$android_lifecycle" - implementation 'androidx.fragment:fragment-ktx:1.6.0' - implementation "com.google.android.material:material:$android_material_version" - // Token auto complete - // From sources until https://github.com/splitwise/TokenAutoComplete/pull/422 fixed - implementation "com.splitwise:tokenautocomplete:4.0.0-beta05" - // Database - implementation "androidx.room:room-runtime:$room_version" - kapt "androidx.room:room-compiler:$room_version" - // Autofill - implementation "androidx.autofill:autofill:1.1.0" - // Time - implementation "joda-time:joda-time:$joda_time_version" - // Color - implementation 'com.github.Kunzisoft:AndroidClearChroma:2.6' - // Education - implementation 'com.getkeepsafe.taptargetview:taptargetview:1.13.3' - // Apache Commons - implementation "commons-io:commons-io:$commons_io_version" - // Password generator - implementation 'me.gosimple:nbvcxz:1.5.1' - - // Credentials Provider - implementation "androidx.credentials:credentials:1.2.2" - - // Modules import - implementation project(path: ':database') - implementation project(path: ':icon-pack') - - // Tests - androidTestImplementation "androidx.test:runner:$android_test_version" - testImplementation "androidx.test:runner:$android_test_version" -} diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 000000000..3446f01ce --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,169 @@ +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.kotlin.parcelize) + alias(libs.plugins.ksp) +} + +ksp { + arg("room.schemaLocation", "$projectDir/schemas") +} + +android { + namespace = "com.kunzisoft.keepass" + compileSdk = 36 + + val gmsPackage = "com.google.android.gms" + + defaultConfig { + applicationId = "com.kunzisoft.keepass" + minSdk = 19 + targetSdk = 36 + versionCode = 45005 + versionName = "4.5.0_beta05" + multiDexEnabled = true + + testApplicationId = "com.kunzisoft.keepass.tests" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + + buildConfigField("String", "GOOGLE_PLAY_SERVICES_PACKAGE", "\"$gmsPackage\"") + buildConfigField("String[]", "ICON_PACKS", "{\"classic\",\"material\"}") + + manifestPlaceholders["googleAndroidBackupAPIKey"] = "unused" + manifestPlaceholders["googlePlayServicesPackage"] = gmsPackage + } + + buildTypes { + release { + isMinifyEnabled = false + } + } + + buildFeatures { + buildConfig = true + } + + dependenciesInfo { + includeInApk = false + includeInBundle = false + } + + flavorDimensions += "version" + productFlavors { + create("libre") { + dimension = "version" + applicationIdSuffix = ".libre" + buildConfigField("String", "BUILD_VERSION", "\"libre\"") + buildConfigField("boolean", "CLOSED_STORE", "false") + buildConfigField( + "String[]", "STYLES_DISABLED", + "{\"KeepassDXStyle_Red\"," + + "\"KeepassDXStyle_Red_Night\"," + + "\"KeepassDXStyle_Reply\"," + + "\"KeepassDXStyle_Reply_Night\"," + + "\"KeepassDXStyle_Purple\"," + + "\"KeepassDXStyle_Purple_Dark\"," + + "\"KeepassDXStyle_Dynamic_Light\"," + + "\"KeepassDXStyle_Dynamic_Night\"}" + ) + buildConfigField("String[]", "ICON_PACKS_DISABLED", "{}") + } + create("free") { + dimension = "version" + applicationIdSuffix = ".free" + buildConfigField("String", "BUILD_VERSION", "\"free\"") + buildConfigField("boolean", "CLOSED_STORE", "true") + buildConfigField( + "String[]", "STYLES_DISABLED", + "{\"KeepassDXStyle_Blue\"," + + "\"KeepassDXStyle_Blue_Night\"," + + "\"KeepassDXStyle_Red\"," + + "\"KeepassDXStyle_Red_Night\"," + + "\"KeepassDXStyle_Reply\"," + + "\"KeepassDXStyle_Reply_Night\"," + + "\"KeepassDXStyle_Purple\"," + + "\"KeepassDXStyle_Purple_Dark\"," + + "\"KeepassDXStyle_Dynamic_Light\"," + + "\"KeepassDXStyle_Dynamic_Night\"}" + ) + buildConfigField("String[]", "ICON_PACKS_DISABLED", "{}") + manifestPlaceholders["googleAndroidBackupAPIKey"] = "AEdPqrEAAAAIbRfbV8fHLItXo8OcHwrO0sSNblqhPwkc0DPTqg" + manifestPlaceholders["googlePlayServicesPackage"] = gmsPackage + } + } + + sourceSets { + getByName("libre") { + res.srcDirs("src/libre/res") + } + getByName("free") { + res.srcDirs("src/free/res") + } + } + + testOptions { + unitTests.isIncludeAndroidResources = true + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + kotlinOptions { + jvmTarget = "17" + } + + packaging { + resources { + pickFirsts.add("META-INF/versions/9/OSGI-INF/MANIFEST.MF") + } + } + + @Suppress("UnstableApiUsage") + androidResources { + generateLocaleConfig = true + } +} + +dependencies { + implementation(libs.kotlin.stdlib) + implementation(libs.kotlinx.coroutines.core) + implementation(libs.kotlinx.coroutines.android) + implementation(libs.androidx.multidex) + implementation(libs.androidx.appcompat) + implementation(libs.androidx.preference.ktx) + implementation(libs.androidx.cardview) + implementation(libs.androidx.constraintlayout) + implementation(libs.androidx.viewpager2) + implementation(libs.androidx.documentfile) + implementation(libs.androidx.biometric) + implementation(libs.androidx.media) + // Lifecycle - ViewModel - Coroutines + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.lifecycle.process) + implementation(libs.androidx.lifecycle.service) + implementation(libs.androidx.fragment.ktx) + implementation(libs.google.material) + // Token auto complete + // From sources until https://github.com/splitwise/TokenAutoComplete/pull/422 fixed + implementation(libs.tokenautocomplete) + // Database + implementation(libs.androidx.room.runtime) + ksp(libs.androidx.room.compiler) + // Utilities + implementation(libs.androidx.autofill) + implementation(libs.joda.time) + implementation(libs.chroma) + implementation(libs.taptargetview) + implementation(libs.commons.io) + // Credentials + implementation(libs.nbvcxz) + implementation(libs.androidx.credentials) + // Modules import + implementation(project(":database")) + implementation(project(":icon-pack")) + // Tests + androidTestImplementation(libs.androidx.test.runner) + testImplementation(libs.junit) +} diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 19d88166a..000000000 --- a/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. -buildscript { - ext.kotlin_version = '2.0.0' - ext.kotlin_coroutines_version = '1.8.1' - ext.android_core_version = '1.10.1' - ext.android_lifecycle = '2.6.2' - ext.android_appcompat_version = '1.6.1' - ext.android_material_version = '1.9.0' - ext.android_test_version = '1.6.0' - ext.commons_io_version = '2.21.0' - ext.joda_time_version = '2.14.1' - repositories { - mavenCentral() - google() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.13.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - mavenCentral() - google() - } -} - -tasks.register('clean', Delete) { - delete rootProject.layout.buildDirectory -} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 000000000..85fed62d6 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,12 @@ +plugins { + alias(libs.plugins.android.application) apply false + alias(libs.plugins.android.library) apply false + alias(libs.plugins.kotlin.android) apply false + alias(libs.plugins.kotlin.parcelize) apply false + alias(libs.plugins.ksp) apply false +} + +tasks.register("clean") { + description = "Clean the project" + delete(rootProject.layout.buildDirectory) +} diff --git a/crypto/build.gradle b/crypto/build.gradle deleted file mode 100644 index cac93b05a..000000000 --- a/crypto/build.gradle +++ /dev/null @@ -1,61 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' -} - -android { - namespace 'com.kunzisoft.encrypt' - compileSdkVersion 36 - ndkVersion "25.2.9519653" - - defaultConfig { - minSdkVersion 19 - targetSdkVersion 35 - multiDexEnabled true - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - - externalNativeBuild { - cmake { - // NDK <= 27 - // arguments "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON" - // Use manual linker flags for NDK < 27 - cppFlags "-Wl,-z,max-page-size=16384" - } - } - } - - buildTypes { - release { - minifyEnabled false - } - } - - externalNativeBuild { - cmake { - path "src/main/jni/CMakeLists.txt" - } - } - - compileOptions { - targetCompatibility JavaVersion.VERSION_17 - sourceCompatibility JavaVersion.VERSION_17 - } - - kotlinOptions { - jvmTarget = "17" - } - - packaging { - // Bouncy castle bug https://github.com/bcgit/bc-java/issues/1685 - resources.pickFirsts.add('META-INF/versions/9/OSGI-INF/MANIFEST.MF') - } -} - -dependencies { - // Crypto - implementation 'org.bouncycastle:bcpkix-jdk18on:1.84' - - androidTestImplementation "androidx.test:runner:$android_test_version" - testImplementation "androidx.test:runner:$android_test_version" -} diff --git a/crypto/build.gradle.kts b/crypto/build.gradle.kts new file mode 100644 index 000000000..501c27f5a --- /dev/null +++ b/crypto/build.gradle.kts @@ -0,0 +1,62 @@ +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) +} + +android { + namespace = "com.kunzisoft.encrypt" + compileSdk = 36 + ndkVersion = "25.2.9519653" + + defaultConfig { + minSdk = 19 + multiDexEnabled = true + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + + @Suppress("UnstableApiUsage") + externalNativeBuild { + cmake { + // NDK <= 27 + // arguments("-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON") + // Use manual linker flags for NDK < 27 + cppFlags("-Wl,-z,max-page-size=16384") + } + } + } + + buildTypes { + release { + isMinifyEnabled = false + } + } + + externalNativeBuild { + cmake { + path("src/main/jni/CMakeLists.txt") + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + kotlinOptions { + jvmTarget = "17" + } + + packaging { + resources { + // Bouncy castle bug https://github.com/bcgit/bc-java/issues/1685 + pickFirsts.add("META-INF/versions/9/OSGI-INF/MANIFEST.MF") + } + } +} + +dependencies { + // Crypto + implementation(libs.bouncycastle.pkix) + + androidTestImplementation(libs.androidx.test.runner) +} diff --git a/database/build.gradle b/database/build.gradle deleted file mode 100644 index b17cb639d..000000000 --- a/database/build.gradle +++ /dev/null @@ -1,55 +0,0 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-parcelize' - -android { - namespace 'com.kunzisoft.keepass.database' - compileSdkVersion 36 - - defaultConfig { - minSdkVersion 19 - targetSdk 35 - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - minifyEnabled false - } - } - - compileOptions { - targetCompatibility JavaVersion.VERSION_17 - sourceCompatibility JavaVersion.VERSION_17 - } - - kotlinOptions { - jvmTarget = "17" - } - - testOptions { - unitTests { - includeAndroidResources = true - } - } - - packaging { - // Bouncy castle bug https://github.com/bcgit/bc-java/issues/1685 - resources.pickFirsts.add('META-INF/versions/9/OSGI-INF/MANIFEST.MF') - } -} - -dependencies { - // Time - implementation "joda-time:joda-time:$joda_time_version" - // Apache Commons - implementation "commons-io:commons-io:$commons_io_version" - - api project(path: ':crypto') - - // Tests - androidTestImplementation "androidx.test:runner:$android_test_version" - testImplementation "junit:junit:4.13.2" - testImplementation "org.robolectric:robolectric:4.11.1" -} diff --git a/database/build.gradle.kts b/database/build.gradle.kts new file mode 100644 index 000000000..139fc1678 --- /dev/null +++ b/database/build.gradle.kts @@ -0,0 +1,58 @@ +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.kotlin.parcelize) +} + +android { + namespace = "com.kunzisoft.keepass.database" + compileSdk = 36 + + defaultConfig { + minSdk = 19 + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + isMinifyEnabled = false + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + kotlinOptions { + jvmTarget = "17" + } + + testOptions { + unitTests { + isIncludeAndroidResources = true + } + } + + packaging { + resources { + // Bouncy castle bug https://github.com/bcgit/bc-java/issues/1685 + pickFirsts.add("META-INF/versions/9/OSGI-INF/MANIFEST.MF") + } + } +} + +dependencies { + // Time + implementation(libs.joda.time) + // Apache Commons + implementation(libs.commons.io) + + api(project(":crypto")) + + // Tests + androidTestImplementation(libs.androidx.test.runner) + testImplementation(libs.junit) + testImplementation(libs.robolectric) +} diff --git a/gradle.properties b/gradle.properties index 1981d1516..dfd59e441 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,6 +2,5 @@ android.enableJetifier=true android.nonFinalResIds=false android.nonTransitiveRClass=false android.useAndroidX=true -kapt.incremental.apt=true org.gradle.jvmargs=-Xmx2048M org.gradle.unsafe.configuration-cache=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 000000000..9997a854f --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,72 @@ +[versions] +agp = "8.13.2" +kotlin = "2.0.0" +ksp = "2.0.0-1.0.21" +kotlin-coroutines = "1.8.1" +android-core = "1.10.1" +android-lifecycle = "2.6.2" +android-appcompat = "1.6.1" +android-material = "1.9.0" +android-test = "1.6.0" +commons-io = "2.21.0" +joda-time = "2.14.1" +room = "2.6.1" +multidex = "1.0.3" +preference-ktx = "1.2.0" +cardview = "1.0.0" +constraintlayout = "2.1.4" +viewpager2 = "1.1.0-beta02" +documentfile = "1.0.1" +biometric = "1.1.0" +media = "1.6.0" +fragment-ktx = "1.6.0" +tokenautocomplete = "4.0.0-beta05" +autofill = "1.1.0" +chroma = "2.6" +taptargetview = "1.13.3" +nbvcxz = "1.5.1" +credentials = "1.2.2" +bouncycastle = "1.84" +junit = "4.13.2" +robolectric = "4.11.1" + +[libraries] +kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8", version.ref = "kotlin" } +kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlin-coroutines" } +kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "kotlin-coroutines" } +androidx-multidex = { group = "com.android.support", name = "multidex", version.ref = "multidex" } +androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "android-appcompat" } +androidx-preference-ktx = { group = "androidx.preference", name = "preference-ktx", version.ref = "preference-ktx" } +androidx-cardview = { group = "androidx.cardview", name = "cardview", version.ref = "cardview" } +androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } +androidx-viewpager2 = { group = "androidx.viewpager2", name = "viewpager2", version.ref = "viewpager2" } +androidx-documentfile = { group = "androidx.documentfile", name = "documentfile", version.ref = "documentfile" } +androidx-biometric = { group = "androidx.biometric", name = "biometric", version.ref = "biometric" } +androidx-media = { group = "androidx.media", name = "media", version.ref = "media" } +androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "android-core" } +androidx-lifecycle-process = { group = "androidx.lifecycle", name = "lifecycle-process", version.ref = "android-lifecycle" } +androidx-lifecycle-service = { group = "androidx.lifecycle", name = "lifecycle-service", version.ref = "android-lifecycle" } +androidx-fragment-ktx = { group = "androidx.fragment", name = "fragment-ktx", version.ref = "fragment-ktx" } +google-material = { group = "com.google.android.material", name = "material", version.ref = "android-material" } +tokenautocomplete = { group = "com.splitwise", name = "tokenautocomplete", version.ref = "tokenautocomplete" } +androidx-room-runtime = { group = "androidx.room", name = "room-runtime", version.ref = "room" } +androidx-room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "room" } +androidx-autofill = { group = "androidx.autofill", name = "autofill", version.ref = "autofill" } +joda-time = { group = "joda-time", name = "joda-time", version.ref = "joda-time" } +chroma = { group = "com.github.Kunzisoft", name = "AndroidClearChroma", version.ref = "chroma" } +taptargetview = { group = "com.getkeepsafe.taptargetview", name = "taptargetview", version.ref = "taptargetview" } +commons-io = { group = "commons-io", name = "commons-io", version.ref = "commons-io" } +nbvcxz = { group = "me.gosimple", name = "nbvcxz", version.ref = "nbvcxz" } +androidx-credentials = { group = "androidx.credentials", name = "credentials", version.ref = "credentials" } +bouncycastle-pkix = { group = "org.bouncycastle", name = "bcpkix-jdk18on", version.ref = "bouncycastle" } +androidx-test-runner = { group = "androidx.test", name = "runner", version.ref = "android-test" } +junit = { group = "junit", name = "junit", version.ref = "junit" } +robolectric = { group = "org.robolectric", name = "robolectric", version.ref = "robolectric" } + +[plugins] +android-application = { id = "com.android.application", version.ref = "agp" } +android-library = { id = "com.android.library", version.ref = "agp" } +kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" } +kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" } +ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } diff --git a/icon-pack/build.gradle b/icon-pack/build.gradle deleted file mode 100644 index fe486ae76..000000000 --- a/icon-pack/build.gradle +++ /dev/null @@ -1,26 +0,0 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - namespace 'com.kunzisoft.keepass.icon' - compileSdkVersion 36 - - defaultConfig { - minSdkVersion 19 - targetSdkVersion 35 - } - - compileOptions { - targetCompatibility JavaVersion.VERSION_17 - sourceCompatibility JavaVersion.VERSION_17 - } - - kotlinOptions { - jvmTarget = "17" - } -} - -dependencies { - implementation project(path: ':icon-pack:classic') - implementation project(path: ':icon-pack:material') -} diff --git a/icon-pack/build.gradle.kts b/icon-pack/build.gradle.kts new file mode 100644 index 000000000..0b959c364 --- /dev/null +++ b/icon-pack/build.gradle.kts @@ -0,0 +1,27 @@ +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) +} + +android { + namespace = "com.kunzisoft.keepass.icon" + compileSdk = 36 + + defaultConfig { + minSdk = 19 + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + kotlinOptions { + jvmTarget = "17" + } +} + +dependencies { + implementation(project(":icon-pack:classic")) + implementation(project(":icon-pack:material")) +} diff --git a/icon-pack/classic/build.gradle b/icon-pack/classic/build.gradle deleted file mode 100644 index f5a2baaad..000000000 --- a/icon-pack/classic/build.gradle +++ /dev/null @@ -1,13 +0,0 @@ -apply plugin: 'com.android.library' - -android { - namespace 'com.kunzisoft.keepass.icon.classic' - compileSdkVersion 36 - - defaultConfig { - minSdkVersion 19 - targetSdkVersion 35 - } - - resourcePrefix 'classic_' -} diff --git a/icon-pack/classic/build.gradle.kts b/icon-pack/classic/build.gradle.kts new file mode 100644 index 000000000..d801d1cc0 --- /dev/null +++ b/icon-pack/classic/build.gradle.kts @@ -0,0 +1,14 @@ +plugins { + alias(libs.plugins.android.library) +} + +android { + namespace = "com.kunzisoft.keepass.icon.classic" + compileSdk = 36 + + defaultConfig { + minSdk = 19 + } + + resourcePrefix = "classic_" +} diff --git a/icon-pack/material/build.gradle b/icon-pack/material/build.gradle deleted file mode 100644 index bfb426dfe..000000000 --- a/icon-pack/material/build.gradle +++ /dev/null @@ -1,13 +0,0 @@ -apply plugin: 'com.android.library' - -android { - namespace 'com.kunzisoft.keepass.icon.material' - compileSdkVersion 36 - - defaultConfig { - minSdkVersion 19 - targetSdkVersion 35 - } - - resourcePrefix 'material_' -} diff --git a/icon-pack/material/build.gradle.kts b/icon-pack/material/build.gradle.kts new file mode 100644 index 000000000..a551a588e --- /dev/null +++ b/icon-pack/material/build.gradle.kts @@ -0,0 +1,14 @@ +plugins { + alias(libs.plugins.android.library) +} + +android { + namespace = "com.kunzisoft.keepass.icon.material" + compileSdk = 36 + + defaultConfig { + minSdk = 19 + } + + resourcePrefix = "material_" +} diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 9611dc908..000000000 --- a/settings.gradle +++ /dev/null @@ -1,4 +0,0 @@ -include ':app' -include ':database' -include ':crypto' -include ':icon-pack', ':icon-pack:classic', ':icon-pack:material' diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 000000000..3b007bd2c --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,24 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} +@Suppress("UnstableApiUsage") +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + maven { url = uri("https://jitpack.io") } + } +} + +rootProject.name = "KeePassDX" +include(":app") +include(":database") +include(":crypto") +include(":icon-pack") +include(":icon-pack:classic") +include(":icon-pack:material")