mirror of
https://github.com/florisboard/florisboard.git
synced 2024-09-20 03:52:18 +02:00
77 lines
2.1 KiB
Plaintext
77 lines
2.1 KiB
Plaintext
/*
|
|
* Copyright (C) 2022 Patrick Goldinger
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
plugins {
|
|
alias(libs.plugins.agp.test)
|
|
alias(libs.plugins.kotlin.android)
|
|
}
|
|
|
|
android {
|
|
namespace = "dev.patrickgold.florisboard.benchmark"
|
|
compileSdk = 34
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "1.8"
|
|
}
|
|
|
|
defaultConfig {
|
|
minSdk = 24
|
|
targetSdk = 34
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
sourceSets {
|
|
maybeCreate("main").apply {
|
|
java {
|
|
srcDirs("src/main/kotlin")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
// This benchmark buildType is used for benchmarking, and should function like your
|
|
// release build (for example, with minification on). It"s signed with a debug key
|
|
// for easy local/CI testing.
|
|
create("benchmark") {
|
|
isDebuggable = true
|
|
signingConfig = getByName("debug").signingConfig
|
|
matchingFallbacks += listOf("release")
|
|
}
|
|
}
|
|
|
|
targetProjectPath = ":app"
|
|
experimentalProperties["android.experimental.self-instrumenting"] = true
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.androidx.test.ext)
|
|
implementation(libs.androidx.test.espresso.core)
|
|
implementation(libs.androidx.test.uiautomator)
|
|
implementation(libs.androidx.benchmark.macro)
|
|
}
|
|
|
|
androidComponents {
|
|
beforeVariants(selector().all()) {
|
|
it.enable = it.buildType == "benchmark"
|
|
}
|
|
}
|