mirror of
https://github.com/bitwarden/android.git
synced 2026-03-09 03:33:36 -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
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.android.library)
|
||||
}
|
||||
|
||||
android {
|
||||
configure<LibraryExtension> {
|
||||
namespace = "com.bitwarden.annotation"
|
||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
||||
compileSdk {
|
||||
version = release(libs.versions.compileSdk.get().toInt())
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdk = libs.versions.minSdkBwa.get().toInt()
|
||||
|
||||
minSdk {
|
||||
version = release(libs.versions.minSdkBwa.get().toInt())
|
||||
}
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
@@ -36,6 +40,6 @@ android {
|
||||
|
||||
kotlin {
|
||||
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.google.firebase.crashlytics.buildtools.gradle.tasks.InjectMappingFileIdTask
|
||||
import com.google.firebase.crashlytics.buildtools.gradle.tasks.UploadMappingFileTask
|
||||
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 java.io.FileInputStream
|
||||
import java.util.Properties
|
||||
@@ -42,27 +43,35 @@ val ciProperties = Properties().apply {
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.x8bit.bitwarden"
|
||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
||||
base {
|
||||
// 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.
|
||||
archivesName.set("com.x8bit.bitwarden")
|
||||
}
|
||||
|
||||
room {
|
||||
schemaDirectory("$projectDir/schemas")
|
||||
room {
|
||||
schemaDirectory("$projectDir/schemas")
|
||||
}
|
||||
|
||||
configure<ApplicationExtension> {
|
||||
namespace = "com.x8bit.bitwarden"
|
||||
compileSdk {
|
||||
version = release(libs.versions.compileSdk.get().toInt())
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.x8bit.bitwarden"
|
||||
minSdk = libs.versions.minSdk.get().toInt()
|
||||
targetSdk = libs.versions.targetSdk.get().toInt()
|
||||
minSdk {
|
||||
version = release(libs.versions.minSdk.get().toInt())
|
||||
}
|
||||
targetSdk {
|
||||
version = release(libs.versions.targetSdk.get().toInt())
|
||||
}
|
||||
versionCode = libs.versions.appVersionCode.get().toInt()
|
||||
versionName = libs.versions.appVersionName.get()
|
||||
|
||||
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(
|
||||
type = "String",
|
||||
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 {
|
||||
sourceCompatibility(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 {
|
||||
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 dagger.hilt.android.plugin.util.capitalize
|
||||
import org.gradle.kotlin.dsl.support.uppercaseFirstChar
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import java.io.FileInputStream
|
||||
import java.util.Properties
|
||||
@@ -29,27 +30,35 @@ val ciProperties = Properties().apply {
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.bitwarden.authenticator"
|
||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
||||
base {
|
||||
// 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.
|
||||
archivesName.set("com.bitwarden.authenticator")
|
||||
}
|
||||
|
||||
room {
|
||||
schemaDirectory("$projectDir/schemas")
|
||||
room {
|
||||
schemaDirectory("$projectDir/schemas")
|
||||
}
|
||||
|
||||
configure<ApplicationExtension> {
|
||||
namespace = "com.bitwarden.authenticator"
|
||||
compileSdk {
|
||||
version = release(libs.versions.compileSdk.get().toInt())
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.bitwarden.authenticator"
|
||||
minSdk = libs.versions.minSdkBwa.get().toInt()
|
||||
targetSdk = libs.versions.targetSdk.get().toInt()
|
||||
minSdk {
|
||||
version = release(libs.versions.minSdkBwa.get().toInt())
|
||||
}
|
||||
targetSdk {
|
||||
version = release(libs.versions.targetSdk.get().toInt())
|
||||
}
|
||||
versionCode = libs.versions.appVersionCode.get().toInt()
|
||||
versionName = libs.versions.appVersionName.get()
|
||||
|
||||
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(
|
||||
type = "String",
|
||||
name = "CI_INFO",
|
||||
@@ -108,32 +117,6 @@ android {
|
||||
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 {
|
||||
sourceCompatibility(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 {
|
||||
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
|
||||
|
||||
// For more info on versioning, see the README.
|
||||
@@ -9,14 +12,18 @@ plugins {
|
||||
alias(libs.plugins.kotlin.serialization)
|
||||
}
|
||||
|
||||
android {
|
||||
configure<LibraryExtension> {
|
||||
namespace = "com.bitwarden.authenticatorbridge"
|
||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
||||
setVersion(version)
|
||||
compileSdk {
|
||||
version = release(libs.versions.compileSdk.get().toInt())
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// 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"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
buildConfigField("String", "VERSION", "\"$version\"")
|
||||
@@ -39,21 +46,23 @@ android {
|
||||
buildConfig = true
|
||||
aidl = true
|
||||
}
|
||||
// Add version name to the output .aar file:
|
||||
libraryVariants.all {
|
||||
val variant = this
|
||||
outputs
|
||||
.map { it as com.android.build.gradle.internal.api.BaseVariantOutputImpl }
|
||||
.forEach { output ->
|
||||
val outputFileName = "authenticatorbridge-$version-${variant.baseName}.aar"
|
||||
output.outputFileName = outputFileName
|
||||
}
|
||||
|
||||
androidComponents {
|
||||
onVariants { libVariant ->
|
||||
val bundleTaskName = "bundle${libVariant.name.uppercaseFirstChar()}Aar"
|
||||
tasks
|
||||
.withType<BundleAar>()
|
||||
.named { it == bundleTaskName }
|
||||
.configureEach {
|
||||
archiveFileName.set("authenticatorbridge-$version-${libVariant.name}.aar")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
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
|
||||
|
||||
plugins {
|
||||
@@ -7,15 +8,18 @@ plugins {
|
||||
alias(libs.plugins.ksp)
|
||||
}
|
||||
|
||||
android {
|
||||
configure<LibraryExtension> {
|
||||
namespace = "com.bitwarden.core"
|
||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
||||
compileSdk {
|
||||
version = release(libs.versions.compileSdk.get().toInt())
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// Set the minimum SDK version to the SDK version used by Authenticator, which is the lowest
|
||||
// universally supported SDK version.
|
||||
minSdk = libs.versions.minSdkBwa.get().toInt()
|
||||
|
||||
minSdk {
|
||||
version = release(libs.versions.minSdkBwa.get().toInt())
|
||||
}
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
@@ -64,6 +68,6 @@ dependencies {
|
||||
|
||||
kotlin {
|
||||
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
|
||||
|
||||
plugins {
|
||||
@@ -7,13 +8,16 @@ plugins {
|
||||
alias(libs.plugins.kotlin.serialization)
|
||||
}
|
||||
|
||||
android {
|
||||
configure<LibraryExtension> {
|
||||
namespace = "com.bitwarden.cxf"
|
||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
||||
compileSdk {
|
||||
version = release(libs.versions.compileSdk.get().toInt())
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdk = libs.versions.minSdkBwa.get().toInt()
|
||||
|
||||
minSdk {
|
||||
version = release(libs.versions.minSdkBwa.get().toInt())
|
||||
}
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
@@ -35,7 +39,7 @@ android {
|
||||
|
||||
kotlin {
|
||||
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
|
||||
|
||||
plugins {
|
||||
@@ -7,13 +8,16 @@ plugins {
|
||||
alias(libs.plugins.ksp)
|
||||
}
|
||||
|
||||
android {
|
||||
configure<LibraryExtension> {
|
||||
namespace = "com.bitwarden.data"
|
||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
||||
compileSdk {
|
||||
version = release(libs.versions.compileSdk.get().toInt())
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdk = libs.versions.minSdkBwa.get().toInt()
|
||||
|
||||
minSdk {
|
||||
version = release(libs.versions.minSdkBwa.get().toInt())
|
||||
}
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
@@ -39,7 +43,7 @@ android {
|
||||
|
||||
kotlin {
|
||||
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
|
||||
|
||||
plugins {
|
||||
@@ -6,13 +7,16 @@ plugins {
|
||||
alias(libs.plugins.ksp)
|
||||
}
|
||||
|
||||
android {
|
||||
configure<LibraryExtension> {
|
||||
namespace = "com.bitwarden.network"
|
||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
||||
compileSdk {
|
||||
version = release(libs.versions.compileSdk.get().toInt())
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdk = libs.versions.minSdkBwa.get().toInt()
|
||||
|
||||
minSdk {
|
||||
version = release(libs.versions.minSdkBwa.get().toInt())
|
||||
}
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
@@ -38,7 +42,7 @@ android {
|
||||
|
||||
kotlin {
|
||||
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
|
||||
|
||||
plugins {
|
||||
@@ -10,15 +11,21 @@ plugins {
|
||||
alias(libs.plugins.ksp)
|
||||
}
|
||||
|
||||
android {
|
||||
configure<ApplicationExtension> {
|
||||
namespace = "com.bitwarden.testharness"
|
||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
||||
compileSdk {
|
||||
version = release(libs.versions.compileSdk.get().toInt())
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.bitwarden.testharness"
|
||||
// API 28 - CredentialManager with Play Services support
|
||||
minSdk = libs.versions.minSdkBwa.get().toInt()
|
||||
targetSdk = libs.versions.targetSdk.get().toInt()
|
||||
minSdk {
|
||||
version = release(libs.versions.minSdkBwa.get().toInt())
|
||||
}
|
||||
targetSdk {
|
||||
version = release(libs.versions.targetSdk.get().toInt())
|
||||
}
|
||||
versionCode = libs.versions.appVersionCode.get().toInt()
|
||||
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 {
|
||||
compose = true
|
||||
buildConfig = true
|
||||
@@ -63,11 +61,23 @@ android {
|
||||
sourceCompatibility(libs.versions.jvmTarget.get())
|
||||
targetCompatibility(libs.versions.jvmTarget.get())
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
compilerOptions {
|
||||
jvmTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
|
||||
}
|
||||
androidComponents {
|
||||
onVariants { appVariant ->
|
||||
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
|
||||
|
||||
plugins {
|
||||
@@ -7,13 +8,16 @@ plugins {
|
||||
alias(libs.plugins.ksp)
|
||||
}
|
||||
|
||||
android {
|
||||
configure<LibraryExtension> {
|
||||
namespace = "com.bitwarden.ui"
|
||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
||||
compileSdk {
|
||||
version = release(libs.versions.compileSdk.get().toInt())
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdk = libs.versions.minSdkBwa.get().toInt()
|
||||
|
||||
minSdk {
|
||||
version = release(libs.versions.minSdkBwa.get().toInt())
|
||||
}
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
@@ -109,7 +113,7 @@ dependencies {
|
||||
|
||||
kotlin {
|
||||
compilerOptions {
|
||||
jvmTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
|
||||
jvmTarget.set(JvmTarget.fromTarget(libs.versions.jvmTarget.get()))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user