Skip to content

Commit ac20e71

Browse files
ymarianhunterstich
authored andcommitted
Automated g4 rollback of changelist 313592154
PiperOrigin-RevId: 320240950 (cherry picked from commit bb1f491)
1 parent ecf6352 commit ac20e71

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.gradle.internal.os.OperatingSystem
2+
13
apply plugin: 'com.android.library'
24
apply plugin: 'maven-publish'
35

@@ -168,7 +170,11 @@ task generateApiXml(type: Javadoc) {
168170

169171
doLast {
170172
// Escape incorrect ampersands in API XML file
171-
["sed", "-i", "''", "s/ & / \\& /g", "lib/${apiName}.xml"].execute()
173+
if (OperatingSystem.current().isLinux()) {
174+
["sed", "-i", "s/ & / \\& /g", "lib/${apiName}.xml"].execute()
175+
} else {
176+
["sed", "-i", "''", "s/ & / \\& /g", "lib/${apiName}.xml"].execute()
177+
}
172178
}
173179
}
174180

0 commit comments

Comments
 (0)