2

I need to add one custom task as per this answer and it works completely fine in case of a sample project I have created, but in my main project I am getting error even when I try to clean the project. In my main project, error seems like Kotlin Multiplatform Module is not able to build and produce a jar file. Please find the error below

A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
   > Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
      > Failed to transform KotlinMultiplatformModule.jar (project :KotlinMultiplatformModule) to match attributes {artifactType=android-filtered-proguard-rules, codeShrinker=R8, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime, org.jetbrains.kotlin.localToProject=public, org.jetbrains.kotlin.platform.type=jvm}.
         > Execution failed for JetifyTransform: path_to_module/build/libs/KotlinMultiplatformModule.jar.
            > Transform's input file does not exist: /path_to_module/build/libs/KotlinMultiplatformModule.jar. (See https://issuetracker.google.com/issues/158753935)
  • Please note I have replaced my Kotlin Multiplatform module name. Do I need to add some other task to get the jar build first ? Or I might be completely out of the context here.
Phil Dukhov
  • 67,741
  • 15
  • 184
  • 220
R Jin
  • 21
  • 2
  • Did you have a look at the issue linked in the error, https://issuetracker.google.com/issues/158753935? Look also at this one: https://issuetracker.google.com/issues/184622491 – shadowsheep Jan 19 '22 at 20:54
  • @shadowsheep Yes, I have checked both the links and tested out those as well, solution provided in the links did not work for me. Also, I think it is not related to jetifier usage , as without the custom gradle task, my project builds successfully. So seems like some conflict with Multiplatform module when the task is added to the app gradle file – R Jin Jan 20 '22 at 06:31

0 Answers0