blob: f8f9864cede5780610712a8939d38765bf16e8d9 [file]
/*
* Copyright 2026 The Android Open Source Project
*
* 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.
*/
import androidx.build.SoftwareType
plugins {
id("AndroidXPlugin")
id("com.android.library")
id("AndroidXComposePlugin")
}
androidx {
name = "Remote Compose Testing"
type = SoftwareType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS
inceptionYear = "2026"
description = "Provides testing utilities for RemoteCompose"
enableRobolectric()
addGoldenImageAssets()
}
android {
namespace = "androidx.compose.remote.testing"
compileSdk { version = release(35) }
defaultConfig {
minSdk { version = release(26) }
}
}
dependencies {
implementation(libs.junit)
implementation(libs.testRunner)
implementation("androidx.compose.runtime:runtime:1.11.0")
implementation("androidx.compose.foundation:foundation:1.11.0")
implementation("androidx.compose.ui:ui:1.11.0")
implementation("androidx.compose.ui:ui-test-junit4:1.11.0")
implementation("androidx.compose.ui:ui-test:1.11.0")
implementation(project(":compose:remote:remote-core"))
implementation(project(":compose:remote:remote-creation"))
implementation(project(":compose:remote:remote-creation-core"))
implementation(project(":compose:remote:remote-creation-compose"))
implementation(project(":compose:remote:remote-player-core"))
implementation(project(":compose:remote:remote-player-view"))
implementation(project(":compose:remote:remote-player-compose"))
testImplementation(libs.truth)
testImplementation(libs.testCoreKtx)
testImplementation(libs.kotlinCoroutinesTest)
testImplementation(libs.robolectric)
testImplementation(project(":test:screenshot:screenshot"))
androidTestImplementation(libs.kotlinCoroutinesTest)
androidTestImplementation(libs.testExtJunit)
androidTestImplementation(libs.testRules)
androidTestImplementation(libs.junit)
androidTestImplementation(libs.truth)
androidTestImplementation(libs.kotlinTest)
androidTestImplementation(libs.testRunner)
androidTestImplementation(project(":compose:test-utils"))
androidTestImplementation(project(":test:uiautomator:uiautomator"))
}
def addLocalGoldenImageAssets() {
def subdirectory = project.path.replace(":", "/")
android.sourceSets.test.assets.srcDirs += files(new File(project.rootDir, "../../golden$subdirectory"))
}
addLocalGoldenImageAssets()