From fc193aaec2c9a10825f3583f13b1a46dcff17951 Mon Sep 17 00:00:00 2001 From: Joe Hanley Date: Tue, 6 Aug 2024 11:48:22 -0700 Subject: [PATCH] Addressing Denvers comment that I missed --- src/init/features/dataconnect/sdk.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/init/features/dataconnect/sdk.ts b/src/init/features/dataconnect/sdk.ts index 615d27d4e5c..359e8c02fe0 100644 --- a/src/init/features/dataconnect/sdk.ts +++ b/src/init/features/dataconnect/sdk.ts @@ -147,15 +147,15 @@ async function askQuestions(setup: Setup, config: Config): Promise { } if (targetPlatform === Platform.ANDROID) { - // app/src/main is a common practice for Andorid, but not explicitly required. + // app/src/main/java is a common practice for Andorid, but not explicitly required. // If it is present, we'll use it. Otherwise, we fall back to the app directory. - const baseDir = fs.existsSync(path.join(appDir, "app/src/main")) - ? path.join(appDir, "app/src/main") - : appDir; + const baseDir = fs.existsSync(path.join(appDir, "app/src/main/java")) + ? path.join(appDir, "app/src/main/java") + : path.join(appDir, "generated"); const outputDir = newConnectorYaml.generate.kotlinSdk?.outputDir || - path.relative(connectorInfo.directory, path.join(baseDir, `generated`)); + path.relative(connectorInfo.directory, baseDir); const pkg = newConnectorYaml.generate.kotlinSdk?.package ?? `connectors.${snakeCase(connectorInfo.connectorYaml.connectorId)}`;