diff --git a/app/build.gradle b/app/build.gradle
index dc6e87f6636f1913f672644c9d89c3151242a569..4ec53aa916f48cb90f62baba68dee056d3a847c9 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -18,6 +18,8 @@ android {
     applicationId "se.leap.bitmaskclient"
     versionCode 137
     versionName "0.9.10"
+    minSdkVersion 16
+    targetSdkVersion 27
     resValue "string", "app_name", appName
     vectorDrawables.useSupportLibrary = true
     buildConfigField 'boolean', 'openvpn3', 'false'
@@ -226,7 +228,7 @@ def processFileInplace(file, Closure processText) {
   file.write(processText(text))
 }
 
-task copyIcsOpenVPNClasses( type: Copy ) {
+task copyIcsOpenVPNClasses(dependsOn: 'copyIcsOpenVPNFiles', type: Copy  ) {
   println "copyIcsOpenVPNClasses"
 //  from ('../ics-openvpn/main/') {
 //    include '**/LaunchVPN.java'
@@ -255,7 +257,7 @@ task copyIcsOpenVPNClasses( type: Copy ) {
 //  } into '.'
 }
 
-task copyIcsOpenVPNXml( type: Copy )  {
+task copyIcsOpenVPNXml(dependsOn: 'copyIcsOpenVPNFiles', type: Copy )  {
   println "copyIcsOpenVPNXml"
   from ('../ics-openvpn/main/') {
     include '**/strings.xml'
@@ -272,7 +274,7 @@ task copyIcsOpenVPNXml( type: Copy )  {
   } into '.'
 }
 
-task copyIcsOpenVPNImages( type: Copy ) {
+task copyIcsOpenVPNImages(dependsOn: 'copyIcsOpenVPNFiles', type: Copy ) {
   println "copyIcsOpenVPNImages"
 //  from ('../ics-openvpn/main/') {
 //    include '**/ic_filter*.png'
@@ -302,7 +304,7 @@ task copyIcsOpenVPNImages( type: Copy ) {
 }
 
 // thanks to http://pleac.sourceforge.net/pleac_groovy/fileaccess.html
-task removeDuplicatedStrings() {
+def removeDuplicatedStrings() {
   println "removeDuplicatedStrings"
   new File('.').eachFileRecurse {
     if(it.name.equals('strings.xml') || it.name.equals('plurals.xml')) {
@@ -325,7 +327,7 @@ def replaceDuplicatesForSource(File it, String type) {
   }
 }
 
-task mergeUntranslatable( type: Copy ) {
+task mergeUntranslatable(dependsOn: 'copyIcsOpenVPNFiles',  type: Copy ) {
   println "mergeUntranslatable"
   from ('../ics-openvpn/main/') {
     include '**/untranslatable.xml'
@@ -358,19 +360,20 @@ task mergeUntranslatable( type: Copy ) {
   delete ics_openvpn_untranslatable
 }
 
-task copyIcsOpenVPNFiles( type: Copy ) {
+task copyIcsOpenVPNFiles(dependsOn: 'updateIcsOpenVpn') {
   println "copyIcsOpenVPNFiles"
-  copyIcsOpenVPNClasses.execute()
-  copyIcsOpenVPNXml.execute()
-  copyIcsOpenVPNImages.execute()
+
+/*  copyIcsOpenVPNClasses
+  copyIcsOpenVPNXml
+  copyIcsOpenVPNImages
   //mergeUntranslatable.execute()
-  removeDuplicatedStrings.execute()
+  removeDuplicatedStrings()*/
 }
 
 task updateIcsOpenVpn( type: Exec ) {
   commandLine 'git', 'submodule', 'sync'
   commandLine 'git', 'submodule', 'update', '--init', '--recursive'
-  copyIcsOpenVPNFiles.execute()
+
 }
 
 
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index a6752cf7a22c67c7f4fea8d173ff475ec8c96b6d..86c9a74b6faf093532da1a0a96b5bc6fa34ff8b4 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -17,9 +17,6 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="se.leap.bitmaskclient">
     <!-- package is overwritten in build.gradle -->
-    <uses-sdk
-        android:minSdkVersion="16"
-        android:targetSdkVersion="27" />
 
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
diff --git a/build.gradle b/build.gradle
index 169954178eb689b5e6459609b6b7ad34727c0a9c..bb336511ce4b3be5f1df179a137a17c5cdc6f3c4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -6,9 +6,10 @@ buildscript {
     }
     mavenCentral()
     jcenter()
+      google()
   }
   dependencies {
-    classpath 'com.android.tools.build:gradle:3.0.1'
+    classpath 'com.android.tools.build:gradle:3.4.1'
   }
 }
 
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index b842d2c42ed5240001a49d2be5c4347b4171327a..e264661d03bc5817d3a2c6370465fa00f16a689a 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Sat Apr 08 20:47:40 EDT 2017
+#Sun May 19 00:15:53 CEST 2019
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip