[PM-19832] Create data module (#4973)

This commit is contained in:
Patrick Honkonen 2025-04-03 10:42:12 -04:00 committed by GitHub
parent 1fecd4af5f
commit 7938c8c2bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 78 additions and 0 deletions

View File

@ -85,6 +85,7 @@ jobs:
authenticator/build/reports/tests/ authenticator/build/reports/tests/
authenticatorbridge/build/reports/tests/ authenticatorbridge/build/reports/tests/
core/build/reports/tests/ core/build/reports/tests/
data/build/reports/tests/
network/build/reports/tests/ network/build/reports/tests/
- name: Upload to codecov.io - name: Upload to codecov.io

View File

@ -20,6 +20,7 @@ dependencies {
kover(project(":authenticator")) kover(project(":authenticator"))
kover(project(":authenticatorbridge")) kover(project(":authenticatorbridge"))
kover(project(":core")) kover(project(":core"))
kover(project(":data"))
kover(project(":network")) kover(project(":network"))
} }
@ -31,6 +32,7 @@ detekt {
"authenticator/src", "authenticator/src",
"authenticatorbridge/src", "authenticatorbridge/src",
"core/src", "core/src",
"data/src",
"network/src", "network/src",
) )
} }

1
data/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

12
data/README.md Normal file
View File

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

40
data/build.gradle.kts Normal file
View File

@ -0,0 +1,40 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
}
android {
namespace = "com.bitwarden.data"
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.set(JvmTarget.fromTarget(libs.versions.jvmTarget.get()))
}
}
dependencies { }

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

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

@ -53,5 +53,6 @@ include(
":authenticator", ":authenticator",
":authenticatorbridge", ":authenticatorbridge",
":core", ":core",
":data",
":network", ":network",
) )