mirror of
https://github.com/bitwarden/android.git
synced 2026-04-29 20:38:41 -05:00
PM-31922: Remove deprecated Android block where possible (#6512)
This commit is contained in:
@@ -1,16 +1,20 @@
|
|||||||
|
import com.android.build.api.dsl.LibraryExtension
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.library)
|
alias(libs.plugins.android.library)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
configure<LibraryExtension> {
|
||||||
namespace = "com.bitwarden.annotation"
|
namespace = "com.bitwarden.annotation"
|
||||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
compileSdk {
|
||||||
|
version = release(libs.versions.compileSdk.get().toInt())
|
||||||
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk = libs.versions.minSdkBwa.get().toInt()
|
minSdk {
|
||||||
|
version = release(libs.versions.minSdkBwa.get().toInt())
|
||||||
|
}
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
consumerProguardFiles("consumer-rules.pro")
|
consumerProguardFiles("consumer-rules.pro")
|
||||||
}
|
}
|
||||||
@@ -36,6 +40,6 @@ android {
|
|||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
jvmTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
|
jvmTarget.set(JvmTarget.fromTarget(libs.versions.jvmTarget.get()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import com.android.build.gradle.internal.api.BaseVariantOutputImpl
|
import com.android.build.api.dsl.ApplicationExtension
|
||||||
|
import com.android.build.api.variant.impl.VariantOutputImpl
|
||||||
import com.android.utils.cxx.io.removeExtensionIfPresent
|
import com.android.utils.cxx.io.removeExtensionIfPresent
|
||||||
import com.google.firebase.crashlytics.buildtools.gradle.tasks.InjectMappingFileIdTask
|
import com.google.firebase.crashlytics.buildtools.gradle.tasks.InjectMappingFileIdTask
|
||||||
import com.google.firebase.crashlytics.buildtools.gradle.tasks.UploadMappingFileTask
|
import com.google.firebase.crashlytics.buildtools.gradle.tasks.UploadMappingFileTask
|
||||||
import com.google.gms.googleservices.GoogleServicesTask
|
import com.google.gms.googleservices.GoogleServicesTask
|
||||||
import dagger.hilt.android.plugin.util.capitalize
|
import org.gradle.kotlin.dsl.support.uppercaseFirstChar
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
import java.io.FileInputStream
|
import java.io.FileInputStream
|
||||||
import java.util.Properties
|
import java.util.Properties
|
||||||
@@ -42,27 +43,35 @@ val ciProperties = Properties().apply {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
base {
|
||||||
namespace = "com.x8bit.bitwarden"
|
// Set the base archive name for publishing purposes. This is used to derive the
|
||||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
// APK and AAB artifact names when uploading to Firebase and Play Store.
|
||||||
|
archivesName.set("com.x8bit.bitwarden")
|
||||||
|
}
|
||||||
|
|
||||||
room {
|
room {
|
||||||
schemaDirectory("$projectDir/schemas")
|
schemaDirectory("$projectDir/schemas")
|
||||||
|
}
|
||||||
|
|
||||||
|
configure<ApplicationExtension> {
|
||||||
|
namespace = "com.x8bit.bitwarden"
|
||||||
|
compileSdk {
|
||||||
|
version = release(libs.versions.compileSdk.get().toInt())
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "com.x8bit.bitwarden"
|
applicationId = "com.x8bit.bitwarden"
|
||||||
minSdk = libs.versions.minSdk.get().toInt()
|
minSdk {
|
||||||
targetSdk = libs.versions.targetSdk.get().toInt()
|
version = release(libs.versions.minSdk.get().toInt())
|
||||||
|
}
|
||||||
|
targetSdk {
|
||||||
|
version = release(libs.versions.targetSdk.get().toInt())
|
||||||
|
}
|
||||||
versionCode = libs.versions.appVersionCode.get().toInt()
|
versionCode = libs.versions.appVersionCode.get().toInt()
|
||||||
versionName = libs.versions.appVersionName.get()
|
versionName = libs.versions.appVersionName.get()
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
// Set the base archive name for publishing purposes. This is used to derive the APK and AAB
|
|
||||||
// artifact names when uploading to Firebase and Play Store.
|
|
||||||
base.archivesName = "com.x8bit.bitwarden"
|
|
||||||
|
|
||||||
buildConfigField(
|
buildConfigField(
|
||||||
type = "String",
|
type = "String",
|
||||||
name = "CI_INFO",
|
name = "CI_INFO",
|
||||||
@@ -140,39 +149,6 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
applicationVariants.all {
|
|
||||||
val bundlesDir = "${layout.buildDirectory.get()}/outputs/bundle"
|
|
||||||
outputs
|
|
||||||
.mapNotNull { it as? BaseVariantOutputImpl }
|
|
||||||
.forEach { output ->
|
|
||||||
val fileNameWithoutExtension = when (flavorName) {
|
|
||||||
"fdroid" -> "$applicationId-$flavorName"
|
|
||||||
"standard" -> "$applicationId"
|
|
||||||
else -> output.outputFileName.removeExtensionIfPresent(".apk")
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the APK output filename.
|
|
||||||
output.outputFileName = "$fileNameWithoutExtension.apk"
|
|
||||||
|
|
||||||
val variantName = name
|
|
||||||
val renameTaskName = "rename${variantName.capitalize()}AabFiles"
|
|
||||||
tasks.register(renameTaskName) {
|
|
||||||
group = "build"
|
|
||||||
description = "Renames the bundle files for $variantName variant"
|
|
||||||
doLast {
|
|
||||||
renameFile(
|
|
||||||
"$bundlesDir/$variantName/$namespace-$flavorName-${buildType.name}.aab",
|
|
||||||
"$fileNameWithoutExtension.aab",
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Force renaming task to execute after the variant is built.
|
|
||||||
tasks
|
|
||||||
.getByName("bundle${variantName.capitalize()}")
|
|
||||||
.finalizedBy(renameTaskName)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility(libs.versions.jvmTarget.get())
|
sourceCompatibility(libs.versions.jvmTarget.get())
|
||||||
targetCompatibility(libs.versions.jvmTarget.get())
|
targetCompatibility(libs.versions.jvmTarget.get())
|
||||||
@@ -199,9 +175,50 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
androidComponents {
|
||||||
|
onVariants { appVariant ->
|
||||||
|
val bundlesDir = "${layout.buildDirectory.get()}/outputs/bundle"
|
||||||
|
val applicationId = appVariant.applicationId.get()
|
||||||
|
val flavorName = appVariant.flavorName
|
||||||
|
val variantName = appVariant.name
|
||||||
|
val buildType = appVariant.buildType
|
||||||
|
appVariant
|
||||||
|
.outputs
|
||||||
|
.mapNotNull { it as? VariantOutputImpl }
|
||||||
|
.forEach { output ->
|
||||||
|
val fileNameWithoutExtension = when (flavorName) {
|
||||||
|
"fdroid" -> "$applicationId-$flavorName"
|
||||||
|
"standard" -> applicationId
|
||||||
|
else -> output.outputFileName.get().removeExtensionIfPresent(".apk")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the APK output filename.
|
||||||
|
output.outputFileName.set("$fileNameWithoutExtension.apk")
|
||||||
|
|
||||||
|
val renameTaskName = "rename${variantName.uppercaseFirstChar()}AabFiles"
|
||||||
|
tasks.register(renameTaskName) {
|
||||||
|
group = "build"
|
||||||
|
description = "Renames the bundle files for $variantName variant"
|
||||||
|
doLast {
|
||||||
|
val namespace = appVariant.namespace.get()
|
||||||
|
renameFile(
|
||||||
|
"$bundlesDir/$variantName/$namespace-$flavorName-$buildType.aab",
|
||||||
|
"$fileNameWithoutExtension.aab",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Force renaming task to execute after the variant is built.
|
||||||
|
val bundleTaskName = "bundle${variantName.uppercaseFirstChar()}"
|
||||||
|
tasks
|
||||||
|
.named { it == bundleTaskName }
|
||||||
|
.configureEach { finalizedBy(renameTaskName) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
jvmTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
|
jvmTarget.set(JvmTarget.fromTarget(libs.versions.jvmTarget.get()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import com.android.build.gradle.internal.api.BaseVariantOutputImpl
|
import com.android.build.api.dsl.ApplicationExtension
|
||||||
|
import com.android.build.api.variant.impl.VariantOutputImpl
|
||||||
import com.google.protobuf.gradle.proto
|
import com.google.protobuf.gradle.proto
|
||||||
import dagger.hilt.android.plugin.util.capitalize
|
import org.gradle.kotlin.dsl.support.uppercaseFirstChar
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
import java.io.FileInputStream
|
import java.io.FileInputStream
|
||||||
import java.util.Properties
|
import java.util.Properties
|
||||||
@@ -29,27 +30,35 @@ val ciProperties = Properties().apply {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
base {
|
||||||
namespace = "com.bitwarden.authenticator"
|
// Set the base archive name for publishing purposes. This is used to derive the
|
||||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
// APK and AAB artifact names when uploading to Firebase and Play Store.
|
||||||
|
archivesName.set("com.bitwarden.authenticator")
|
||||||
|
}
|
||||||
|
|
||||||
room {
|
room {
|
||||||
schemaDirectory("$projectDir/schemas")
|
schemaDirectory("$projectDir/schemas")
|
||||||
|
}
|
||||||
|
|
||||||
|
configure<ApplicationExtension> {
|
||||||
|
namespace = "com.bitwarden.authenticator"
|
||||||
|
compileSdk {
|
||||||
|
version = release(libs.versions.compileSdk.get().toInt())
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "com.bitwarden.authenticator"
|
applicationId = "com.bitwarden.authenticator"
|
||||||
minSdk = libs.versions.minSdkBwa.get().toInt()
|
minSdk {
|
||||||
targetSdk = libs.versions.targetSdk.get().toInt()
|
version = release(libs.versions.minSdkBwa.get().toInt())
|
||||||
|
}
|
||||||
|
targetSdk {
|
||||||
|
version = release(libs.versions.targetSdk.get().toInt())
|
||||||
|
}
|
||||||
versionCode = libs.versions.appVersionCode.get().toInt()
|
versionCode = libs.versions.appVersionCode.get().toInt()
|
||||||
versionName = libs.versions.appVersionName.get()
|
versionName = libs.versions.appVersionName.get()
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
// Set the base archive name for publishing purposes. This is used to derive the APK and AAB
|
|
||||||
// artifact names when uploading to Firebase and Play Store.
|
|
||||||
base.archivesName = "com.bitwarden.authenticator"
|
|
||||||
|
|
||||||
buildConfigField(
|
buildConfigField(
|
||||||
type = "String",
|
type = "String",
|
||||||
name = "CI_INFO",
|
name = "CI_INFO",
|
||||||
@@ -108,32 +117,6 @@ android {
|
|||||||
buildConfigField(type = "boolean", name = "HAS_DEBUG_MENU", value = "false")
|
buildConfigField(type = "boolean", name = "HAS_DEBUG_MENU", value = "false")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
applicationVariants.all {
|
|
||||||
val bundlesDir = "${layout.buildDirectory.get()}/outputs/bundle"
|
|
||||||
outputs
|
|
||||||
.mapNotNull { it as? BaseVariantOutputImpl }
|
|
||||||
.forEach { output ->
|
|
||||||
// Set the APK output filename.
|
|
||||||
output.outputFileName = "$applicationId.apk"
|
|
||||||
|
|
||||||
val variantName = name
|
|
||||||
val renameTaskName = "rename${variantName.capitalize()}AabFiles"
|
|
||||||
tasks.register(renameTaskName) {
|
|
||||||
group = "build"
|
|
||||||
description = "Renames the bundle files for $variantName variant"
|
|
||||||
doLast {
|
|
||||||
renameFile(
|
|
||||||
"$bundlesDir/$variantName/$namespace-${buildType.name}.aab",
|
|
||||||
"$applicationId.aab",
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Force renaming task to execute after the variant is built.
|
|
||||||
tasks
|
|
||||||
.getByName("bundle${variantName.capitalize()}")
|
|
||||||
.finalizedBy(renameTaskName)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility(libs.versions.jvmTarget.get())
|
sourceCompatibility(libs.versions.jvmTarget.get())
|
||||||
targetCompatibility(libs.versions.jvmTarget.get())
|
targetCompatibility(libs.versions.jvmTarget.get())
|
||||||
@@ -167,9 +150,43 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
androidComponents {
|
||||||
|
onVariants { appVariant ->
|
||||||
|
val bundlesDir = "${layout.buildDirectory.get()}/outputs/bundle"
|
||||||
|
val applicationId = appVariant.applicationId.get()
|
||||||
|
val variantName = appVariant.name
|
||||||
|
val buildType = appVariant.buildType
|
||||||
|
appVariant
|
||||||
|
.outputs
|
||||||
|
.mapNotNull { it as? VariantOutputImpl }
|
||||||
|
.forEach { output ->
|
||||||
|
// Set the APK output filename.
|
||||||
|
output.outputFileName.set("$applicationId.apk")
|
||||||
|
|
||||||
|
val renameTaskName = "rename${variantName.uppercaseFirstChar()}AabFiles"
|
||||||
|
tasks.register(renameTaskName) {
|
||||||
|
group = "build"
|
||||||
|
description = "Renames the bundle files for $variantName variant"
|
||||||
|
doLast {
|
||||||
|
val namespace = appVariant.namespace.get()
|
||||||
|
renameFile(
|
||||||
|
"$bundlesDir/$variantName/$namespace-$buildType.aab",
|
||||||
|
"$applicationId.aab",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Force renaming task to execute after the variant is built.
|
||||||
|
val bundleTaskName = "bundle${variantName.uppercaseFirstChar()}"
|
||||||
|
tasks
|
||||||
|
.named { it == bundleTaskName }
|
||||||
|
.configureEach { finalizedBy(renameTaskName) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
jvmTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
|
jvmTarget.set(JvmTarget.fromTarget(libs.versions.jvmTarget.get()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
import com.android.build.api.dsl.LibraryExtension
|
||||||
|
import com.android.build.gradle.tasks.BundleAar
|
||||||
|
import org.gradle.kotlin.dsl.support.uppercaseFirstChar
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
// For more info on versioning, see the README.
|
// For more info on versioning, see the README.
|
||||||
@@ -9,14 +12,18 @@ plugins {
|
|||||||
alias(libs.plugins.kotlin.serialization)
|
alias(libs.plugins.kotlin.serialization)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
configure<LibraryExtension> {
|
||||||
namespace = "com.bitwarden.authenticatorbridge"
|
namespace = "com.bitwarden.authenticatorbridge"
|
||||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
setVersion(version)
|
||||||
|
compileSdk {
|
||||||
|
version = release(libs.versions.compileSdk.get().toInt())
|
||||||
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// This min value is selected to accommodate known consumers
|
// This min value is selected to accommodate known consumers
|
||||||
minSdk = libs.versions.minSdkBwa.get().toInt()
|
minSdk {
|
||||||
|
version = release(libs.versions.minSdkBwa.get().toInt())
|
||||||
|
}
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
consumerProguardFiles("consumer-rules.pro")
|
consumerProguardFiles("consumer-rules.pro")
|
||||||
buildConfigField("String", "VERSION", "\"$version\"")
|
buildConfigField("String", "VERSION", "\"$version\"")
|
||||||
@@ -39,21 +46,23 @@ android {
|
|||||||
buildConfig = true
|
buildConfig = true
|
||||||
aidl = true
|
aidl = true
|
||||||
}
|
}
|
||||||
// Add version name to the output .aar file:
|
}
|
||||||
libraryVariants.all {
|
|
||||||
val variant = this
|
androidComponents {
|
||||||
outputs
|
onVariants { libVariant ->
|
||||||
.map { it as com.android.build.gradle.internal.api.BaseVariantOutputImpl }
|
val bundleTaskName = "bundle${libVariant.name.uppercaseFirstChar()}Aar"
|
||||||
.forEach { output ->
|
tasks
|
||||||
val outputFileName = "authenticatorbridge-$version-${variant.baseName}.aar"
|
.withType<BundleAar>()
|
||||||
output.outputFileName = outputFileName
|
.named { it == bundleTaskName }
|
||||||
|
.configureEach {
|
||||||
|
archiveFileName.set("authenticatorbridge-$version-${libVariant.name}.aar")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
jvmTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
|
jvmTarget.set(JvmTarget.fromTarget(libs.versions.jvmTarget.get()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import com.android.build.api.dsl.LibraryExtension
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
@@ -7,15 +8,18 @@ plugins {
|
|||||||
alias(libs.plugins.ksp)
|
alias(libs.plugins.ksp)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
configure<LibraryExtension> {
|
||||||
namespace = "com.bitwarden.core"
|
namespace = "com.bitwarden.core"
|
||||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
compileSdk {
|
||||||
|
version = release(libs.versions.compileSdk.get().toInt())
|
||||||
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// Set the minimum SDK version to the SDK version used by Authenticator, which is the lowest
|
// Set the minimum SDK version to the SDK version used by Authenticator, which is the lowest
|
||||||
// universally supported SDK version.
|
// universally supported SDK version.
|
||||||
minSdk = libs.versions.minSdkBwa.get().toInt()
|
minSdk {
|
||||||
|
version = release(libs.versions.minSdkBwa.get().toInt())
|
||||||
|
}
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
consumerProguardFiles("consumer-rules.pro")
|
consumerProguardFiles("consumer-rules.pro")
|
||||||
}
|
}
|
||||||
@@ -64,6 +68,6 @@ dependencies {
|
|||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
jvmTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
|
jvmTarget.set(JvmTarget.fromTarget(libs.versions.jvmTarget.get()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import com.android.build.api.dsl.LibraryExtension
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
@@ -7,13 +8,16 @@ plugins {
|
|||||||
alias(libs.plugins.kotlin.serialization)
|
alias(libs.plugins.kotlin.serialization)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
configure<LibraryExtension> {
|
||||||
namespace = "com.bitwarden.cxf"
|
namespace = "com.bitwarden.cxf"
|
||||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
compileSdk {
|
||||||
|
version = release(libs.versions.compileSdk.get().toInt())
|
||||||
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk = libs.versions.minSdkBwa.get().toInt()
|
minSdk {
|
||||||
|
version = release(libs.versions.minSdkBwa.get().toInt())
|
||||||
|
}
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
consumerProguardFiles("consumer-rules.pro")
|
consumerProguardFiles("consumer-rules.pro")
|
||||||
}
|
}
|
||||||
@@ -35,7 +39,7 @@ android {
|
|||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
jvmTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
|
jvmTarget.set(JvmTarget.fromTarget(libs.versions.jvmTarget.get()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import com.android.build.api.dsl.LibraryExtension
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
@@ -7,13 +8,16 @@ plugins {
|
|||||||
alias(libs.plugins.ksp)
|
alias(libs.plugins.ksp)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
configure<LibraryExtension> {
|
||||||
namespace = "com.bitwarden.data"
|
namespace = "com.bitwarden.data"
|
||||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
compileSdk {
|
||||||
|
version = release(libs.versions.compileSdk.get().toInt())
|
||||||
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk = libs.versions.minSdkBwa.get().toInt()
|
minSdk {
|
||||||
|
version = release(libs.versions.minSdkBwa.get().toInt())
|
||||||
|
}
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
consumerProguardFiles("consumer-rules.pro")
|
consumerProguardFiles("consumer-rules.pro")
|
||||||
}
|
}
|
||||||
@@ -39,7 +43,7 @@ android {
|
|||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
jvmTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
|
jvmTarget.set(JvmTarget.fromTarget(libs.versions.jvmTarget.get()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import com.android.build.api.dsl.LibraryExtension
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
@@ -6,13 +7,16 @@ plugins {
|
|||||||
alias(libs.plugins.ksp)
|
alias(libs.plugins.ksp)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
configure<LibraryExtension> {
|
||||||
namespace = "com.bitwarden.network"
|
namespace = "com.bitwarden.network"
|
||||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
compileSdk {
|
||||||
|
version = release(libs.versions.compileSdk.get().toInt())
|
||||||
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk = libs.versions.minSdkBwa.get().toInt()
|
minSdk {
|
||||||
|
version = release(libs.versions.minSdkBwa.get().toInt())
|
||||||
|
}
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
consumerProguardFiles("consumer-rules.pro")
|
consumerProguardFiles("consumer-rules.pro")
|
||||||
}
|
}
|
||||||
@@ -38,7 +42,7 @@ android {
|
|||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
jvmTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
|
jvmTarget.set(JvmTarget.fromTarget(libs.versions.jvmTarget.get()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import com.android.build.gradle.internal.api.BaseVariantOutputImpl
|
import com.android.build.api.dsl.ApplicationExtension
|
||||||
|
import com.android.build.api.variant.impl.VariantOutputImpl
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
@@ -10,15 +11,21 @@ plugins {
|
|||||||
alias(libs.plugins.ksp)
|
alias(libs.plugins.ksp)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
configure<ApplicationExtension> {
|
||||||
namespace = "com.bitwarden.testharness"
|
namespace = "com.bitwarden.testharness"
|
||||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
compileSdk {
|
||||||
|
version = release(libs.versions.compileSdk.get().toInt())
|
||||||
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "com.bitwarden.testharness"
|
applicationId = "com.bitwarden.testharness"
|
||||||
// API 28 - CredentialManager with Play Services support
|
// API 28 - CredentialManager with Play Services support
|
||||||
minSdk = libs.versions.minSdkBwa.get().toInt()
|
minSdk {
|
||||||
targetSdk = libs.versions.targetSdk.get().toInt()
|
version = release(libs.versions.minSdkBwa.get().toInt())
|
||||||
|
}
|
||||||
|
targetSdk {
|
||||||
|
version = release(libs.versions.targetSdk.get().toInt())
|
||||||
|
}
|
||||||
versionCode = libs.versions.appVersionCode.get().toInt()
|
versionCode = libs.versions.appVersionCode.get().toInt()
|
||||||
versionName = libs.versions.appVersionName.get()
|
versionName = libs.versions.appVersionName.get()
|
||||||
|
|
||||||
@@ -39,15 +46,6 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
applicationVariants.all {
|
|
||||||
outputs
|
|
||||||
.mapNotNull { it as? BaseVariantOutputImpl }
|
|
||||||
.forEach { output ->
|
|
||||||
// Set the APK output filename.
|
|
||||||
output.outputFileName = "$applicationId.apk"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
compose = true
|
compose = true
|
||||||
buildConfig = true
|
buildConfig = true
|
||||||
@@ -63,11 +61,23 @@ android {
|
|||||||
sourceCompatibility(libs.versions.jvmTarget.get())
|
sourceCompatibility(libs.versions.jvmTarget.get())
|
||||||
targetCompatibility(libs.versions.jvmTarget.get())
|
targetCompatibility(libs.versions.jvmTarget.get())
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
kotlin {
|
androidComponents {
|
||||||
compilerOptions {
|
onVariants { appVariant ->
|
||||||
jvmTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
|
appVariant
|
||||||
}
|
.outputs
|
||||||
|
.mapNotNull { it as? VariantOutputImpl }
|
||||||
|
.forEach { output ->
|
||||||
|
// Set the APK output filename.
|
||||||
|
output.outputFileName.set("${appVariant.applicationId.get()}.apk")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
compilerOptions {
|
||||||
|
jvmTarget.set(JvmTarget.fromTarget(libs.versions.jvmTarget.get()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import com.android.build.api.dsl.LibraryExtension
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
@@ -7,13 +8,16 @@ plugins {
|
|||||||
alias(libs.plugins.ksp)
|
alias(libs.plugins.ksp)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
configure<LibraryExtension> {
|
||||||
namespace = "com.bitwarden.ui"
|
namespace = "com.bitwarden.ui"
|
||||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
compileSdk {
|
||||||
|
version = release(libs.versions.compileSdk.get().toInt())
|
||||||
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk = libs.versions.minSdkBwa.get().toInt()
|
minSdk {
|
||||||
|
version = release(libs.versions.minSdkBwa.get().toInt())
|
||||||
|
}
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
consumerProguardFiles("consumer-rules.pro")
|
consumerProguardFiles("consumer-rules.pro")
|
||||||
}
|
}
|
||||||
@@ -109,7 +113,7 @@ dependencies {
|
|||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
jvmTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
|
jvmTarget.set(JvmTarget.fromTarget(libs.versions.jvmTarget.get()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user