diff --git a/extension/src/stores/RootProjectsStore.ts b/extension/src/stores/RootProjectsStore.ts index f694e8b6e..2f07a6f89 100644 --- a/extension/src/stores/RootProjectsStore.ts +++ b/extension/src/stores/RootProjectsStore.ts @@ -7,7 +7,7 @@ import { RootProject } from "../rootProject/RootProject"; import { GRADLE_BUILD_FILE_NAMES } from "../constant"; async function getNestedRootProjectFolders(): Promise { - const matchingNestedWrapperFiles = await vscode.workspace.findFiles("**/{gradlew,gradlew.bat}"); + const matchingNestedWrapperFiles = await vscode.workspace.findFiles("**/{settings.gradle,settings.gradle.kts}"); return [...new Set(matchingNestedWrapperFiles.map((uri) => path.dirname(uri.fsPath)))]; } diff --git a/extension/src/util/index.ts b/extension/src/util/index.ts index 27d9ba0ef..cf05ca677 100644 --- a/extension/src/util/index.ts +++ b/extension/src/util/index.ts @@ -57,8 +57,8 @@ export function waitOnTcp(host: string, port: number): Promise { export function isGradleRootProject(rootProject: RootProject): boolean { return ( - fs.existsSync(path.join(rootProject.getProjectUri().fsPath, "gradlew")) || - fs.existsSync(path.join(rootProject.getProjectUri().fsPath, "gradlew.bat")) + fs.existsSync(path.join(rootProject.getProjectUri().fsPath, "settings.gradle")) || + fs.existsSync(path.join(rootProject.getProjectUri().fsPath, "settings.gradle.kts")) ); }