Skip to content

Add convenience overload for exporting a project's source zip#4002

Open
zikunz wants to merge 3 commits into
mit-cml:masterfrom
zikunz:add-export-source-zip-overload
Open

Add convenience overload for exporting a project's source zip#4002
zikunz wants to merge 3 commits into
mit-cml:masterfrom
zikunz:add-export-source-zip-overload

Conversation

@zikunz

@zikunz zikunz commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

What does this PR accomplish?

Description

This adds a two argument exportProjectSourceZip(userId, projectId) overload to FileExporter and FileExporterImpl. It performs the standard source only export and returns the project's .aia archive, delegating to the existing exportProjectSourceZip with the same defaults already used by exportSelectedProjectsSourceZip and exportAllProjectsSourceZip. The goal is to give callers that only need a project's .aia a single entry point, rather than repeating the full set of export flags. The change is purely additive and follows the existing exportProjectOutputFile overload pattern.

Testing Guidelines

A new unit test, testExportProjectSourceZipWithDefaults in FileExporterImplTest, builds a project with source and output files, calls the new two argument overload, and asserts that the returned zip contains only the two source files and no remix history. This mirrors the existing testExportProjectSourceZipWithoutHistory test. A second test, testExportProjectSourceZipWithDefaultsNonExistingProject, calls the overload for a non-existing project and asserts that it throws, mirroring the existing testExportProjectSourceZipWithNonExistingProject test. It can be run with the AiServerLibTests target, for example ant AiServerLibTests with test_name set to com.google.appinventor.server.FileExporterImplTest.

Context for the changes

This is a server side change to the appengine module. It does not affect the companion or the device, and it does not change any blocks or designer API. It branches from master.

If your code changes how something works on the device (i.e., it affects the companion):

  • I have made no changes that affect the companion

  • I branched from ucr

  • My pull request has ucr as the base

Further, if you've changed the blocks language or another user-facing designer/blocks API (added a SimpleProperty, etc.):

  • I have updated the corresponding version number in appinventor/components/src/.../common/YaVersion.java
  • I have updated the corresponding upgrader in appinventor/appengine/src/.../client/youngandroid/YoungAndroidFormUpgrader.java (components only)
  • I have updated the corresponding entries in appinventor/blocklyeditor/src/versioning.js

For all other changes:

  • I have made no changes that affect the master branch

  • I branched from master

  • My pull request has master as the base

General items:

  • I have updated the relevant documentation files under docs/
  • My code follows the:
  • ant tests passes on my machine

@AppInventorWorkerBee

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

1 similar comment
@AppInventorWorkerBee

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@zikunz zikunz marked this pull request as draft June 22, 2026 17:38
@zikunz zikunz marked this pull request as ready for review June 23, 2026 14:31
@josmas josmas self-requested a review June 23, 2026 15:02
@josmas josmas self-assigned this Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants