53 lines
1.3 KiB
Kotlin
53 lines
1.3 KiB
Kotlin
plugins {
|
|
alias(libs.plugins.android.test)
|
|
alias(libs.plugins.kotlin.android)
|
|
alias(libs.plugins.baselineprofile)
|
|
}
|
|
|
|
android {
|
|
namespace = "cc.n0th1ng.baselineprofile"
|
|
compileSdk = 36
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "11"
|
|
}
|
|
|
|
defaultConfig {
|
|
minSdk = 28
|
|
targetSdk = 36
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
targetProjectPath = ":app"
|
|
|
|
}
|
|
|
|
// This is the configuration block for the Baseline Profile plugin.
|
|
// You can specify to run the generators on a managed devices or connected devices.
|
|
baselineProfile {
|
|
useConnectedDevices = true
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.androidx.junit)
|
|
implementation(libs.androidx.espresso.core)
|
|
implementation(libs.androidx.uiautomator)
|
|
implementation(libs.androidx.benchmark.macro.junit4)
|
|
implementation(libs.androidx.ui.test.junit4)
|
|
}
|
|
|
|
androidComponents {
|
|
onVariants { v ->
|
|
val artifactsLoader = v.artifacts.getBuiltArtifactsLoader()
|
|
v.instrumentationRunnerArguments.put(
|
|
"targetAppId",
|
|
v.testedApks.map { artifactsLoader.load(it)?.applicationId }
|
|
)
|
|
}
|
|
} |