AndroidX is observing some build failures involving generated .kt files remaining in the build directory after the corresponding .proto files get deleted.
Is it possible for these .kt files to be deleted automatically during the build?
A build was run and a .kt file was generated atout/androidx/benchmark/benchmark-macro/build/generated/source/wire/androidx/benchmark/macro/protos/TestProto.kt:30
The subsequent Gradle build does not delete the leftover .kt files in the build directory, failing with:
Detected these failing tasks: [':benchmark:benchmark-macro:generateApi']
> Task :benchmark:benchmark-macro:generateApi
../../../../out/androidx/benchmark/benchmark-macro/build/generated/source/wire/androidx/benchmark/macro/protos/TestProto.kt:30: error: Must avoid boxed primitives (`java.lang.Long`) [AutoBoxing]
../../../../out/androidx/benchmark/benchmark-macro/build/generated/source/wire/androidx/benchmark/macro/protos/TestProto.kt:67: error: Must avoid boxed primitives (`java.lang.Long`) [AutoBoxing]
../../../../out/androidx/benchmark/benchmark-macro/build/generated/source/wire/androidx/benchmark/macro/protos/TestProto.kt:67: error: A Kotlin method with default parameter values should be annotated with @JvmOverloads for better Java interoperability; see https://android.github.io/kotlin-guides/interop.html#function-overloads-for-defaults [MissingJvmstatic]
../../../../out/androidx/benchmark/benchmark-macro/build/generated/source/wire/androidx/benchmark/macro/protos/TestProto.kt:30: error: Must avoid boxed primitives (`java.lang.Long`) [AutoBoxing]
> Task :benchmark:benchmark-macro:generateApi
Your change has API lint issues. Fix the code according to the messages above.
If a check is broken, suppress it in code in Kotlin with @Suppress("id")/@get:Suppress("id")
and in Java with @SuppressWarnings("id") and file bug to
https://issuetracker.google.com/issues/new?component=739152&template=1344623
If you are doing a refactoring or suppression above does not work, use ./gradlew updateApiLintBaseline
Could the generated sources be removed when the corresponding .proto files are removed?
AndroidX is observing some build failures involving generated .kt files remaining in the build directory after the corresponding .proto files get deleted.
Is it possible for these .kt files to be deleted automatically during the build?
In particular:
out/androidx/benchmark/benchmark-macro/build/generated/source/wire/androidx/benchmark/macro/protos/TestProto.kt:30
Could the generated sources be removed when the corresponding .proto files are removed?
Thanks!