[PM-25637] Add CXF module for Credential Exchange support (#5858)

This commit is contained in:
Patrick Honkonen 2025-09-11 08:49:06 -04:00 committed by GitHub
parent 987e065dd7
commit f6c20e08d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 103 additions and 0 deletions

View File

@ -24,6 +24,7 @@ dependencies {
kover(project(":authenticator"))
kover(project(":authenticatorbridge"))
kover(project(":core"))
kover(project(":cxf"))
kover(project(":data"))
kover(project(":network"))
kover(project(":ui"))
@ -38,6 +39,7 @@ detekt {
"authenticator/src",
"authenticatorbridge/src",
"core/src",
"cxf/src",
"data/src",
"network/src",
"ui/src",

1
cxf/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

71
cxf/build.gradle.kts Normal file
View File

@ -0,0 +1,71 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.google.services)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.parcelize)
}
android {
namespace = "com.bitwarden.cxf"
compileSdk = libs.versions.compileSdk.get().toInt()
defaultConfig {
minSdk = libs.versions.minSdkBwa.get().toInt()
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
}
}
compileOptions {
sourceCompatibility(libs.versions.jvmTarget.get())
targetCompatibility(libs.versions.jvmTarget.get())
}
}
kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
}
}
dependencies {
implementation(project(":annotation"))
implementation(project(":core"))
implementation(project(":ui"))
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.compose.runtime)
implementation(libs.androidx.credentials)
implementation(libs.androidx.credentials.providerevents)
implementation(libs.androidx.credentials.providerevents.play.services)
implementation(libs.kotlinx.coroutines.android)
testImplementation(platform(libs.junit.bom))
testRuntimeOnly(libs.junit.platform.launcher)
testImplementation(libs.junit.junit5)
testImplementation(libs.junit.vintage)
testImplementation(libs.kotlinx.coroutines.test)
testImplementation(libs.mockk.mockk)
}
tasks {
withType<Test> {
useJUnitPlatform()
maxHeapSize = "2g"
maxParallelForks = Runtime.getRuntime().availableProcessors()
jvmArgs = jvmArgs.orEmpty() + "-XX:+UseParallelGC"
}
}

0
cxf/consumer-rules.pro Normal file
View File

21
cxf/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest>
</manifest>

View File

@ -22,6 +22,7 @@ androidxCamera = "1.4.2"
androidxComposeBom = "2025.08.01"
androidxCore = "1.17.0"
androidxCredentials = "1.5.0"
androidxCredentialsProviderEvents = "1.0.0-alpha02"
androidxHiltNavigationCompose = "1.2.0"
androidxLifecycle = "2.9.3"
androidxNavigation = "2.9.3"
@ -83,6 +84,8 @@ androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidxCore" }
#noinspection CredentialDependency - Used for Passkey support, which is not available below Android 14
androidx-credentials = { module = "androidx.credentials:credentials", version.ref = "androidxCredentials" }
androidx-credentials-providerevents = { module = "androidx.credentials.providerevents:providerevents", version.ref = "androidxCredentialsProviderEvents" }
androidx-credentials-providerevents-play-services = { module = "androidx.credentials.providerevents:providerevents-play-services", version.ref = "androidxCredentialsProviderEvents" }
androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "androidxHiltNavigationCompose" }
androidx-lifecycle-process = { module = "androidx.lifecycle:lifecycle-process", version.ref = "androidxLifecycle" }
androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidxLifecycle" }

View File

@ -53,6 +53,7 @@ include(
":authenticator",
":authenticatorbridge",
":core",
":cxf",
":data",
":network",
":ui",