jenkins-bot has submitted this change and it was merged.
Change subject: Fix build script path conversion
......................................................................
Fix build script path conversion
* Fix build script path conversion bugs:
** Check module hierarchy length before indexing.
** Escape the file separator string.
Change-Id: I4fa03f09ae258c18c255c45897e84b4f72dd39b8
---
M settings.gradle
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
Dbrant: Looks good to me, approved
jenkins-bot: Verified
diff --git a/settings.gradle b/settings.gradle
index d738c4d..bd25c51 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,9 +1,13 @@
+import java.util.regex.Matcher
+
def fileExists = {String filename ->
new File(filename).exists()
}
def hierarchyToFilename = { String hierarchy ->
- return hierarchy ? hierarchy.substring(1).replaceAll(':', File.separator)
: hierarchy
+ return hierarchy && hierarchy.length() > 0 ?
+ hierarchy.substring(1).replaceAll(':',
Matcher.quoteReplacement(File.separator)) :
+ hierarchy
}
def includeExists = { String projectPath, String name ->
--
To view, visit https://gerrit.wikimedia.org/r/225341
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4fa03f09ae258c18c255c45897e84b4f72dd39b8
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski <[email protected]>
Gerrit-Reviewer: BearND <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Dbrant <[email protected]>
Gerrit-Reviewer: Mholloway <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits