mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Merge branch '239-proguard-dependency-cleanup' into 'master'
239 proguard dependency cleanup Closes #239 See merge request !89
This commit is contained in:
@@ -6,14 +6,27 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
def supportVersion = '23.1.1'
|
||||
compile project(':briar-api')
|
||||
compile project(':briar-core')
|
||||
compile fileTree(dir: 'libs', include: '*.jar')
|
||||
compile "com.android.support:support-v4:23.1.1"
|
||||
compile "com.android.support:appcompat-v7:23.1.1"
|
||||
compile "com.android.support:preference-v7:23.1.1"
|
||||
compile "com.android.support:preference-v14:23.1.1"
|
||||
compile "com.android.support:design:23.1.1"
|
||||
compile "com.android.support:support-v4:$supportVersion"
|
||||
compile("com.android.support:appcompat-v7:$supportVersion") {
|
||||
exclude module: 'support-v4'
|
||||
}
|
||||
compile("com.android.support:preference-v7:$supportVersion") {
|
||||
exclude module: 'support-v4'
|
||||
}
|
||||
compile("com.android.support:preference-v14:$supportVersion") {
|
||||
exclude module: 'support-v4'
|
||||
exclude module: 'preference-v7'
|
||||
exclude module: 'recyclerview-v7'
|
||||
}
|
||||
compile("com.android.support:design:$supportVersion") {
|
||||
exclude module: 'support-v4'
|
||||
exclude module: 'recyclerview-v7'
|
||||
}
|
||||
compile "org.roboguice:roboguice:2.0"
|
||||
compile "info.guardianproject.panic:panic:0.5"
|
||||
compile "info.guardianproject.trustedintents:trustedintents:0.2"
|
||||
@@ -62,6 +75,19 @@ android {
|
||||
debug.setRoot('build-types/debug')
|
||||
release.setRoot('build-types/release')
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
// Set this to true to run proguard in debug
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||
}
|
||||
release {
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_6
|
||||
targetCompatibility JavaVersion.VERSION_1_6
|
||||
|
||||
56
briar-android/proguard-rules.txt
Normal file
56
briar-android/proguard-rules.txt
Normal file
@@ -0,0 +1,56 @@
|
||||
-dontusemixedcaseclassnames
|
||||
-dontskipnonpubliclibraryclasses
|
||||
-dontpreverify
|
||||
-dontobfuscate
|
||||
-verbose
|
||||
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
|
||||
# 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
|
||||
-keep public class * extends android.app.Service
|
||||
-keep public class * extends android.content.BroadcastReceiver
|
||||
-keep public class * extends android.content.ContentProvider
|
||||
-keep public class com.android.vending.licensing.ILicensingService
|
||||
-keepclasseswithmembers class * { native <methods>; }
|
||||
-keepclasseswithmembers class * {
|
||||
public <init> (android.content.Context, android.util.AttributeSet);
|
||||
}
|
||||
-keepclasseswithmembers class * {
|
||||
public <init> (android.content.Context, android.util.AttributeSet, int);
|
||||
}
|
||||
-keepclassmembers class * implements android.os.Parcelable { static android.os.Parcelable$Creator *; }
|
||||
-keepclassmembers class **.R$* { public static <fields>; }
|
||||
-keepclasseswithmembernames class * { native <methods>; }
|
||||
-keepclassmembers enum * {
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
}
|
||||
-keepclassmembers class * extends android.app.Activity {
|
||||
public void *(android.view.View);
|
||||
}
|
||||
-keepclassmembers class * {
|
||||
@com.google.inject.Inject <init>(...);
|
||||
@com.google.inject.Inject <fields>;
|
||||
}
|
||||
# Just in case Roboguice events are used
|
||||
-keepclassmembers class * {
|
||||
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.** { *; }
|
||||
|
||||
-dontwarn org.h2.**
|
||||
-dontnote org.h2.**
|
||||
-dontwarn net.sf.cglib.**
|
||||
-dontwarn org.briarproject.plugins.tcp.**
|
||||
-dontwarn roboguice.**
|
||||
-dontwarn net.sourceforge.jsocks.**
|
||||
-dontnote android.support.**
|
||||
14
briar-android/project.properties
Normal file
14
briar-android/project.properties
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user