Skip to content

Commit 385f5ef

Browse files
authored
[PM-19959] Introduce a new UI module (#5008)
1 parent 6668af5 commit 385f5ef

8 files changed

+82
-0
lines changed

.github/workflows/test.yml

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ jobs:
8787
core/build/reports/tests/
8888
data/build/reports/tests/
8989
network/build/reports/tests/
90+
ui/build/reports/tests/
9091
9192
- name: Upload to codecov.io
9293
id: upload-to-codecov

build.gradle.kts

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ dependencies {
2222
kover(project(":core"))
2323
kover(project(":data"))
2424
kover(project(":network"))
25+
kover(project(":ui"))
2526
}
2627

2728
detekt {
@@ -34,6 +35,7 @@ detekt {
3435
"core/src",
3536
"data/src",
3637
"network/src",
38+
"ui/src",
3739
)
3840
}
3941

settings.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,5 @@ include(
5555
":core",
5656
":data",
5757
":network",
58+
":ui",
5859
)

ui/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

ui/README.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Data module
2+
3+
An Android library containing common UI components, types, and utilities.
4+
5+
## Contents
6+
7+
- [Compatibility](#compatibility)
8+
9+
## Compatibility
10+
11+
- **Minimum SDK**: 28
12+
- **Target SDK**: 35

ui/build.gradle.kts

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
plugins {
2+
alias(libs.plugins.android.library)
3+
alias(libs.plugins.kotlin.android)
4+
}
5+
6+
android {
7+
namespace = "com.bitwarden.ui"
8+
compileSdk = libs.versions.compileSdk.get().toInt()
9+
10+
defaultConfig {
11+
minSdk = libs.versions.minSdkBwa.get().toInt()
12+
13+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
14+
consumerProguardFiles("consumer-rules.pro")
15+
}
16+
17+
buildTypes {
18+
release {
19+
isMinifyEnabled = false
20+
proguardFiles(
21+
getDefaultProguardFile("proguard-android-optimize.txt"),
22+
"proguard-rules.pro",
23+
)
24+
}
25+
}
26+
compileOptions {
27+
sourceCompatibility(libs.versions.jvmTarget.get())
28+
targetCompatibility(libs.versions.jvmTarget.get())
29+
}
30+
kotlinOptions {
31+
jvmTarget = libs.versions.jvmTarget.get()
32+
}
33+
}
34+
35+
dependencies { }
36+
37+
tasks {
38+
withType<Test> {
39+
useJUnitPlatform()
40+
maxHeapSize = "2g"
41+
maxParallelForks = Runtime.getRuntime().availableProcessors()
42+
jvmArgs = jvmArgs.orEmpty() + "-XX:+UseParallelGC"
43+
}
44+
}

ui/consumer-rules.pro

Whitespace-only changes.

ui/proguard-rules.pro

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

0 commit comments

Comments
 (0)