How does the Kotlin Android plugin get the transfo...
# gradle
a
How does the Kotlin Android plugin get the transformed Android JARs for the KotlinCompile task? When I amend the compile task I can see the transformed JARs printed in the logs, not the AARs.
Copy code
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
  id("com.android.library") version "4.2.2"
  kotlin("android") version "1.8.10"
}

tasks.withType<KotlinCompile>().configureEach {
  doLast {
    println("libraries.asPath: ${libraries.asPath.split(":").joinToString("\n")}")
  }
}
this prints a lot of files, but notably the transformed JARs, not the AARs
Copy code
$GRADLE_HOME/caches/transforms-3/ab9756f20481c6101ac49908053f72a3/transformed/appcompat-1.1.0-api.jar
$GRADLE_HOME/caches/transforms-3/59413dd188b193d516451e7f62c30492/transformed/fragment-1.1.0-api.jar
$GRADLE_HOME/caches/transforms-3/2a940a2364aecaea01565c23952c7c2d/transformed/appcompat-resources-1.1.0-api.jar
...
When I try and fetch the transformed JARs via a Configuration, I can’t seem to get them - only the AARs. What am I missing?
I thought I found where the Kotlin Android plugin is fetching the JARs https://github.com/JetBrains/kotlin/blob/v1.8.21/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/android/AndroidProjectHandler.kt#L294-L301 but when I tried to do the same thing, I still only get the AARs, or nothing at all