Skip to content

Commit

Permalink
updated aw-server-rust and added some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Aug 13, 2019
1 parent c0d8f16 commit 068a68f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aw-server-rust
14 changes: 13 additions & 1 deletion mobile/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 068a68f

Please sign in to comment.