- System images are not required for building. Disabling them makes building faster.

- Make ant flags configurable
This commit is contained in:
Sander van der Burg 2013-08-01 11:21:54 +02:00
parent 14ca9c0bf1
commit 77dd343e1e
2 changed files with 10 additions and 3 deletions

View file

@ -1,5 +1,5 @@
{ stdenv, androidsdk, jdk, ant }:
{ name, src, platformVersions ? [ "8" ], abiVersions ? [ "armeabi-v7a" ], useGoogleAPIs ? false
{ name, src, platformVersions ? [ "8" ], useGoogleAPIs ? false, antFlags ? ""
, release ? false, keyStore ? null, keyAlias ? null, keyStorePassword ? null, keyAliasPassword ? null
}:
@ -11,7 +11,8 @@ let
else throw "Platform: ${stdenv.system} is not supported!";
androidsdkComposition = androidsdk {
inherit platformVersions abiVersions useGoogleAPIs;
inherit platformVersions useGoogleAPIs;
abiVersions = [];
};
in
stdenv.mkDerivation {
@ -34,7 +35,7 @@ stdenv.mkDerivation {
''}
export ANDROID_SDK_HOME=`pwd` # Key files cannot be stored in the user's home directory. This overrides it.
ant ${if release then "release" else "debug"}
ant ${antFlags} ${if release then "release" else "debug"}
'';
installPhase = ''

View file

@ -57,6 +57,12 @@ rec {
useGoogleAPIs = true;
};
androidsdk_4_2 = androidsdk {
platformVersions = [ "17" ];
abiVersions = [ "armeabi-v7a" ];
useGoogleAPIs = true;
};
buildApp = import ./build-app.nix {
inherit (pkgs) stdenv jdk ant;
inherit androidsdk;