Compare commits

...

2 commits

Author SHA1 Message Date
Morten Delenk
824c552738
fix out of bound exception 2022-08-14 20:58:35 +01:00
Morten Delenk
a8e565ec07
use debug build 2022-08-14 20:50:25 +01:00
3 changed files with 8 additions and 4 deletions

View file

@ -147,7 +147,11 @@ public class CachedClientImpl extends Client {
} }
}); });
} }
return Single.just(new Cursor<>(items, Optional.of(String.valueOf(items.get(items.size() - 1).id())))); Optional<String> next = Optional.empty();
if(items.size() != 0) {
next = Optional.of(String.valueOf(items.get(items.size() - 1).id()));
}
return Single.just(new Cursor<>(items, next));
} }
return this.client.getObjects(rect, cont).doOnSuccess(cursor -> { return this.client.getObjects(rect, cont).doOnSuccess(cursor -> {
for (var item : cursor.items()) { for (var item : cursor.items()) {

View file

@ -59,7 +59,7 @@ public class ClientImpl extends Client {
/** /**
* The API URL. * The API URL.
*/ */
private static final String API_URL = BuildConfig.DEBUG ? DEV_API_URL : PROD_API_URL; private static final String API_URL = PROD_API_URL;
/** /**
* An empty body. * An empty body.
*/ */

View file

@ -98,11 +98,11 @@
sed -i 's#google..#maven { url "${invtracker-deps}/maven" }#' settings.gradle sed -i 's#google..#maven { url "${invtracker-deps}/maven" }#' settings.gradle
export GRADLE_USER_HOME=$(mktemp -d) export GRADLE_USER_HOME=$(mktemp -d)
gradle --offline --no-daemon --info -Dorg.gradle.project.android.aapt2FromMavenOverride=${androidSdk}/share/android-sdk/build-tools/33.0.0/aapt2 -Dorg.gradle.java.home=${pkgs.openjdk_headless} app:packageRelease gradle --offline --no-daemon --info -Dorg.gradle.project.android.aapt2FromMavenOverride=${androidSdk}/share/android-sdk/build-tools/33.0.0/aapt2 -Dorg.gradle.java.home=${pkgs.openjdk_headless} app:packageDebug
''; '';
installPhase = '' installPhase = ''
mkdir $out mkdir $out
cp app/build/outputs/apk/release/app-release-unsigned.apk $out/app.apk cp app/build/outputs/apk/debug/debug.apk $out/app.apk
mkdir $out/nix-support mkdir $out/nix-support
echo "file binary-dist $out/app.apk" > $out/nix-support/hydra-build-products echo "file binary-dist $out/app.apk" > $out/nix-support/hydra-build-products
echo "$pname-$version" > $out/nix-support/hydra-release-name echo "$pname-$version" > $out/nix-support/hydra-release-name