PlayPublisher class

Uploads an AAB to Google Play through the Android Publisher API.

The service account key is read from play.service_account_json or the PLAY_SERVICE_ACCOUNT_JSON environment variable. The account needs release permissions for the app in Play Console. Google Play only accepts the very first upload of a new app through the Play Console.

Constructors

PlayPublisher({required AppConfig config, required Ledger ledger, void log(String)?, Client? httpClient})
Creates a publisher using config and ledger; log receives progress lines.

Properties

config → AppConfig
Configuration holding the play settings and service account key path.
final
hashCode → int
The hash code for this object.
no setterinherited
httpClient → Client?
Authenticated client used instead of the service account, or null.
final
ledger → Ledger
Ledger updated with the upload result.
final
log → void Function(String)
Receives progress lines.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkAccess(String packageName) → Future<void>
Checks that the service account can open an edit for packageName (and discards it). Throws PlayException with the reason when it cannot.
markUploaded(BuildRecord record, {required String track, DateTime? at}) → Future<BuildRecord>
Records that the build was uploaded to Play by hand.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
publish(BuildRecord record, {String? track, String? releaseStatus, String? releaseNotes, double? userFraction, bool replaceExisting = false}) → Future<BuildRecord>
Uploads the build's AAB to track and records it in the ledger.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited