walt: app: update SDK, gradle and NDK version

targetSdkVersion 29
minSdkVersion 21
ndkVersion 21.0.6113669
gradle plugin: 4.4 -> 5.6.4
gradle: 3.1.2 -> 3.6.3

Bug: 149721303
Test: ./gradlew build -x :app:lint
Change-Id: I9266f52059e2b0e9cff3790f9758ff67cad0a0d4
Signed-off-by: Tai Kuo <taikuo@google.com>
diff --git a/android/WALT/WALT.iml b/android/WALT/WALT.iml
index 628d221..f8948c5 100644
--- a/android/WALT/WALT.iml
+++ b/android/WALT/WALT.iml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id="WALT" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
+<module external.linked.project.id="WALT" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
   <component name="FacetManager">
     <facet type="java-gradle" name="Java-Gradle">
       <configuration>
diff --git a/android/WALT/app/build.gradle b/android/WALT/app/build.gradle
index ec99946..71a473c 100644
--- a/android/WALT/app/build.gradle
+++ b/android/WALT/app/build.gradle
@@ -2,18 +2,15 @@
 
 
 android {
-    compileSdkVersion 27
-    buildToolsVersion '27.0.3'
+    compileSdkVersion 29
+    buildToolsVersion '29.0.3'
 
     defaultConfig {
         applicationId "org.chromium.latency.walt"
-        minSdkVersion 17
-        targetSdkVersion 23
+        minSdkVersion 21
+        targetSdkVersion 29
         versionCode 9
         versionName "0.1.9"
-        externalNativeBuild.ndkBuild {
-            arguments "APP_PLATFORM=android-14", "APP_ALLOW_MISSING_DEPS=true"
-        }
     }
 
     externalNativeBuild.ndkBuild {
@@ -30,6 +27,12 @@
             }
         }
     }
+
+    ndkVersion "21.0.6113669"
+
+    lintOptions {
+        abortOnError false
+    }
 }
 
 dependencies {
diff --git a/android/WALT/app/src/main/jni/Android.mk b/android/WALT/app/src/main/jni/Android.mk
index 08d71f2..edf1ddf 100644
--- a/android/WALT/app/src/main/jni/Android.mk
+++ b/android/WALT/app/src/main/jni/Android.mk
@@ -22,9 +22,6 @@
 
 LOCAL_CFLAGS := -g -DUSE_LIBLOG -Werror -Wno-deprecated-declarations
 
-# needed for logcat
-LOCAL_SHARED_LIBRARIES := libcutils
-
 LOCAL_LDLIBS := -lOpenSLES -llog
 
 include $(BUILD_SHARED_LIBRARY)
diff --git a/android/WALT/app/src/main/jni/Application.mk b/android/WALT/app/src/main/jni/Application.mk
index 7c01d06..a6cb06d 100644
--- a/android/WALT/app/src/main/jni/Application.mk
+++ b/android/WALT/app/src/main/jni/Application.mk
@@ -14,4 +14,4 @@
 #
 
 APP_ABI := all
-APP_PLATFORM := android-9
+APP_PLATFORM := android-21
diff --git a/android/WALT/app/src/main/res/xml/preferences.xml b/android/WALT/app/src/main/res/xml/preferences.xml
index 6482571..612c089 100644
--- a/android/WALT/app/src/main/res/xml/preferences.xml
+++ b/android/WALT/app/src/main/res/xml/preferences.xml
@@ -1,5 +1,5 @@
 <android.support.v7.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:walt="http://schemas.android.com/apk/res/org.chromium.latency.walt">
+    xmlns:walt="http://schemas.android.com/apk/res-auto">
 
     <android.support.v7.preference.PreferenceScreen
         android:key="pref_general_screen"
diff --git a/android/WALT/build.gradle b/android/WALT/build.gradle
index 6f09b25..fddf29e 100644
--- a/android/WALT/build.gradle
+++ b/android/WALT/build.gradle
@@ -6,7 +6,7 @@
         jcenter()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.1.2'
+        classpath 'com.android.tools.build:gradle:3.6.3'
 
         // NOTE: Do not place your application dependencies here; they belong
         // in the individual module build.gradle files
@@ -19,4 +19,8 @@
         jcenter()
         maven { url "https://jitpack.io" }
     }
+
+    tasks.withType(JavaCompile) {
+        options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
+    }
 }
diff --git a/android/WALT/gradle/wrapper/gradle-wrapper.properties b/android/WALT/gradle/wrapper/gradle-wrapper.properties
index 933b647..674bdda 100644
--- a/android/WALT/gradle/wrapper/gradle-wrapper.properties
+++ b/android/WALT/gradle/wrapper/gradle-wrapper.properties
@@ -2,4 +2,4 @@
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip