mirror of
https://github.com/bitwarden/android.git
synced 2024-12-03 11:44:25 +03:00
BITAU-96 Setup Bridge SDK (#3857)
This commit is contained in:
parent
1dd19a8b2d
commit
de48bb37d7
11 changed files with 161 additions and 0 deletions
1
bridge/.gitignore
vendored
Normal file
1
bridge/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/build
|
8
bridge/CHANGELOG.md
Normal file
8
bridge/CHANGELOG.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
v0.1.0 (pending)
|
||||
--------
|
||||
|
||||
### API Changes
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
### Bug Fixes
|
36
bridge/CHANGELOG_FORMAT.MD
Normal file
36
bridge/CHANGELOG_FORMAT.MD
Normal file
|
@ -0,0 +1,36 @@
|
|||
# CHANGELOG Format
|
||||
|
||||
## Contents
|
||||
|
||||
* [Template](#template)
|
||||
* [Sections](#sections)
|
||||
|
||||
## Template
|
||||
|
||||
Each new version of the SDK should be accompanied by a new `CHANGELOG` entry with the following template:
|
||||
|
||||
```
|
||||
vX.Y.0 (pending)
|
||||
--------
|
||||
|
||||
### API Changes
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
```
|
||||
|
||||
The `(pending)` label, as well as any unused sections, should be removed prior to creating a release.
|
||||
|
||||
## Sections
|
||||
|
||||
One or more `CHANGELOG` entries should be added for each PR that makes a change that either adds / updates the exposed API of the SDK or changes code internally in a way that is detectable as a behavior change by external consumers. These entries should fall into one of the following sections:
|
||||
|
||||
- **API Changes**: Any update to existing code that affects the exposed API or behavior of the SDK in a backwards-compatible way should be included in this section.
|
||||
|
||||
- **Breaking Changes**: Any code introduced in a **backwards-incompatible** manner that could in principle affect compilation of existing code should be included in this section. Examples of this include changing return types, changing function / constructor parameter lists, and changing function / class names. Each entry in this list should include detailed instructions where necessary for how a caller should address any related compilation issues.
|
||||
|
||||
- **Bug Fixes**: Any update that is performed in order to fix a known bug should be included in this section.
|
||||
|
||||
If an PR exhibits multiple kinds of changes then there should be multiple corresponding entries.
|
36
bridge/README.md
Normal file
36
bridge/README.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Bitwarden Native Bridge SDK
|
||||
|
||||
## Contents
|
||||
|
||||
- [Compatibility](#compatibility)
|
||||
- [Versioning](#versioning)
|
||||
|
||||
## Other Documents
|
||||
|
||||
- [Changelog](CHANGELOG.md)
|
||||
- [Changelog Format Guide](CHANGELOG_FORMAT.MD)
|
||||
|
||||
## Compatibility
|
||||
|
||||
- **Minimum SDK**: 28
|
||||
- **Target SDK**: 34
|
||||
|
||||
## Versioning
|
||||
This repository conforms to the following versioning convention:
|
||||
|
||||
**v[MAJOR].[MINOR].[PATCH]**
|
||||
|
||||
```
|
||||
where [RELEASE] is incremented to represent major milestones that indicate a significant change in the library.
|
||||
|
||||
[MINOR] is incremented when any standard changes (breaking or otherwise) are introduced to the library.
|
||||
|
||||
[PATCH] is incremented when a hot-fix patch is required to an existing minor
|
||||
release due to a bug introduced in that release.
|
||||
```
|
||||
|
||||
Some things to note:
|
||||
|
||||
- All updates should have a corresponding `CHANGELOG.md` entry that at a high-level describes what is being newly introduced in it. For more info, see [Changelog Format Guide](CHANGELOG_FORMAT.MD)
|
||||
|
||||
- When incrementing a level any lower-levels should always reset to 0.
|
52
bridge/build.gradle.kts
Normal file
52
bridge/build.gradle.kts
Normal file
|
@ -0,0 +1,52 @@
|
|||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
// For more info on versioning, see the README.
|
||||
val version = "0.1.0"
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
alias(libs.plugins.kotlin.parcelize)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.bitwarden.bridge"
|
||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
||||
|
||||
defaultConfig {
|
||||
// This min value is selected to accommodate known consumers
|
||||
minSdk = 28
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
buildConfigField("String", "VERSION", "\"$version\"")
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility(libs.versions.jvmTarget.get())
|
||||
targetCompatibility(libs.versions.jvmTarget.get())
|
||||
}
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
aidl = true
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.fromTarget(libs.versions.jvmTarget.get()))
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(libs.androidx.core.ktx)
|
||||
}
|
0
bridge/consumer-rules.pro
Normal file
0
bridge/consumer-rules.pro
Normal file
21
bridge/proguard-rules.pro
vendored
Normal file
21
bridge/proguard-rules.pro
vendored
Normal 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
|
4
bridge/src/main/AndroidManifest.xml
Normal file
4
bridge/src/main/AndroidManifest.xml
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
</manifest>
|
|
@ -1,5 +1,6 @@
|
|||
plugins {
|
||||
alias(libs.plugins.android.application) apply false
|
||||
alias(libs.plugins.android.library) apply false
|
||||
alias(libs.plugins.hilt) apply false
|
||||
alias(libs.plugins.kotlin.android) apply false
|
||||
alias(libs.plugins.kotlin.compose.compiler) apply false
|
||||
|
|
|
@ -113,6 +113,7 @@ zxing-zxing-core = { module = "com.google.zxing:core", version.ref = "zxing" }
|
|||
|
||||
[plugins]
|
||||
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
|
||||
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
|
||||
crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "crashlytics" }
|
||||
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
|
||||
google-services = { id = "com.google.gms.google-services", version.ref = "googleServices" }
|
||||
|
|
|
@ -46,3 +46,4 @@ buildCache {
|
|||
|
||||
rootProject.name = "Bitwarden"
|
||||
include(":app")
|
||||
include(":bridge")
|
||||
|
|
Loading…
Reference in a new issue