summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah Chu <hanchu@google.com>2019-10-31 12:37:31 -0700
committerHannah Chu <hanchu@google.com>2019-10-31 12:37:31 -0700
commit0470348222aa4dbd454eb7ee0e64608a2d093a54 (patch)
tree853ce04590e176af6c705acc91adf3e9f9cc968c
parent5f76c8dd5a0ce35d86a0a8dbefce980f50bba4d3 (diff)
downloadtools-0470348222aa4dbd454eb7ee0e64608a2d093a54.tar.gz
Support importing Github samples that use .kts
Bug: 143642314 Test: N/A Change-Id: I5415f0e28dde7a27d2d721add440a20f4dd0816f
-rw-r--r--android-studio-plugin/src/com/google/gct/studio/samples/GithubRepoContents.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/android-studio-plugin/src/com/google/gct/studio/samples/GithubRepoContents.java b/android-studio-plugin/src/com/google/gct/studio/samples/GithubRepoContents.java
index 526a705..adacdd7 100644
--- a/android-studio-plugin/src/com/google/gct/studio/samples/GithubRepoContents.java
+++ b/android-studio-plugin/src/com/google/gct/studio/samples/GithubRepoContents.java
@@ -32,7 +32,9 @@ import java.util.List;
import java.util.concurrent.Callable;
import static com.android.SdkConstants.FN_BUILD_GRADLE;
+import static com.android.SdkConstants.FN_BUILD_GRADLE_KTS;
import static com.android.SdkConstants.FN_SETTINGS_GRADLE;
+import static com.android.SdkConstants.FN_SETTINGS_GRADLE_KTS;
/**
* Contents fetched from a Github Repo.
@@ -132,7 +134,8 @@ public final class GithubRepoContents {
@NotNull
private static List<File> findSamplesInDirectory(@NotNull File directory, boolean recursive) {
List<File> samples = Lists.newArrayList();
- if (new File(directory, FN_BUILD_GRADLE).exists() || new File(directory, FN_SETTINGS_GRADLE).exists()) {
+ if (new File(directory, FN_BUILD_GRADLE).exists() || new File(directory, FN_SETTINGS_GRADLE).exists()
+ || new File(directory, FN_BUILD_GRADLE_KTS).exists() || new File(directory, FN_SETTINGS_GRADLE_KTS).exists()) {
samples.add(directory);
}
if (recursive) {