Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions docs/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ See [`script_phase` options](https://www.rubydoc.info/gems/cocoapods-core/Pod/Po

A relative path to a folder with Android project (Gradle root project), e.g. `./path/to/custom-android`. By default, CLI searches for `./android` as source dir.

#### platforms.android.appName

A name of the app in the Android `sourceDir`, equivalent to Gradle project name. By default it's `app`.

#### platforms.android.manifestPath

Path to a custom `AndroidManifest.xml`
Expand Down
1 change: 0 additions & 1 deletion packages/cli-types/src/android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export interface AndroidDependencyConfig {
folder: string;
packageImportPath: string;
packageInstance: string;
appName: string;
manifestPath: string;
packageName: string;
}
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/src/tools/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export const dependencyConfig = t
manifestPath: t.string(),
packageImportPath: t.string(),
packageInstance: t.string(),
appName: t.string(),
})
.default({}),
})
Expand Down Expand Up @@ -127,7 +126,6 @@ export const projectConfig = t
folder: t.string(),
packageImportPath: t.string(),
packageInstance: t.string(),
appName: t.string(),
})
.allow(null),
}),
Expand Down Expand Up @@ -164,6 +162,7 @@ export const projectConfig = t
settingsGradlePath: t.string(),
assetsPath: t.string(),
buildGradlePath: t.string(),
appName: t.string(),
})
.default({}),
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ function tryLaunchAppOnDevice(
adbPath: string,
args: Flags,
) {
const appId = args.appId || args.appIdSuffix;
const packageNameWithSuffix = appId ? `${packageName}.${appId}` : packageName;
const {appId, appIdSuffix} = args;
const packageNameWithSuffix = [appId || packageName, appIdSuffix]
.filter(Boolean)
.join('.');

try {
const adbArgs = [
Expand Down
5 changes: 2 additions & 3 deletions packages/platform-android/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,9 @@ export function dependencyConfig(
}

const sourceDir = path.join(root, src);
const appName = userConfig.appName || 'app';
const manifestPath = userConfig.manifestPath
? path.join(sourceDir, userConfig.manifestPath)
: findManifest(path.join(sourceDir, appName));
: findManifest(sourceDir);

if (!manifestPath) {
return null;
Expand All @@ -155,5 +154,5 @@ export function dependencyConfig(
const packageInstance =
userConfig.packageInstance || `new ${packageClassName}()`;

return {sourceDir, appName, folder: root, packageImportPath, packageInstance};
return {sourceDir, folder: root, packageImportPath, packageInstance};
}