diff --git a/scripts/src/java/org/oppia/android/scripts/ci/RetrieveChangedFilesTestTargets.kt b/scripts/src/java/org/oppia/android/scripts/ci/RetrieveChangedFilesTestTargets.kt index ab0e1b29b1b..c6de06476aa 100644 --- a/scripts/src/java/org/oppia/android/scripts/ci/RetrieveChangedFilesTestTargets.kt +++ b/scripts/src/java/org/oppia/android/scripts/ci/RetrieveChangedFilesTestTargets.kt @@ -52,20 +52,21 @@ fun main(args: Array) { CommandExecutorImpl( scriptBgDispatcher, processTimeout = 5, processTimeoutUnit = TimeUnit.MINUTES ) - } - val bazelClient = BazelClient(rootDirectory, commandExecutor) + val bazelClient = BazelClient(rootDirectory, commandExecutor) - val changedFilesBucket = - ChangedFilesBucket.getDefaultInstance().mergeFromCompressedBase64(protoBase64) - bucketNameOutputFile.printWriter().use { writer -> - writer.println(changedFilesBucket.cacheBucketName) - } + val changedFilesBucket = + ChangedFilesBucket.getDefaultInstance().mergeFromCompressedBase64(protoBase64) + bucketNameOutputFile.printWriter().use { writer -> + writer.println(changedFilesBucket.cacheBucketName) + } + + val changedFilesTestTargets = bazelClient.retrieveBazelTargets(changedFilesBucket.changedFilesList) + println("Changed Files Test Targets: $changedFilesTestTargets") - val changedFilesTestTargets = bazelClient.retrieveBazelTargets(changedFilesBucket.changedFilesList) - println("Changed Files Test Targets: $changedFilesTestTargets") + fileTestTargetsListOutputFile.printWriter().use { writer -> + writer.println(changedFilesTestTargets.joinToString(separator = " ")) + } - fileTestTargetsListOutputFile.printWriter().use { writer -> - writer.println(changedFilesTestTargets.joinToString(separator = " ")) } }