File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,39 @@ buildscript {
33
33
}
34
34
}
35
35
36
+ plugins {
37
+ id " de.undercouch.download" version " 4.1.1"
38
+ }
39
+
40
+ task downloadCrowdin (type : Download ) {
41
+ src ' https://crowdin.com/backend/download/project/wireguard.zip'
42
+ dest file(' build/translations.zip' )
43
+ overwrite true
44
+ }
45
+
46
+ task cleanCrowdin (type : Delete ) {
47
+ delete ' ui/src/main/res/values-*/strings.xml'
48
+ }
49
+
50
+ task extractCrowdin (type : Copy , dependsOn : [' downloadCrowdin' , ' cleanCrowdin' ]) {
51
+ mustRunAfter ' downloadCrowdin'
52
+ from zipTree(file(' build/translations.zip' ))
53
+ into file(' build/translations' )
54
+ doFirst {
55
+ delete ' build/translations'
56
+ }
57
+ }
58
+
59
+ task crowdin (type : Copy , dependsOn : [' extractCrowdin' ]) {
60
+ mustRunAfter ' extractCrowdin'
61
+ from ' build/translations/wireguard-android/ui/src/main/res'
62
+ into ' ui/src/main/res/'
63
+ doLast {
64
+ delete ' build/translations'
65
+ delete ' build/translations.zip'
66
+ }
67
+ }
68
+
36
69
allprojects {
37
70
repositories {
38
71
google()
You can’t perform that action at this time.
0 commit comments