conf: update gradle and proguard files

This patch updates the ProGuard rules of the project to make them pass
with the release configuration.

It also updates the application's gradle file to exclude optional
dependencies described in [1].
These modules are excluded, and these changes are visible in the
ProGuard rules with the "dontwarn" lines.

[1] https://github.com/mangstadt/ez-vcard/wiki/Dependencies

Tuleap: #1156
Change-Id: I7ba94564b984fe8d87efc90de17717001aecce3d
diff --git a/ring-android/app/build.gradle b/ring-android/app/build.gradle
index 9fb426e..64f4621 100644
--- a/ring-android/app/build.gradle
+++ b/ring-android/app/build.gradle
@@ -34,6 +34,8 @@
     // VCard parsing
     compile('com.googlecode.ez-vcard:ez-vcard:0.9.10') {
         exclude module: 'freemarker'
+        exclude module: 'jackson-core'
+        exclude module: 'jsoup'
     }
 
     // Butterknife
diff --git a/ring-android/app/proguard-rules.pro b/ring-android/app/proguard-rules.pro
index 73f2edf..cbafe0c 100644
--- a/ring-android/app/proguard-rules.pro
+++ b/ring-android/app/proguard-rules.pro
@@ -6,8 +6,8 @@
 
 -keep class android.support.v7.widget.LinearLayoutManager { *; }
 
--keep class cx.ring.service.**
--keepclassmembers class cx.ring.service.** { *; }
+-keep,includedescriptorclasses class cx.ring.** { *; }
+-keepclassmembers class cx.ring.** { *; }
 
 #OrmLite uses reflection
 -keep class com.j256.**
@@ -27,3 +27,21 @@
     @com.j256.ormlite.field.ForeignCollectionField <fields>;
     <init>();
 }
+
+-dontwarn ezvcard.io.json.JCardModule
+-dontwarn com.fasterxml.jackson.**
+-dontwarn org.jsoup.**
+-dontwarn freemarker.**
+
+-keep,includedescriptorclasses class ezvcard.io.json.JCardModule { *; }
+-keepclassmembers class ezvcard.io.json.JCardModule { *; }
+-keep,includedescriptorclasses enum ezvcard.io.json.JCardModule { *; }
+-keepclassmembers enum ezvcard.io.json.JCardModule { *; }
+-keep,includedescriptorclasses interface ezvcard.io.json.JCardModule { *; }
+-keepclassmembers interface ezvcard.io.json.JCardModule { *; }
+
+-keep,includedescriptorclasses class com.journeyapps.barcodescanner.** { *; }
+-keepclassmembers class com.journeyapps.barcodescanner.** { *; }
+
+-keep,includedescriptorclasses class se.emilsjolander.stickylistheaders.** { *; }
+-keepclassmembers class se.emilsjolander.stickylistheaders.** { *; }
\ No newline at end of file