File tree Expand file tree Collapse file tree 3 files changed +16
-12
lines changed Expand file tree Collapse file tree 3 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 1
1
# Aapt2 package build workflow
2
2
3
- [ ![ build workflow] ( https://github.com/revanced/aapt2/ actions/workflows/build .yml/badge.svg)] ( https://github.com/revanced/aapt2/ actions/workflows/build .yml)
3
+ [ ![ build workflow] ( ../../ actions/workflows/release .yml/badge.svg)] ( ../../ actions/workflows/release .yml)
4
4
5
5
This repository contains a workflow to build the aapt2 binaries for Android.
6
6
@@ -11,25 +11,29 @@ This repository contains a workflow to build the aapt2 binaries for Android.
11
11
git submodule update --init --recursive --depth 1
12
12
```
13
13
14
- ## Apply patch
14
+ ## Protoc dependency
15
+
16
+ ` protoc ` needs to be installed, the current required version is 21.12. Install it with:
15
17
``` bash
16
- bash ./patch.sh
18
+ wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip
19
+ sudo unzip -p protoc-* .zip bin/protoc -d /usr/local/bin/
20
+ ```
21
+
22
+ The required version can be identified with :
23
+ ``` bash
24
+ grep PROTOC_VERSION src/protobuf/protobuf_version.bzl
17
25
```
18
26
19
- ## Build protoc
27
+ ## Apply patch
20
28
``` bash
21
- mkdir -p src/protobuf/build
22
- cd src/protobuf/build
23
- cmake -GNinja -Dprotobuf_BUILD_TESTS=OFF ..
24
- ninja -j$( nproc --all)
25
- cd -
29
+ bash ./patch.sh
26
30
```
27
31
28
32
## Build the binary
29
33
30
34
Supported arch are 'x86_64', 'x86', 'arm64-v8a' & 'armeabi-v7a'
31
35
``` bash
32
- ANDROID_NDK=" $HOME /Android/Sdk/ndk/" PROTOC_PATH= " $PWD /src/protobuf/build/protoc " bash ./build.sh arm64-v8a # Build output in build/$arch /bin/aapt-*
36
+ ANDROID_NDK=" $HOME /Android/Sdk/ndk/" bash ./build.sh arm64-v8a # Build output in build/bin/aapt-*
33
37
```
34
38
35
39
# Credits
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ set_source_files_properties(${AAPT2_PROTO_SRC} ${AAPT2_PROTO_HDRS}
45
45
set (COMPILE_FLAGS
46
46
-Wno-unused-parameter
47
47
-Wno-missing-field-initializers
48
- -fno-exceptions
48
+ -fno-exceptions
49
49
-fno-rtti)
50
50
51
51
set (INCLUDES
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ cmake -GNinja \
61
61
-Dprotobuf_BUILD_LIBPROTOC=ON \
62
62
-DPNG_SHARED=OFF \
63
63
-DZLIB_USE_STATIC_LIBS=ON
64
-
64
+
65
65
# Build the binary
66
66
ninja -C build aapt2
67
67
You can’t perform that action at this time.
0 commit comments