Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import com.android.build.api.dsl.ApplicationExtension
import common.BuildTypes
import common.SdkVersions
import common.configureKotlinAndroid
import common.configureAndroidApplication
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.apply
Expand All @@ -23,7 +23,6 @@ class AndroidApplicationConventionPlugin : Plugin<Project> {

with(pluginManager) {
apply("com.android.application")
apply("org.jetbrains.kotlin.android")
apply("simprints.library.hilt")

apply("com.google.firebase.firebase-perf")
Expand All @@ -34,7 +33,7 @@ class AndroidApplicationConventionPlugin : Plugin<Project> {
}

extensions.configure<ApplicationExtension> {
configureKotlinAndroid(this)
configureAndroidApplication(this)

defaultConfig {
targetSdk = SdkVersions.TARGET
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import com.android.build.api.dsl.LibraryExtension
import common.BuildTypes
import common.configureAndroidLibrary
import common.configureDebugModeBuildTypes
import common.configureKotlinAndroid
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.configure
Expand All @@ -13,13 +13,12 @@ class AndroidLibraryConventionPlugin : Plugin<Project> {
with(target) {
with(pluginManager) {
apply("com.android.library")
apply("org.jetbrains.kotlin.android")

apply("simprints.ci.jacoco")
}

extensions.configure<LibraryExtension> {
configureKotlinAndroid(this)
configureAndroidLibrary(this)

packaging {
// remove mockk duplicated files
Expand Down
60 changes: 36 additions & 24 deletions build-logic/convention/src/main/kotlin/common/KotlinAndroid.kt
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
package common

import com.android.build.api.dsl.CommonExtension
import com.android.build.api.variant.AndroidComponentsExtension
import com.android.build.api.dsl.ApplicationExtension
import com.android.build.api.dsl.LibraryExtension
import org.gradle.api.Project
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

/**
* Configure base Kotlin with Android options
*/
internal fun Project.configureKotlinAndroid(commonExtension: CommonExtension<*, *, *, *, *, *>) {
commonExtension.apply {
internal fun Project.configureKotlinCompiler() {
tasks.withType(KotlinCompile::class.java).configureEach {
compilerOptions {
freeCompilerArgs.addAll(
"-Xnew-inference",
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-opt-in=kotlinx.coroutines.FlowPreview",
"-opt-in=kotlin.Experimental",
)
}
}
}

internal fun Project.configureAndroidApplication(extension: ApplicationExtension) {
extension.apply {
compileSdk = SdkVersions.TARGET

defaultConfig {
Expand All @@ -20,23 +31,24 @@ internal fun Project.configureKotlinAndroid(commonExtension: CommonExtension<*,
sourceCompatibility = SdkVersions.JAVA_TARGET
targetCompatibility = SdkVersions.JAVA_TARGET
}
}

configureKotlinCompiler()
}

internal fun Project.configureAndroidLibrary(extension: LibraryExtension) {
extension.apply {
compileSdk = SdkVersions.TARGET

extensions.getByType(AndroidComponentsExtension::class.java).onVariants { variant ->
afterEvaluate {
val variantName = variant.name.replaceFirstChar { it.uppercaseChar() }
val compileTaskName = "compile${variantName}Kotlin"

tasks.named(compileTaskName, KotlinJvmCompile::class.java) {
compilerOptions.freeCompilerArgs.addAll(
"-Xnew-inference",
"-opt-in=kotlin.RequiresOptIn",
// Enable experimental coroutines APIs, including Flow
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-opt-in=kotlinx.coroutines.FlowPreview",
"-opt-in=kotlin.Experimental",
)
}
}
defaultConfig {
minSdk = SdkVersions.MIN
}

compileOptions {
sourceCompatibility = SdkVersions.JAVA_TARGET
targetCompatibility = SdkVersions.JAVA_TARGET
}
}

configureKotlinCompiler()
}
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.android.test) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.ksp) apply false

Expand Down
2 changes: 1 addition & 1 deletion face/infra/simface/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ android {

dependencies {
implementation(project(":face:infra:base-bio-sdk"))
api(libs.simface)
implementation(libs.simface)
}
39 changes: 19 additions & 20 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[versions]
kotlin_version = "2.2.21"
kotlin_version = "2.3.20"
kotlin_coroutine_version = "1.10.2"
ksp_version = "2.3.5"
kotlin_serialization_version = "1.10.0"
kotlin_serialization_version = "1.11.0"

android_gradlePlugin_version = "8.13.2"
android_gradlePlugin_version = "9.1.1"
androidx_version = "1.7.0"
androidx_core_version = "1.18.0"
androidx_app_compat_version = "1.7.1"
androidx_fragment_version = "1.8.9"
androidx_navigation_version = "2.9.7"
androidx_lifecycle_version = "2.10.0"
androidx_work_version = "2.11.1"
androidx_work_version = "2.11.2"
androidx_room_version = "2.8.4"
androidx_datastore_version = "1.2.1"
androidx_camerax_version = "1.6.0"
Expand All @@ -23,42 +23,42 @@ androidx_cardview_version = "1.0.0"
androidx_preferences_version = "1.2.1"
androidx_viewpager_version = "1.1.0"
androidx_security_version = "1.1.0"
androidx_annotation_version = "1.9.1"
androidx_annotation_version = "1.10.0"
androidx_arch_core_version = "2.2.0"
material_version = "1.13.0"

hilt_version = "2.57.2"
hilt_version = "2.59.2"
hilt_androidx_version = "1.3.0"

play_base_services_version = "18.10.0"
play_location_services_version = "21.3.0"
play_integrity_version = "1.6.0"
gsm_plugin_version = "4.4.4"
play_publisher_version = "3.13.0"
play_publisher_version = "4.0.0"
play_barcode_version = "18.3.1"

ml_entity_extraction_version = "16.0.1"

firebase_auth_version = "24.0.1"
firebase_storage_version = "22.0.1"
firebase_crashlytics_version = "20.0.4"
firebase_analytics_version = "23.0.0"
firebase_perf_version = "22.0.4"
firebase_crashlyticsPlugin_version = "3.0.6"
firebase_crashlytics_version = "20.0.5"
firebase_analytics_version = "23.2.0"
firebase_perf_version = "22.0.5"
firebase_crashlyticsPlugin_version = "3.0.7"
firebase_perfPlugin_version = "2.0.2"

retrofit_version = "3.0.0"
okttp_version = "5.3.2"
chuck_version = "4.3.0"
chuck_version = "4.3.1"

sqlCipher_version = "4.13.0"
sqlCipher_version = "4.14.1"
fuzzywuzzy_version = "1.4.0"
rootbeer_version = "0.1.1"
rootbeer_version = "0.1.2"
commons_io_version = "2.21.0"
kronos_version = "0.0.1-alpha11"
protobuf_version = "4.34.1"
circleImageView_version = "3.1.0"
kermit_version = "2.0.8"
kermit_version = "2.1.0"
zip4j_version = "2.11.6"

libsimprints_version = "2025.2.2"
Expand All @@ -81,10 +81,10 @@ uiAutomator_version = "2.3.0"
jacoco_version = "0.8.14"

sonar_plugin_version = "7.2.3.7755"
realm_version = "4.0.1"
protobuf_plugin_version = "0.9.6"
realm_version = "4.0.3"
protobuf_plugin_version = "0.10.0"
deps_graph_version = "0.8.0"
tink_version = "1.20.0"
tink_version = "1.21.0"
desugar_jdk_libsVersion = "2.1.5"
[libraries]

Expand Down Expand Up @@ -199,7 +199,7 @@ simmatcher = { module = "com.simprints:libsimmatcher", version.ref = "simmatcher
# roc v1 sdk hosted in https://github.com/Simprints/lib-roc-wrapper
roc-v1 = { module = "com.simprints:rocwrapper", version.ref = "roc_wrapper_version" }
# roc v3 sdk hosted in https://github.com/Simprints/lib-roc-wrapper-v3
roc-v3 = { module = "com.simprints:rocwrapper-v3", version.ref = "roc_wrapper-v3_version" }
roc-v3 = { module = "com.simprints:roc-v3", version.ref = "roc_wrapper-v3_version" }
# secugen sdk hosted in https://github.com/Simprints/secugen-wrapper
secugen = { module = "com.simprints:secugenwrapper", version.ref = "secugen_version" }
simface = { module = "com.simprints.biometrics:simface", version.ref = "simface" }
Expand Down Expand Up @@ -270,7 +270,6 @@ plugin-room = { group = "androidx.room", name = "room-gradle-plugin", version.re
android-application = { id = "com.android.application", version.ref = "android_gradlePlugin_version" }
android-library = { id = "com.android.library", version.ref = "android_gradlePlugin_version" }
android-test = { id = "com.android.test", version.ref = "android_gradlePlugin_version" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin_version" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin_version" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp_version" }
gms = { id = "com.google.gms.google-services", version.ref = "gsm_plugin_version" }
Expand Down
9 changes: 4 additions & 5 deletions id/src/main/java/com/simprints/id/Application.kt
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,10 @@ open class Application :
appScope.cancel()
}

override val workManagerConfiguration: Configuration
get() = Configuration
.Builder()
.setWorkerFactory(workerFactory)
.build()
override fun getWorkManagerConfiguration(): Configuration = Configuration
.Builder()
.setWorkerFactory(workerFactory)
.build()

open fun initApplication() {
SimberBuilder.initialize(this)
Expand Down
1 change: 1 addition & 0 deletions infra/enrolment-records/repository/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ dependencies {

implementation(libs.libsimprints)
implementation(libs.testing.androidX.room)
implementation(libs.workManager.work)
}
1 change: 1 addition & 0 deletions infra/logging/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ dependencies {
exclude(group = "com.google.firebase", module = "protolite-well-known-types")
}
implementation(libs.kermit)
implementation(libs.androidX.core)
implementation(libs.kermit.io)

testImplementation(libs.testing.junit)
Expand Down
1 change: 0 additions & 1 deletion testing/data-generator/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
id("simprints.feature")
id("kotlin-parcelize")
alias(libs.plugins.kotlin.android)
}

android {
Expand Down
Loading