Kotlin code in srcs.zip not included in built jar
Created by: jbarr21
I'm generating some Kotlin code from a genrule and consuming it as a dependency in another Kotlin library, but the generated classes are not found.
This seems to be because in KotlincToJarStepFactory
, it only expands the source paths if a srcs zip file exists. The srcs zip path is properly added as the first in the list, but the PatternMatchers
for SRC_ZIP returns false because it relies on Files.getFileExtension
to compare against “src.zip”, but the bug is that getFileExtension
always only return the “zip” part of the file extension, so it’ll never match.