Skip to content

Commit 432a18c

Browse files
authored
Merge pull request #3 from wiiznokes/action
fix action
2 parents 1a0f259 + 5127d22 commit 432a18c

File tree

5 files changed

+27
-11
lines changed

5 files changed

+27
-11
lines changed

.github/workflows/upload_artifacts.yml

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
15+
with:
16+
lfs: true
17+
18+
- run: |
19+
git clone https://github.com/wiiznokes/libgit2-android --depth=1 --branch=patch-android
1520
1621
- name: Set up JDK 17
1722
uses: actions/setup-java@v4

BUILD.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Build
2+
3+
4+
This app uses this [fork](https://github.com/wiiznokes/libgit2-android) of the [libgit2](https://github.com/libgit2/libgit2) library.
5+
You can compile it from source or use the binaries already in place in the jniLibs folder.
6+
7+
I all case, you will need to clone this [repo](https://github.com/wiiznokes/libgit2-android) to get the header.
8+
9+
```
10+
git clone https://github.com/wiiznokes/libgit2-android --depth=1 --branch=patch-android
11+
```
12+
13+
You can't just `sudo apt install libgit2-dev` because `cmake` won't let you use the header in `/usr/include` for some reason.
14+
15+
I you want to compile libgit2, good luck, you can find info in the `build.sh` script.

README.md

+2-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# GitNote WIP
22

3-
*Supported Android version: 12-14*
3+
*Supported Android versions: 12 to 14*
44

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

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

3939
# Build
4040

41-
This app uses the [libgit2](https://github.com/libgit2/libgit2) library.
42-
You can compile it from source or use the binaries already in place in the jniLibs folder.
43-
44-
You will necessarily have to clone `libgit2` for the headers:
45-
46-
```
47-
git submodule init
48-
git submodule update
49-
```
41+
[See](./BUILD.md).

app/src/main/cpp/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ set(JNI_LIBS ${CMAKE_SOURCE_DIR}/../jniLibs/${ANDROID_ABI})
88

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

11+
# Attempt to use libgit2 headers from the system
12+
#target_include_directories(logging PRIVATE /usr/include)
13+
#include_directories(/usr/include)
14+
1115

1216
add_library(${CMAKE_PROJECT_NAME} SHARED
1317
logging.cpp

app/src/main/cpp/logging.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define GITNOTE_LOGGING_H
33

44
#include <android/log.h>
5-
#include "git2/errors.h"
5+
#include <git2/errors.h>
66

77
#define LOG_TAG "GitnoteCPP"
88

0 commit comments

Comments
 (0)