Skip to content

Commit

Permalink
Fix Android build on Windows (#21304)
Browse files Browse the repository at this point in the history
- Pass a list of files instead of path separator-delimited string to project.files(). See this issue: gradle/gradle#19817
- Check for host (instead of target) being Windows when using fallback patch program.
  • Loading branch information
edgchen1 authored Jul 15, 2024
1 parent dfaf189 commit 9c2b85a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ if(NOT WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
endif()

find_package(Patch)
if (WIN32 AND NOT Patch_FOUND)
if (CMAKE_HOST_WIN32 AND NOT Patch_FOUND)
# work around CI machines missing patch from the git install by falling back to the binary in this repo.
# replicate what happens in https://github.com/Kitware/CMake/blob/master/Modules/FindPatch.cmake but without
# the hardcoded suffixes in the path to the patch binary.
Expand Down
2 changes: 1 addition & 1 deletion java/build-android.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ task sourcesJar(type: Jar) {

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
classpath += project.files(android.getBootClasspath())
}

task javadocJar(type: Jar, dependsOn: javadoc) {
Expand Down

0 comments on commit 9c2b85a

Please sign in to comment.