Skip to content

Commit 9c2b85a

Browse files
authored
Fix Android build on Windows (microsoft#21304)
- 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.
1 parent dfaf189 commit 9c2b85a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmake/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ if(NOT WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
551551
endif()
552552

553553
find_package(Patch)
554-
if (WIN32 AND NOT Patch_FOUND)
554+
if (CMAKE_HOST_WIN32 AND NOT Patch_FOUND)
555555
# work around CI machines missing patch from the git install by falling back to the binary in this repo.
556556
# replicate what happens in https://github.com/Kitware/CMake/blob/master/Modules/FindPatch.cmake but without
557557
# the hardcoded suffixes in the path to the patch binary.

java/build-android.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ task sourcesJar(type: Jar) {
105105

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

111111
task javadocJar(type: Jar, dependsOn: javadoc) {

0 commit comments

Comments
 (0)