У меня есть проект, который имеет несколько модулей.
В последние несколько дней я решил обновить проект, после обновления gradlew, libs я обнаружил, что мои тестовые команды перестали работать.
Я думаю, что это так. проблема с моим джакоко, не могу подтвердить.
./gradlew assemblePrdDebug testPrdDebug jacocoTestPrdDebugUnitTestReport sonarqube --stacktrace
./gradlew assemblePrdDebug testPrdDebug createDebugCoverageReport sonarqube --stacktrace
./gradlew clean test createDebugCoverageReport jacocoTestReport --info --stacktrace --warning-mode all
./gradlew jacocoCombinedTestReports
./gradlew tasks
./gradlew jacocoReport
./gradlew testVariantNameUnitTest --tests
./gradlew :data:connectedPrdDebugAndroidTest
./gradlew :common:testDebugUnitTest
./gradlew :data:connectedPrdDebugAndroidTest --stacktrace --info --scan
Ни одна из этих команд не работает, и у меня та же ошибка.
Если я использую ярлык ВЫПОЛНИТЬ ВСЕ ТЕСТЫ, все работает.
но проблема в том, что я использую конвейер и тесты нужно запускать из командной строки
https://scans.gradle.com/s/addpqorjoaaao/failure#1
Could not resolve all files for configuration ':classpath'.
> Could not resolve androidx.navigation:navigation-safe-args-gradle-plugin:2.6.0.
Required by:
project :
> No matching variant of androidx.navigation:navigation-safe-args-gradle-plugin:2.6.0 was found. The consumer was configured to find a library for use during runtime, compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.2' but:
- Variant 'apiElements' capability androidx.navigation:navigation-safe-args-gradle-plugin:2.6.0 declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.2')
- Variant 'runtimeElements' capability androidx.navigation:navigation-safe-args-gradle-plugin:2.6.0 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.2')
- Variant 'sourcesElements' capability androidx.navigation:navigation-safe-args-gradle-plugin:2.6.0 declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 11)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.2')
Exception
org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'canais-mobile-android'.
at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:84)
•••
Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':classpath'.
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.mapFailure(DefaultConfiguration.java:1769)
•••
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve androidx.navigation:navigation-safe-args-gradle-plugin:2.6.0.
Required by:
project :
Caused by: org.gradle.internal.component.NoMatchingConfigurationSelectionException: No matching variant of androidx.navigation:navigation-safe-args-gradle-plugin:2.6.0 was found. The consumer was configured to find a library for use during runtime, compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.2' but:
- Variant 'apiElements' capability androidx.navigation:navigation-safe-args-gradle-plugin:2.6.0 declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 11
- Other compatible attribute: ...
Подробнее здесь: https://stackoverflow.com/questions/784 ... ng-project