You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Failed to transform classes.jar (project :features:checkout-v2-data:cash-drawer:public) to match attributes {artifactType=android-classes, com.android.build.api.attributes.AgpVersionAttr=7.2.2, com.android.build.api.attributes.BuildTypeAttr=release, com.android.build.gradle.internal.attributes.VariantAttr=release, org.gradle.category=library, org.gradle.jvm.environment=android, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=androidJvm}.
> Execution failed for IdentityTransform: /Users/malcolmn/Development/android-register/features/checkout-v2-data/cash-drawer/public/build/intermediates/runtime_library_classes_jar/release/classes.jar.
> File/directory does not exist: /Users/malcolmn/Development/android-register/features/checkout-v2-data/cash-drawer/public/build/intermediates/runtime_library_classes_jar/release/classes.jar
It looks like DependencyParser is looking at RuntimeClasspath, but it seems like for our project and sub projects we are only generating CompileClasspath for certain modules. Should we update DependencyParser to look at other places for classes.jar, or change our build scripts to also generate the runtimeClasspath jars for each module?
The text was updated successfully, but these errors were encountered:
Hi @nathan3d It looks like within our own project, we are either creating a fat jar outside of where DependencyParser is looking or not generating the RuntimeClasspath classes.jar, instead using CompileClasspath. Is there a way to normalize this?
I'm not sure what the solution is yet, so far everything I've tried still results in generating the runtime classes.jar. Any way you can provide a sample project or more details on the setup?
I think what was happening was that our project's build never resolved any internal dependencies. I was able to fix this by removing the filter, but is it possible for ruler to enforce/generate runtimeClasspath dependencies in its own step?
fun Configuration.externalArtifactViewOf(
attrValue: String
): ArtifactView = incoming.artifactView { view ->
view.attributes.attribute(attributeKey, attrValue)
// If some dependency doesn't have the expected attribute, don't fail. Continue!
view.lenient(true)
// Only resolve external dependencies! Without this, all project dependencies will get _compiled_.
view.componentFilter { id -> id is ModuleComponentIdentifier }
}
Current behavior
Plugin cannot find classes.jar
Expected behavior
Plugin should be able to find classes.jar
Steps to reproduce
./gradlew analyzeReleaseBundle & ./gradlew analyzeDebugBundle
Versions
AGP = 7.2.2
Gradle = 7.5
Ruler = 1.4.0
Anything else?
It looks like DependencyParser is looking at RuntimeClasspath, but it seems like for our project and sub projects we are only generating CompileClasspath for certain modules. Should we update DependencyParser to look at other places for classes.jar, or change our build scripts to also generate the runtimeClasspath jars for each module?
The text was updated successfully, but these errors were encountered: