-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
I have created a separated gradle file in my project to setup this plugin in all my modules, as suggested here.
with-firebase.gradle
apply plugin: 'firebase.test.lab'
buildscript {
repositories {
google()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.android.tools.build:gradle:${versions.androidToolsBuildGradle}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "firebase.test.lab:plugin:${versions.firebaseTestLab}"
}
}
firebaseTestLab {
keyFile = project.rootProject.file("config/service-account.json")
googleProjectId = "my-project-id" // You can find it on https://console.cloud.google.com/home
devices {
samsungTabletPhysicalDevice {
deviceIds = ["gts4lltevzw"]
androidApiLevels = [28]
isUseOrchestrator = true // I recommend using the orchestrator, so that you ensure that all tests will be run
}
}
}
Then I add this line in the build.gradle of my modules:
apply from: "$rootProject.projectDir/tools/with-firebase.gradle"
This works perfectly.
But now I want to force the orientation to LANDSCAPE.
So I changed the device configuration to:
devices {
samsungTabletPhysicalDevice {
deviceIds = ["gts4lltevzw"]
androidApiLevels = [28]
screenOrientations = [com.appunite.firebasetestlabplugin.model.ScreenOrientation.LANDSCAPE]
isUseOrchestrator = true // I recommend using the orchestrator, so that you ensure that all tests will be run
}
}
But now I get the following error in my pipeline:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':features:cockpit:firebaseTestLabExecuteDebugInstrumentationSamsungTabletPhysicalDeviceDebug'.
> class java.lang.Class cannot be cast to class com.appunite.firebasetestlabplugin.model.ScreenOrientation (java.lang.Class is in module java.base of loader 'bootstrap'; com.appunite.firebasetestlabplugin.model.ScreenOrientation is in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @45d82a93)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org/
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
BUILD FAILED in 6m 34s
Any idea why?
Metadata
Metadata
Assignees
Labels
No labels