From 7eb38bcafb85016b69f1acabde2ef80f75764e45 Mon Sep 17 00:00:00 2001 From: Aryan Date: Tue, 10 Mar 2026 20:17:23 +0530 Subject: [PATCH] fix: reproducible build paths for native libs and strip unused brotli sos (#56) --- .gitattributes | 0 app/build.gradle.kts | 5 +++++ app/src/main/cpp/CMakeLists.txt | 5 +++++ 3 files changed, 10 insertions(+) delete mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index e69de29..0000000 diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 7701f63..5cf773f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -56,6 +56,11 @@ android { resources { excludes += "/META-INF/{AL2.0,LGPL2.1}" } + jniLibs { + excludes += "**/libbrotlicommon.so" + excludes += "**/libbrotlidec.so" + excludes += "**/libbrotlienc.so" + } } signingConfigs { diff --git a/app/src/main/cpp/CMakeLists.txt b/app/src/main/cpp/CMakeLists.txt index 75af0bd..08bb499 100644 --- a/app/src/main/cpp/CMakeLists.txt +++ b/app/src/main/cpp/CMakeLists.txt @@ -5,6 +5,11 @@ cmake_minimum_required(VERSION 3.22.1) # Declares the project name. project("reader-native") +add_compile_options( + -ffile-prefix-map=${CMAKE_SOURCE_DIR}=. + -ffile-prefix-map=${CMAKE_BINARY_DIR}=. +) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,max-page-size=16384") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,max-page-size=16384")