Skip to content

Commit

Permalink
Got proguard working, shrank images and killed useless images
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Su committed Jul 30, 2011
1 parent d3ca126 commit 6c5f4d7
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 206 deletions.
2 changes: 2 additions & 0 deletions astrid/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ apikey.keyfile=/etc/todoroo/apikeys

# suppress ant warnings
build.sysclasspath=last

proguard.config=proguard.cfg
5 changes: 5 additions & 0 deletions astrid/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@
replace="\1 true;" />
</target>

<target name="obfuscate">
<property name="proguard.enabled" value="true" />
<antcall target="-obfuscate" />
</target>

<!-- build custom release package with updated version name -->
<target name="release-custom">
<fail message="need to set custom.version.name">
Expand Down
19 changes: 17 additions & 2 deletions astrid/proguard.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,28 @@
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
# -optimizations !class/*,!code/simplification/arithmetic,!field/*
-optimizations method/*,code/simplification,code/removal,code/allocation,class/marking,field/marking

# astrid-specific
-dontobfuscate
-keepattributes SourceFile, SourceDir, LineNumberTable, LocalVariableTable, LocalVariableTypeTable
-keepnames class com.todoroo.**
-keepnames class com.google.**
-libraryjar libs

# ignore reflection-based access from google libraries
-dontwarn com.google.**
-dontnote com.google.common.base.**

# android default preserves
-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 * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService

-keepclasseswithmembernames class * {
native <methods>;
Expand All @@ -34,3 +46,6 @@
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}



Binary file modified astrid/res/drawable-hdpi/footer_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified astrid/res/drawable-hdpi/header_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed astrid/res/drawable-land-mdpi/widget_frame.png
Binary file not shown.
Binary file removed astrid/res/drawable-mdpi/widget_frame.png
Binary file not shown.
Binary file modified astrid/res/drawable/astrid_com_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed astrid/res/drawable/edit_header.png
Binary file not shown.
Binary file modified astrid/res/drawable/edit_titlebar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified astrid/res/drawable/footer_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified astrid/res/drawable/header_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion astrid/res/layout/custom_filter_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
android:padding="5dip"
android:background="@drawable/edit_header"
android:background="@drawable/header_background"
android:baselineAligned="false">

<Button android:id="@+id/add"
Expand Down
201 changes: 0 additions & 201 deletions astrid/res/layout/edit_people_activity.xml

This file was deleted.

2 changes: 1 addition & 1 deletion astrid/res/layout/task_list_body_tag.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
android:visibility="gone"
android:layout_marginTop="10dip"
android:padding="5dip"
android:background="@drawable/edit_header"
android:background="@drawable/footer_background"
android:orientation="horizontal"
android:baselineAligned="false">

Expand Down
2 changes: 1 addition & 1 deletion astrid/src/com/todoroo/astrid/activity/AddOnActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected void onCreate(Bundle savedInstanceState) {
tabHost.getTabContentView(), true);
tabHost.addTab(tabHost.newTabSpec(r.getString(R.string.AOA_tab_installed)).
setIndicator(r.getString(R.string.AOA_tab_installed),
r.getDrawable(R.drawable.ic_menu_archive)).setContent(
r.getDrawable(R.drawable.gl_pencil)).setContent(
R.id.tab_installed));
tabHost.addTab(tabHost.newTabSpec(r.getString(R.string.AOA_tab_available)).
setIndicator(r.getString(R.string.AOA_tab_available),
Expand Down

0 comments on commit 6c5f4d7

Please sign in to comment.