aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/build.gradle
blob: 7c3c56ccf2abd9eb66ad5eceef767623669c7a30 (plain) (tree)
1
2
3
4
5
6
7
8
9
             
         
                                 
                                    
                                  
                                  
                                   
                                         
                                          
                                

                                   
                                
                                 
                               
                               
                                            
                                           
                                   
                                      

                                           
     

 
         
                                               






























                                                                                 


                               


             
                               
                                                                                                  

     
 
                            
buildscript {
    ext {
        activityVersion = '1.3.1'
        annotationsVersion = '1.2.0'
        appcompatVersion = '1.3.1'
        biometricVersion = '1.1.0'
        collectionVersion = '1.1.0'
        constraintLayoutVersion = '2.1.0'
        coordinatorLayoutVersion = '1.1.0'
        coreKtxVersion = '1.6.0'
        coroutinesVersion = '1.5.2'
        datastoreVersion = '1.0.0'
        desugarVersion = '1.1.5'
        fragmentVersion = '1.3.6'
        jsr305Version = '3.0.2'
        junitVersion = '4.13.2'
        lifecycleRuntimeKtxVersion = '2.3.1'
        materialComponentsVersion = '1.4.0'
        preferenceVersion = '1.1.1'
        zxingEmbeddedVersion = '4.2.0'

        groupName = 'com.wireguard.android'
    }
}

plugins {
    id "de.undercouch.download" version "4.1.2"
}

task downloadCrowdin(type: Download) {
	src 'https://crowdin.com/backend/download/project/wireguard.zip'
	dest file('build/translations.zip')
	overwrite true
}

task cleanCrowdin(type: Delete) {
	delete 'ui/src/main/res/values-*/strings.xml'
}

task extractCrowdin(type: Copy, dependsOn: ['downloadCrowdin', 'cleanCrowdin']) {
	mustRunAfter 'downloadCrowdin'
	from zipTree(file('build/translations.zip'))
	into file('build/translations')
	doFirst {
		delete 'build/translations'
	}
}

task crowdin(type: Copy, dependsOn: ['extractCrowdin']) {
    mustRunAfter 'extractCrowdin'
    from 'build/translations/wireguard-android/ui/src/main/res'
    into 'ui/src/main/res/'
    doLast {
        delete 'build/translations'
        delete 'build/translations.zip'
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

tasks {
    wrapper {
        gradleVersion = "7.1.1"
        distributionSha256Sum = "bf8b869948901d422e9bb7d1fa61da6a6e19411baa7ad6ee929073df85d6365d"
    }
}

apply from: "version.gradle"