diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5bebcaac40..ece60e98a8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -87,6 +87,7 @@ jobs: core/build/reports/tests/ data/build/reports/tests/ network/build/reports/tests/ + ui/build/reports/tests/ - name: Upload to codecov.io id: upload-to-codecov diff --git a/build.gradle.kts b/build.gradle.kts index 599dbb0f5e..3d65b844c9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -22,6 +22,7 @@ dependencies { kover(project(":core")) kover(project(":data")) kover(project(":network")) + kover(project(":ui")) } detekt { @@ -34,6 +35,7 @@ detekt { "core/src", "data/src", "network/src", + "ui/src", ) } diff --git a/settings.gradle.kts b/settings.gradle.kts index 212655dd8b..5e2c81ef1e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -55,4 +55,5 @@ include( ":core", ":data", ":network", + ":ui", ) diff --git a/ui/.gitignore b/ui/.gitignore new file mode 100644 index 0000000000..796b96d1c4 --- /dev/null +++ b/ui/.gitignore @@ -0,0 +1 @@ +/build diff --git a/ui/README.md b/ui/README.md new file mode 100644 index 0000000000..a1b13e7125 --- /dev/null +++ b/ui/README.md @@ -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 diff --git a/ui/build.gradle.kts b/ui/build.gradle.kts new file mode 100644 index 0000000000..a4e9c112d1 --- /dev/null +++ b/ui/build.gradle.kts @@ -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 { + useJUnitPlatform() + maxHeapSize = "2g" + maxParallelForks = Runtime.getRuntime().availableProcessors() + jvmArgs = jvmArgs.orEmpty() + "-XX:+UseParallelGC" + } +} diff --git a/ui/consumer-rules.pro b/ui/consumer-rules.pro new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ui/proguard-rules.pro b/ui/proguard-rules.pro new file mode 100644 index 0000000000..f1b424510d --- /dev/null +++ b/ui/proguard-rules.pro @@ -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