Support Kotlin in Robolectric test
Currently, Robolectric test written in Kotlin may not run, especially when shards are in used, for example SettingsRoboTests has 10 shards. This is because Robolectric test currently only recognize java files, adding kt files to fix. Rename current uniqueSrcFiles to uniqueJavaFiles, and compiledJavaSrcs to uniqueSrcFiles. uniqueSrcFiles will contains both Java and Kotlin files. Note: android.FirstUniquePaths cannot be used, seems the behavior is different and cause build error. Bug: 252355400 Test: cd build/soong && mm Test: m RunSettingsRoboTests with Kotlin tests Change-Id: Id530ae4dcabffe01a06f44fe4234ffc67b73a601
Loading
Please register or sign in to comment