[PM-19959] Introduce a new UI module (#5008)

This commit is contained in:
Patrick Honkonen 2025-04-08 12:12:12 -04:00 committed by GitHub
parent 6668af58d2
commit 385f5efac5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 82 additions and 0 deletions

View File

@ -87,6 +87,7 @@ jobs:
core/build/reports/tests/ core/build/reports/tests/
data/build/reports/tests/ data/build/reports/tests/
network/build/reports/tests/ network/build/reports/tests/
ui/build/reports/tests/
- name: Upload to codecov.io - name: Upload to codecov.io
id: upload-to-codecov id: upload-to-codecov

View File

@ -22,6 +22,7 @@ dependencies {
kover(project(":core")) kover(project(":core"))
kover(project(":data")) kover(project(":data"))
kover(project(":network")) kover(project(":network"))
kover(project(":ui"))
} }
detekt { detekt {
@ -34,6 +35,7 @@ detekt {
"core/src", "core/src",
"data/src", "data/src",
"network/src", "network/src",
"ui/src",
) )
} }

View File

@ -55,4 +55,5 @@ include(
":core", ":core",
":data", ":data",
":network", ":network",
":ui",
) )

1
ui/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

12
ui/README.md Normal file
View File

@ -0,0 +1,12 @@
# Data module
An Android library containing common UI components, types, and utilities.
## Contents
- [Compatibility](#compatibility)
## Compatibility
- **Minimum SDK**: 28
- **Target SDK**: 35

44
ui/build.gradle.kts Normal file
View File

@ -0,0 +1,44 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
}
android {
namespace = "com.bitwarden.ui"
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())
}
kotlinOptions {
jvmTarget = libs.versions.jvmTarget.get()
}
}
dependencies { }
tasks {
withType<Test> {
useJUnitPlatform()
maxHeapSize = "2g"
maxParallelForks = Runtime.getRuntime().availableProcessors()
jvmArgs = jvmArgs.orEmpty() + "-XX:+UseParallelGC"
}
}

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

21
ui/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