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

Feature/switch to nix for bundletool #416

Merged
merged 5 commits into from
Dec 17, 2023
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
6 changes: 3 additions & 3 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ steps:
when:
event: tag
- name: Accrescent APKs
image: nixos/nix
image: gonzague/bundletool
environment:
ANDROID_KEY_FILE: /tmp/key.properties
SERVER_URL:
from_secret: server_url
commands:
- nix-env -iA nixpkgs.wget nixpkgs.bundletool
- mkdir /tmp
- wget http://$SERVER_URL/service-account.json -O /tmp/service-account.json
- wget http://$SERVER_URL/key.properties -O /tmp/key.properties
- wget http://$SERVER_URL/keystore.jks -O /tmp/keystore.jks
- . /tmp/key.properties
- cd build/app/outputs/bundle/release/
- bundletool build-apks --bundle=app-release.aab --output=app-release.apks --ks-pass=pass:$${storePassword} --ks=/tmp/keystore.jks --ks-key-alias=upload --key-pass=pass:$${keyPassword}
- bundletool build-apks --bundle=app-release.aab --output=app-release.apks --ks-pass=pass:$${storePassword} --ks=/tmp/keystore.jks --ks-key-alias=upload --key-pass=pass:$${keyPassword} --aapt2=/bin/aapt2
when:
event: tag
- name: Publish
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release
/docker/result
13 changes: 13 additions & 0 deletions docker/bundletool.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# usage:
# build the image
# nix-build -o result bundletool.nix
# docker load -i result
# use the image as usual with name gonzague/bundletool
{
pkgs ? import <nixpkgs> {system = "x86_64-linux";}
}:
pkgs.dockerTools.buildLayeredImage {
name = "gonzague/bundletool";
tag = "latest";
contents = with pkgs; [ toybox wget bundletool aapt bash android-tools ];
}