[Android] Fixed file path parsing (fixed build on windows)

Vitaliy Grabchuk git at videolan.org
Thu Apr 25 12:14:50 CEST 2019


vlc-android | branch: master | Vitaliy Grabchuk <vitaliygrabchuk at gmail.com> | Tue Apr 16 14:04:28 2019 +0300| [f7709c6b7c5b32bba08c911bea7c5996121fb14f] | committer: Geoffrey Métais

Fixed file path parsing (fixed build on windows)

> https://code.videolan.org/videolan/vlc-android/commit/f7709c6b7c5b32bba08c911bea7c5996121fb14f
---

 vlc-android/build.gradle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/build.gradle b/vlc-android/build.gradle
index d4ee7dde1..5d69375f5 100644
--- a/vlc-android/build.gradle
+++ b/vlc-android/build.gradle
@@ -207,7 +207,7 @@ task buildTranslationArray {
         fileTree("res").visit { FileVisitDetails details ->
             println 'details: '+details
             if(details.file.path.endsWith("strings.xml")){
-                def languageCode = details.file.parent.tokenize('/').last().replaceAll('values-','').replaceAll('-r','-')
+                def languageCode = details.file.parentFile.name.replaceAll('values-','').replaceAll('-r','-')
                 languageCode = (languageCode == "values") ? "en" : languageCode;
                 foundLocales.append("\"").append(languageCode).append("\"").append(",")
             }



More information about the Android mailing list