From 068a68f217bc32b1bb3bd6b567a064f7ca507fba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Bj=C3=A4reholt?= Date: Tue, 13 Aug 2019 13:09:44 +0200 Subject: [PATCH] updated aw-server-rust and added some comments --- aw-server-rust | 2 +- mobile/build.gradle | 14 +++++++++++++- .../net/activitywatch/android/RustInterface.kt | 3 +++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/aw-server-rust b/aw-server-rust index d05f572..36306d4 160000 --- a/aw-server-rust +++ b/aw-server-rust @@ -1 +1 @@ -Subproject commit d05f5724e1634416c1bab75e0c80dfcff2d41a11 +Subproject commit 36306d49950af6b2170ca37de5773b4dfe23d84e diff --git a/mobile/build.gradle b/mobile/build.gradle index 30f3871..211ffbc 100644 --- a/mobile/build.gradle +++ b/mobile/build.gradle @@ -10,10 +10,15 @@ android { applicationId "net.activitywatch.android" minSdkVersion 24 targetSdkVersion 28 - // versionCode and versionName updated automatically in deploy script + // versionCode and versionName are updated automatically in deploy script versionCode 14 versionName "0.4-dev" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + + // WARNING: Never commit this uncommented! + //packagingOptions { + // doNotStrip '**/*.so' + //} } buildTypes { release { @@ -25,6 +30,13 @@ android { } } + // Never got this to work... + if (project.hasProperty("doNotStrip")) { + packagingOptions { + doNotStrip '**/*.so' + } + } + // Creates a resource versionName with the full version // https://stackoverflow.com/a/36468650/965332 applicationVariants.all { variant -> diff --git a/mobile/src/main/java/net/activitywatch/android/RustInterface.kt b/mobile/src/main/java/net/activitywatch/android/RustInterface.kt index 3215b5c..3c75e42 100644 --- a/mobile/src/main/java/net/activitywatch/android/RustInterface.kt +++ b/mobile/src/main/java/net/activitywatch/android/RustInterface.kt @@ -16,10 +16,13 @@ private const val TAG = "RustInterface" class RustInterface constructor(context: Context? = null) { init { + // NOTE: This doesn't work, probably because I can't get gradle to not strip symbols on release builds //Os.setenv("RUST_BACKTRACE", "1", true) + if(context != null) { Os.setenv("SQLITE_TMPDIR", context.cacheDir.absolutePath, true) } + System.loadLibrary("aw_server") initialize()