diff --git a/briar-android/build.gradle b/briar-android/build.gradle index 8430591c1686538f33f4d6e7dca1c0f91e441755..6be595b8090ef69813e1e57f170198054f19049a 100644 --- a/briar-android/build.gradle +++ b/briar-android/build.gradle @@ -6,12 +6,11 @@ repositories { } dependencies { - def supportVersion = '23.1.1' + def supportVersion = '23.1.1' compile project(':briar-api') compile project(':briar-core') compile fileTree(dir: 'libs', include: '*.jar') - compile fileTree(dir: 'libs', include: '*.jar') compile "com.android.support:support-v4:$supportVersion" compile("com.android.support:appcompat-v7:$supportVersion") { exclude module: 'support-v4' @@ -24,7 +23,6 @@ dependencies { exclude module: 'preference-v7' exclude module: 'recyclerview-v7' } - compile("com.android.support:design:$supportVersion") { exclude module: 'support-v4' exclude module: 'recyclerview-v7' @@ -80,6 +78,7 @@ android { buildTypes { debug { + // Set this to true to run proguard in debug minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } diff --git a/briar-android/proguard-rules.txt b/briar-android/proguard-rules.txt index 2bdc21e2aa6f24e2a19db25c29798fd43d5c3966..dcdd8c59a67aa8a72beafbddf820ca5edf56894d 100644 --- a/briar-android/proguard-rules.txt +++ b/briar-android/proguard-rules.txt @@ -1,12 +1,12 @@ --optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify +-dontobfuscate -verbose -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* --ignorewarnings --renamesourcefileattribute SourceFile --keepattributes SourceFile,LineNumberTable,*Annotation*,Signature +# For comfortability in case we do obfuscate +# -renamesourcefileattribute SourceFile +-keepattributes SourceFile,LineNumberTable,*Annotation*,Signature, InnerClasses, EnclosingMethod -keep public class * extends android.app.Activity -keep public class * extends android.app.Application @@ -40,8 +40,17 @@ void *(**On*Event); } +-keep class org.h2.** { *; } -keep class org.briarproject.** { *; } -keep class com.google.inject.** { *; } -keep class javax.inject.** { *; } -keep class javax.annotation.** { *; } --keep class roboguice.** { *; } \ No newline at end of file +-keep class roboguice.** { *; } + +-dontwarn org.h2.** +-dontnote org.h2.** +-dontwarn net.sf.cglib.** +-dontwarn org.briarproject.plugins.tcp.** +-dontwarn roboguice.** +-dontwarn net.sourceforge.jsocks.** +-dontnote android.support.** \ No newline at end of file diff --git a/briar-android/project.properties b/briar-android/project.properties new file mode 100644 index 0000000000000000000000000000000000000000..629dfb0da17d1cce0b5a8a1df0611abdd6711e37 --- /dev/null +++ b/briar-android/project.properties @@ -0,0 +1,14 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-rules.txt + +# Project target. +target=android-22