diff options
author | Hannah Chu <hanchu@google.com> | 2019-10-31 12:37:31 -0700 |
---|---|---|
committer | Hannah Chu <hanchu@google.com> | 2019-10-31 12:37:31 -0700 |
commit | 0470348222aa4dbd454eb7ee0e64608a2d093a54 (patch) | |
tree | 853ce04590e176af6c705acc91adf3e9f9cc968c | |
parent | 5f76c8dd5a0ce35d86a0a8dbefce980f50bba4d3 (diff) | |
download | tools-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.java | 5 |
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) { |