Fdroid fix (#57)

* fix: reproducible build paths for native libs and strip unused brotli sos

* build: improve build reproducibility in CMake

* build: disable dependencies information in APK and Bundle
This commit is contained in:
Aryan 2026-03-10 22:16:43 +05:30 committed by GitHub
parent 7eb38bcafb
commit 06ec45504f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 2 deletions

View file

@ -112,6 +112,10 @@ android {
compose = true compose = true
buildConfig = true buildConfig = true
} }
dependenciesInfo {
includeInApk = false
includeInBundle = false
}
publishing { publishing {
singleVariant("release") { singleVariant("release") {
} }

View file

@ -6,8 +6,21 @@ cmake_minimum_required(VERSION 3.22.1)
project("reader-native") project("reader-native")
add_compile_options( add_compile_options(
-ffile-prefix-map=${CMAKE_SOURCE_DIR}=. "-ffile-prefix-map=${CMAKE_SOURCE_DIR}=."
-ffile-prefix-map=${CMAKE_BINARY_DIR}=. "-ffile-prefix-map=${CMAKE_BINARY_DIR}=."
)
if(DEFINED CMAKE_ANDROID_NDK)
add_compile_options("-ffile-prefix-map=${CMAKE_ANDROID_NDK}=/ndk")
endif()
if(DEFINED CMAKE_SYSROOT)
add_compile_options("-ffile-prefix-map=${CMAKE_SYSROOT}=/sysroot")
endif()
add_compile_options(
-Wno-builtin-macro-redefined
-D__DATE__="\"1970-01-01\""
-D__TIME__="\"00:00:00\""
) )
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,max-page-size=16384") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,max-page-size=16384")