mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 18:47:03 +05:30
fix(build-logic): fix benchmark target/compile SDK
This commit is contained in:
parent
0da964e790
commit
5124f27b81
2 changed files with 13 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
||||||
@file:Suppress("DSL_SCOPE_VIOLATION")
|
@file:Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.test)
|
alias(libs.plugins.android.test)
|
||||||
|
|
|
@ -15,14 +15,20 @@ private const val SLIM_TESTS_PROPERTY = "slimTests"
|
||||||
|
|
||||||
@Suppress("UnstableApiUsage")
|
@Suppress("UnstableApiUsage")
|
||||||
class AndroidCommonPlugin : Plugin<Project> {
|
class AndroidCommonPlugin : Plugin<Project> {
|
||||||
|
|
||||||
|
private companion object {
|
||||||
|
const val COMPILE_SDK = 33
|
||||||
|
const val MIN_SDK = 26
|
||||||
|
const val TARGET_SDK = 33
|
||||||
|
}
|
||||||
override fun apply(project: Project) {
|
override fun apply(project: Project) {
|
||||||
project.configureSlimTests()
|
project.configureSlimTests()
|
||||||
project.pluginManager.apply(AndroidCacheFixPlugin::class)
|
project.pluginManager.apply(AndroidCacheFixPlugin::class)
|
||||||
project.extensions.findByType<TestedExtension>()?.run {
|
project.extensions.findByType<TestedExtension>()?.run {
|
||||||
setCompileSdkVersion(33)
|
compileSdkVersion(COMPILE_SDK)
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk = 26
|
minSdk = MIN_SDK
|
||||||
targetSdk = 33
|
targetSdk = TARGET_SDK
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
@ -51,10 +57,10 @@ class AndroidCommonPlugin : Plugin<Project> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
project.extensions.findByType<TestExtension>()?.run {
|
project.extensions.findByType<TestExtension>()?.run {
|
||||||
compileSdk = 32
|
compileSdk = COMPILE_SDK
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk = 26
|
minSdk = MIN_SDK
|
||||||
targetSdk = 32
|
targetSdk = TARGET_SDK
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility = JavaVersion.VERSION_11
|
sourceCompatibility = JavaVersion.VERSION_11
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue