diff --git a/build.gradle b/build.gradle index ede96428..26d23947 100644 --- a/build.gradle +++ b/build.gradle @@ -155,3 +155,21 @@ dependencies { implementation 'androidx.room:room-ktx:2.3.0' kapt 'androidx.room:room-compiler:2.3.0' } + +// using a task as a preBuild dependency instead of a function that takes some time insures that it runs +task detectAndroidLocals { + Set langsList = new HashSet<>() + + // in /res are (almost) all languages that have a translated string is saved. this is safer and saves some time + fileTree("src/main/res").visit { FileVisitDetails details -> + if (details.file.path.endsWith("strings.xml") + && details.file.canonicalFile.getText('UTF-8').contains("