Status Update
Comments
sl...@google.com <sl...@google.com> #2
Is this not a bug in AGP? It doesnt feel like an androidx issue.
ar...@gmail.com <ar...@gmail.com> #3
Probably yes, feel free to reroute or CC the right people. I was not 100% sure since the project uses the androidXMultiplatform
DSL, but looking at the DSL it simply forwards things to AGP.
sl...@google.com <sl...@google.com>
sl...@google.com <sl...@google.com>
nk...@google.com <nk...@google.com> #4
Do you have an example of what a broken consuming project looks like? which plugins are they applying?
ar...@gmail.com <ar...@gmail.com> #5
I've uploaded a sample project, to repro run: ./gradlew test
It is a simple Kotlin JVM project, it only uses plugins { kotlin("jvm") version "2.1.10" }
I was also able confirm that without AGP KMP (
nk...@google.com <nk...@google.com> #6
Looking at the Gradle metadata diff ("org.gradle.libraryelements": "jar"
? Should that be an aar
instead?
`
lu...@gmail.com <lu...@gmail.com> #7
yes, androidApiElements/runtimeElements variant publications should have aar value on the libraryelements attribute. What version of Gradle, AGP, KGP are you using in your library?
What's bizarre is that the compileClasspath is using the jvm vairant (in the test project you shared), it's only at runtime that it resolves the -android artifact of your library...
he...@gmail.com <he...@gmail.com> #8
It's very confusing, though why the android variant is chosen.
./gradlew dependencyInsight --configuration runtimeClasspath --dependency androidx.sqlite:sqlite:2.5.0-beta01
> Task :dependencyInsight
androidx.sqlite:sqlite:2.5.0-beta01
Variant androidRuntimeElements-published:
| Attribute Name | Provided | Requested |
|------------------------------------|--------------|--------------|
| org.gradle.status | release | |
| org.gradle.category | library | library |
| org.gradle.jvm.environment | android | standard-jvm |
| org.gradle.libraryelements | jar | jar |
| org.gradle.usage | java-runtime | java-runtime |
| org.jetbrains.kotlin.platform.type | jvm | jvm |
| org.gradle.dependency.bundling | | external |
| org.gradle.jvm.version | | 21 |
org.gradle.jvm.environment=standard-jvm is obviously requested and it doesn't match with the provided value for android. Looking at the jvmRuntimeElements from the diff you supplied of the gradle meta file, we see
{
"name": "jvmRuntimeElements-published",
"attributes": {
"org.gradle.category": "library",
"org.gradle.jvm.environment": "standard-jvm",
"org.gradle.usage": "java-runtime",
"org.jetbrains.kotlin.platform.type": "jvm"
},
"available-at": {
"url": "../../sqlite-jvm/2.5.0-beta01/sqlite-jvm-2.5.0-beta01.module",
"group": "androidx.sqlite",
"module": "sqlite-jvm",
"version": "2.5.0-beta01"
}
}
So every attribute in the jvmRuntimeElements matches the requested ones.
Description
What steps will reproduce the problem?
1. Update Espresso from 2.x to 3.0.0
2. Don't update `com.android.support.test.runner` from 0.5 to 1.0 because it's not working out of the box.
3. Observe that build fails because Espresso 3.0.0 can not be used with Test Runner 0.5 (unless you start hacking build process to force that)
How are you running your tests (via Android Studio, Gradle, adb, etc.)?
./gradlew connectedAndroidTest, Composer (
What is the expected output? What do you see instead?
Espresso should NOT depend on test runner. It's just a UI test library. It should not matter what test runner you use with Espresso.
It's like if AsserJ would depend on JUnit.