Skip to content

Commit

Permalink
Merge pull request #3 from wiiznokes/action
Browse files Browse the repository at this point in the history
fix action
  • Loading branch information
wiiznokes authored Feb 29, 2024
2 parents 1a0f259 + 5127d22 commit 432a18c
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/upload_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true

- run: |
git clone https://github.com/wiiznokes/libgit2-android --depth=1 --branch=patch-android
- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down
15 changes: 15 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Build


This app uses this [fork](https://github.com/wiiznokes/libgit2-android) of the [libgit2](https://github.com/libgit2/libgit2) library.
You can compile it from source or use the binaries already in place in the jniLibs folder.

I all case, you will need to clone this [repo](https://github.com/wiiznokes/libgit2-android) to get the header.

```
git clone https://github.com/wiiznokes/libgit2-android --depth=1 --branch=patch-android
```

You can't just `sudo apt install libgit2-dev` because `cmake` won't let you use the header in `/usr/include` for some reason.

I you want to compile libgit2, good luck, you can find info in the `build.sh` script.
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GitNote WIP

*Supported Android version: 12-14*
*Supported Android versions: 12 to 14*

Android note which integrate Git. You can use this app with other desktop editors.

Expand Down Expand Up @@ -38,12 +38,4 @@ You can either download from the release page, or use [Obtainium](https://github

# Build

This app uses the [libgit2](https://github.com/libgit2/libgit2) library.
You can compile it from source or use the binaries already in place in the jniLibs folder.

You will necessarily have to clone `libgit2` for the headers:

```
git submodule init
git submodule update
```
[See](./BUILD.md).
4 changes: 4 additions & 0 deletions app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ set(JNI_LIBS ${CMAKE_SOURCE_DIR}/../jniLibs/${ANDROID_ABI})

include_directories(${CMAKE_SOURCE_DIR}/../../../../libgit2-android/include)

# Attempt to use libgit2 headers from the system
#target_include_directories(logging PRIVATE /usr/include)
#include_directories(/usr/include)


add_library(${CMAKE_PROJECT_NAME} SHARED
logging.cpp
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/cpp/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define GITNOTE_LOGGING_H

#include <android/log.h>
#include "git2/errors.h"
#include <git2/errors.h>

#define LOG_TAG "GitnoteCPP"

Expand Down

0 comments on commit 432a18c

Please sign in to comment.