Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to upload symbols.zip for aab files #421

Merged
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
12 changes: 12 additions & 0 deletions Tasks/GooglePlayReleaseV4/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,18 @@ async function run(): Promise<void> {
const bundle: pub3.Schema$Bundle = await googleutil.addBundle(edits, packageName, bundleFile);
tl.debug(`Uploaded ${bundleFile} with the version code ${bundle.versionCode}`);
versionCodes.push(bundle.versionCode);

// Uploading native debug symbols for aab files
if (uploadNativeDebugSymbolFiles) {
const nativeDebugSymbolsFilePath: string | null = fileHelper.getSymbolsFile(bundleFile);

if (nativeDebugSymbolsFilePath !== null) {
tl.debug(`Uploading ${nativeDebugSymbolsFilePath} for version code ${bundle.versionCode}`);
await googleutil.uploadNativeDeobfuscation(edits, nativeDebugSymbolsFilePath, packageName, bundle.versionCode);
} else {
tl.warning(tl.loc('NotFoundSymbolsFile', bundle.versionCode));
}
}
}

tl.debug(`Uploading ${apkFileList.length} APK(s).`);
Expand Down
12 changes: 6 additions & 6 deletions Tasks/GooglePlayReleaseV4/modules/fileHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,18 @@ export function getMappingFile(apkPath: string): string | null {
}

/**
* Get `symbols.zip` file from apk directory
* @param apkPath apk file path
* Get `symbols.zip` file from apk/aab directory
* @param filePath apk/aab file path
* @returns path of the `symbols.zip` file if present else null
*/
export function getSymbolsFile(apkPath: string): string | null {
const symbolsFilePath: string = path.join(path.dirname(apkPath), 'symbols.zip');
export function getSymbolsFile(filePath: string): string | null {
const symbolsFilePath: string = path.join(path.dirname(filePath), 'symbols.zip');

if (fs.existsSync(symbolsFilePath)) {
tl.debug(`Found Symbols file for upload in apk directory: ${symbolsFilePath}`);
tl.debug(`Found Symbols file for upload in apk/aab directory: ${symbolsFilePath}`);
return symbolsFilePath;
}

tl.debug(`No Symbols file found for ${apkPath}, skipping upload`);
tl.debug(`No Symbols file found for ${filePath}, skipping upload`);
return null;
}
2 changes: 1 addition & 1 deletion Tasks/GooglePlayReleaseV4/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": "4",
"Minor": "232",
"Patch": "0"
"Patch": "1"
},
"minimumAgentVersion": "2.182.1",
"instanceNameFormat": "Release $(applicationId) to $(track)",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/GooglePlayReleaseV4/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": "4",
"Minor": "232",
"Patch": "0"
"Patch": "1"
},
"minimumAgentVersion": "2.182.1",
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",
Expand Down
2 changes: 1 addition & 1 deletion vsts-extension-google-play.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1.0,
"id": "google-play",
"name": "Google Play",
"version": "4.232.0",
"version": "4.232.1",
"publisher": "ms-vsclient",
"description": "Provides tasks for continuous delivery to the Google Play Store from TFS/Team Services build or release definitions",
"categories": [
Expand Down