@@ -8,7 +8,8 @@ Android Java bindings for [tree-sitter](https://tree-sitter.github.io/tree-sitte
88- ` git clone ` this repo.
99- Init/update submodules with ` git submodule update --init `
1010- If building from Android Studio, set the ` ndk.dir ` and ` java.home ` properties in your ` local.properties ` file.
11- - Use the ` build.sh ` script to build the shared library.
11+
12+ ### Use the ` build.sh ` script
1213
1314```
1415usage: ./build.sh [-h] [-a {aarch64,arm,x86,x86_64}] [-o OUTPUT] [-v] -n NDK [-m MIN_SDK] grammars [grammars ...]
@@ -33,6 +34,17 @@ For example, the following command builds the shared library for `arm64-v8a` And
3334./build.sh -a aarch64 -m 26 -n <path_to_ndk> java python
3435```
3536
37+ ### Build with Gradle tasks
38+
39+ You can execute the following Gradle tasks to build the shared library.
40+
41+ - ` buildSharedObjectForAarch64 ` - Build the shared library for ` aarch64 ` .
42+ - ` buildSharedObjectForArm ` - Build the shared library for ` arm ` (or ` armeabi-v7a ` ).
43+ - ` buildSharedObjectForX86 ` - Build the shared library for ` x86 ` (or ` i686 ` ).
44+ - ` buildSharedObjectForX86_64 ` - Build the shared library for ` x86_64 ` .
45+ - ` buildSharedObjectForHost ` - Build the shared library for the host OS. Helpful to testing.
46+ - ` buildSharedObjectForAll ` - Executes all of the above tasks.
47+
3648## Adding more grammars
3749
3850You could either add the submodule for the grammar with ` git submodule add [..] ` or manually clone the grammar repositories in the ` grammars ` folder.
@@ -102,4 +114,4 @@ If you're going to be traversing a tree, then you can use the `walk` method, whi
102114 }
103115```
104116
105- For more examples, see the tests in `src/ test/ java/ com/ itsaky/ androidide/ treesitter`.
117+ For more examples, see the tests in `src/ test/ java/ com/ itsaky/ androidide/ treesitter`.
0 commit comments