a759cc912f
This does almost everything until the final build and fails there because we are using too modern software with a too old project, I think. Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
39 lines
767 B
Nix
39 lines
767 B
Nix
{ lib
|
|
, stdenv
|
|
, jdk
|
|
, gradle
|
|
, mavenRepo
|
|
, androidSdk
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "built-with-gradle";
|
|
version = "0.0";
|
|
|
|
src = ../android;
|
|
|
|
nativeBuildInputs = [ gradle ];
|
|
|
|
JDK_HOME = "${jdk.home}";
|
|
ANDROID_SDK_ROOT = "${androidSdk}/share/android-sdk";
|
|
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
gradle build \
|
|
--offline --no-daemon --no-build-cache --info --full-stacktrace \
|
|
--warning-mode=all --parallel \
|
|
-PnixMavenRepo=${mavenRepo} \
|
|
-Dorg.gradle.project.android.aapt2FromMavenOverride=$ANDROID_SDK_ROOT/build-tools/30.0.3/aapt2
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out
|
|
cp -r app/build/outputs/* $out
|
|
runHook postInstall
|
|
'';
|
|
|
|
dontStrip = true;
|
|
}
|