Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions packages/react-native-audio-api/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,14 @@ def assertMinimalReactNativeVersion = task assertMinimalReactNativeVersionTask {
}

task downloadPrebuiltBinaries(type: Exec) {
commandLine 'chmod', '+x', '../scripts/download-prebuilt-binaries.sh'
commandLine 'bash', '../scripts/download-prebuilt-binaries.sh'
args 'android', isFFmpegDisabled() ? 'skipffmpeg' : ''
def isWindows = Os.isFamily(Os.FAMILY_WINDOWS)
if (isWindows) {
commandLine 'C:\\Program Files\\Git\\usr\\bin\\bash.exe', '../scripts/download-prebuilt-binaries.sh', 'android', isFFmpegDisabled() ? 'skipffmpeg' : ''
} else {
commandLine 'chmod', '+x', '../scripts/download-prebuilt-binaries.sh'
commandLine 'bash', '../scripts/download-prebuilt-binaries.sh'
args 'android', isFFmpegDisabled() ? 'skipffmpeg' : ''
}
}

// Make preBuild depend on the download task
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
cmake_minimum_required(VERSION 3.12.0)

file(GLOB_RECURSE ANDROID_CPP_SOURCES CONFIGURE_DEPENDS "${ANDROID_CPP_DIR}/audioapi/*.cpp")
file(GLOB_RECURSE COMMON_CPP_SOURCES CONFIGURE_DEPENDS "${COMMON_CPP_DIR}/audioapi/*.cpp" "${COMMON_CPP_DIR}/audioapi/*.c")
file(GLOB_RECURSE DSP_CPP_SOURCES CONFIGURE_DEPENDS "${COMMON_CPP_DIR}/audioapi/dsp/*.cpp")
file(GLOB_RECURSE ANDROID_CPP_SOURCES_ABS CONFIGURE_DEPENDS "${ANDROID_CPP_DIR}/audioapi/*.cpp")
file(GLOB_RECURSE COMMON_CPP_SOURCES_ABS CONFIGURE_DEPENDS "${COMMON_CPP_DIR}/audioapi/*.cpp" "${COMMON_CPP_DIR}/audioapi/*.c")
file(GLOB_RECURSE DSP_CPP_SOURCES_ABS CONFIGURE_DEPENDS "${COMMON_CPP_DIR}/audioapi/dsp/*.cpp")

foreach(src IN LISTS ANDROID_CPP_SOURCES_ABS)
file(RELATIVE_PATH rel_src "${CMAKE_CURRENT_SOURCE_DIR}" "${src}")
list(APPEND ANDROID_CPP_SOURCES "${rel_src}")
endforeach()
foreach(src IN LISTS COMMON_CPP_SOURCES_ABS)
file(RELATIVE_PATH rel_src "${CMAKE_CURRENT_SOURCE_DIR}" "${src}")
list(APPEND COMMON_CPP_SOURCES "${rel_src}")
endforeach()
foreach(src IN LISTS DSP_CPP_SOURCES_ABS)
file(RELATIVE_PATH rel_src "${CMAKE_CURRENT_SOURCE_DIR}" "${src}")
list(APPEND DSP_CPP_SOURCES "${rel_src}")
endforeach()

if (RN_AUDIO_API_FFMPEG_DISABLED)
list(REMOVE_ITEM COMMON_CPP_SOURCES
Expand Down
Loading