Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #26 from c4dt/release-candidate
Browse files Browse the repository at this point in the history
Release candidate for the updated version (to Android SDK 34)
  • Loading branch information
PascalinDe authored Oct 26, 2023
2 parents 5ea5366 + 00eee82 commit a5a4c10
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 14 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:
./gradlew assembleRelease &&
jar tvf $( find . -name '*-release.aar' ) |
grep '\.so$'
env:
NDK_VERSION: "25.0.8775105"
- name: Retrieve tag name
uses: actions/github-script@v3
Expand Down Expand Up @@ -58,4 +56,3 @@ jobs:
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNING_KEYID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
NDK_VERSION: "25.0.8775105"
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
- 2023-10-25 - v0.4.4
- using release v0.4.6 of lightarti-rest
- updated to Android SDK 34
- pinned Android NDK 25 (cf. https://github.com/bbqsrc/cargo-ndk/issues/94)
- disabled file system permission check
- 2022-08-19 - v0.4.3
- using release v0.4.3 of lightarti-rest
- updating to latest gradle libraries
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ In the repository, you can find:
suite](https://github.com/c4dt/lightarti-rest-android/blob/main/artiwrapper/src/androidTest/java/org/c4dt/artiwrapper/JniTest.java)
to run on emulators and devices.

### Supported versions

* Android SDK 30
* Android SDK 31
* Android SDK 32
* Android SDK 33
* Android SDK 34

Android NDK is pinned to version 25.2.9519653 due to missing dependencies in later
versions, please refer to this [cargo-ndk issue](https://github.com/bbqsrc/cargo-ndk/issues/94)
for details. Also a thank you to the [meli project](https://github.com/p2panda/meli) for proposing
a [workaround](https://github.com/p2panda/meli/pull/21) that we integrated as well.

## Releasing on Maven

In order to publish a new release on Maven, follow these steps:
Expand Down Expand Up @@ -61,13 +74,37 @@ In order to publish a new release on Maven, follow these steps:
[Maven](https://search.maven.org/search?q=lightarti-rest), with Group ID
`io.github.c4dt` and Artifact ID `lightarti-rest`.

# Running the example application

To run the example application locally, it is recommended that you install [Android Studio](https://developer.android.com/studio)
following the installation instructions for your distribution/operating system.

Once installed, run the Android Studio application and import this project via "Open" and selecting the project from
your system's directory tree.

Make sure to have the Android SDK/CMake installed, by going to "File" > "Settings" > "Languages & Frameworks" > "Android SDK"
and in the tab "SDK Tools" checking for "Android SDK Build-Tools" the version you want to run (must be one of the supported
versions), for "NDK" the version 25.2.9519653 and for "CMake" the latest available version. Click then on "Apply" to install
these dependencies.

You then need to add device(s) to run the example application on. Choose "Create Device" in the "Device Manager" menu and
follow the instructions. You will need to install the emulators for the chosen devices which may each take up to
10GB of disk space once installed and set up. Make sure that the devices correspond to one of the supported versions of
the Android SDK.

Android Studio should have found the ArtiWrapper example app automatically, so that you can now choose which of your devices
to run it on from the drop-down menu left of the app in the toolbar and clicking on the green "Run" button. The project
will be build and the emulator will be started and after a brief start-up period will show a confirmation screen that
it retrieved the updated lightArti directory cache.

# Contributors

`lightarti-rest-android` is maintained by the [Center for Digital Trust](https://c4dt.org/). The following people contributed to the implementation of `lightarti-rest`:

- Linus Gasser, C4DT
- Valérian Rousset, C4DT
- Christian Grigis, C4DT
- Carine Dengler, C4DT
- Laurent Girod, SPRING Lab, EPFL

Analysis and design by:
Expand Down
8 changes: 4 additions & 4 deletions artiwrapper/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ plugins {
}

android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
compileSdkVersion 34
buildToolsVersion "34.0.0"

ndkVersion System.getenv('NDK_VERSION')
ndkVersion "25.2.9519653"

defaultConfig {
applicationId "org.c4dt.myapplication"
minSdkVersion 23
targetSdkVersion 30
targetSdkVersion 34
versionCode 1
versionName "1.0"

Expand Down
5 changes: 3 additions & 2 deletions artiwrapper/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/Theme.ArtiWrapper.NoActionBar">
android:theme="@style/Theme.ArtiWrapper.NoActionBar"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand All @@ -21,4 +22,4 @@
</activity>
</application>

</manifest>
</manifest>
8 changes: 4 additions & 4 deletions artiwrapper/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ def getVersionCode() {
ext.isReleaseVersion = !getVersionName().endsWith('SNAPSHOT')

android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
compileSdkVersion 34
buildToolsVersion "34.0.0"

ndkVersion System.getenv('NDK_VERSION')
ndkVersion "25.2.9519653"

defaultConfig {
minSdkVersion 23
targetSdkVersion 30
targetSdkVersion 34
versionCode getVersionName()
versionName getVersionCode()

Expand Down
5 changes: 5 additions & 0 deletions artiwrapper/src/main/java/org/c4dt/artiwrapper/TorLibApi.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.c4dt.artiwrapper;

import android.system.Os;
import android.system.ErrnoException;
import android.util.Log;

import org.apache.commons.compress.archivers.ArchiveEntry;
Expand Down Expand Up @@ -99,10 +101,13 @@ public interface TorLibCallback<T> {

static {
try {
Os.setenv("FS_MISTRUST_DISABLE_PERMISSIONS_CHECKS", "1", true);
System.loadLibrary("lightarti_rest");
Log.d(TAG, "Arti Rust library loaded");
} catch (UnsatisfiedLinkError e) {
Log.e(TAG, "Cannot load Arti Rust library: " + e);
} catch (ErrnoException e) {
Log.d(TAG, "Cannot set 'FS_MISTRUST_DISABLE_PERMISSIONS_CHECKS' env variable");
}

TorLibApi.initLogger();
Expand Down

0 comments on commit a5a4c10

Please # to comment.