- System images are not required for building. Disabling them makes building faster.
- Make ant flags configurable
This commit is contained in:
parent
14ca9c0bf1
commit
77dd343e1e
@ -1,5 +1,5 @@
|
|||||||
{ stdenv, androidsdk, jdk, ant }:
|
{ 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
|
, release ? false, keyStore ? null, keyAlias ? null, keyStorePassword ? null, keyAliasPassword ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -11,7 +11,8 @@ let
|
|||||||
else throw "Platform: ${stdenv.system} is not supported!";
|
else throw "Platform: ${stdenv.system} is not supported!";
|
||||||
|
|
||||||
androidsdkComposition = androidsdk {
|
androidsdkComposition = androidsdk {
|
||||||
inherit platformVersions abiVersions useGoogleAPIs;
|
inherit platformVersions useGoogleAPIs;
|
||||||
|
abiVersions = [];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
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.
|
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 = ''
|
installPhase = ''
|
||||||
|
@ -57,6 +57,12 @@ rec {
|
|||||||
useGoogleAPIs = true;
|
useGoogleAPIs = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
androidsdk_4_2 = androidsdk {
|
||||||
|
platformVersions = [ "17" ];
|
||||||
|
abiVersions = [ "armeabi-v7a" ];
|
||||||
|
useGoogleAPIs = true;
|
||||||
|
};
|
||||||
|
|
||||||
buildApp = import ./build-app.nix {
|
buildApp = import ./build-app.nix {
|
||||||
inherit (pkgs) stdenv jdk ant;
|
inherit (pkgs) stdenv jdk ant;
|
||||||
inherit androidsdk;
|
inherit androidsdk;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user