Add android build
This commit is contained in:
parent
fbe4fe643a
commit
99376c9957
2 changed files with 22 additions and 6 deletions
|
@ -24,10 +24,6 @@ task resolveDependencies {
|
|||
}
|
||||
|
||||
void resolveConfiguration(subProject, configuration, name) {
|
||||
// TODO: fix this
|
||||
if (subProject.name == "app") {
|
||||
return;
|
||||
}
|
||||
if (configuration.canBeResolved) {
|
||||
logger.info("Resolving project {} {}", subProject.name, name)
|
||||
configuration.resolve()
|
||||
|
|
24
flake.nix
24
flake.nix
|
@ -44,7 +44,7 @@
|
|||
buildPhase = ''
|
||||
export GRADLE_USER_HOME=$(mktemp -d)
|
||||
# Fetch the maven deps
|
||||
gradle --no-daemon --info -Dorg.gradle.java.home=${pkgs.openjdk_headless} resolveDependencies
|
||||
gradle --no-daemon --info -Dorg.gradle.java.home=${pkgs.openjdk_headless} --write-verification-metadata sha256
|
||||
'';
|
||||
installPhase = ''
|
||||
find $GRADLE_USER_HOME/caches/modules-2 -type f -regex '.*\.\(jar\|pom\)$' \
|
||||
|
@ -53,7 +53,7 @@
|
|||
'';
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
outputHash = "sha256-OXNB19WPC5MyLEoDAtnVM9XykY7e0mKGRH5Aw8C/lMo=";
|
||||
outputHash = "sha256-kW9pzfqOZwwvymS9If5wubkYHXM81YwHSSgzJjgnf0c=";
|
||||
};
|
||||
invtracker-server = pkgs.stdenv.mkDerivation {
|
||||
pname = "invtracker-server";
|
||||
|
@ -71,6 +71,26 @@
|
|||
cp -rv server/build/install/server $out/
|
||||
'';
|
||||
};
|
||||
invtracker-client = pkgs.stdenv.mkDerivation rec {
|
||||
pname = "invtracker-client";
|
||||
version = self.lastModifiedDate;
|
||||
src = self;
|
||||
nativeBuildInputs = with pkgs; [gradle openjdk_headless androidenv.androidPkgs_9_0.androidsdk ];
|
||||
buildPhase = ''
|
||||
sed -i 's#gradlePluginPortal..#maven { url "${invtracker-deps}/maven" }#' settings.gradle
|
||||
sed -i 's#google..#maven { url "${invtracker-deps}/maven" }#' settings.gradle
|
||||
|
||||
export GRADLE_USER_HOME=$(mktemp -d)
|
||||
gradle --offline --no-daemon --info -Dorg.gradle.java.home=${pkgs.openjdk_headless} app:build
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp app/build/outputs/apk/release/app-release-unsigned.apk $out/app.apk
|
||||
mkdir $out/nix-support
|
||||
echo "file binary-dist $out/app.apk" > $out/nix-support/hydra-build-products
|
||||
echo "$pname-$version" > $out/nix-support/hydra-release-name
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
hydraJobs =
|
||||
|
|
Loading…
Reference in a new issue