This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="custom_rules"> | |
<!-- | |
Suppress "Warning: can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [classes.jar:META-INF/MANIFEST.MF])". | |
Per http://www.dancartoon.com/2012/01/14/fixing-proguard-warning-cant-write-resource-meta-infmanifest-mf/ | |
Target "-obfuscate" copied from ${sdk.dir}/tools/ant/build.xml v21. | |
--> | |
<target name="-obfuscate"> | |
<if condition="${proguard.enabled}"> | |
<then> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public Bitmap loadBitmapFromFile(INetworkImageType imageType, String fileName, Bitmap reusableBitmap) { | |
Bitmap bitmap = null; | |
File bitmapFile = null; | |
try { | |
bitmapFile = new File(fileName); | |
if (bitmapFile.exists() && bitmapFile.isFile()) { | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Bitmap overlayBitmap(Bitmap bitmap , Bitmap overlay, float overlayRatio) { | |
Bitmap outputBitmap = null; | |
Bitmap resizedOverlay = null; | |
try { | |
if (null == bitmap || null == overlay) { | |
return overlay; | |
} | |
... | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-injars in1.jar | |
-injars in2.jar(!META-INF/MANIFEST.MF) | |
-injars in3.jar(!META-INF/MANIFEST.MF) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Build a path object with all the jar files that must be obfuscated. | |
This include the project compiled source code and any 3rd party jar | |
files. --> | |
<path id="project.jars.ref"> | |
<pathelement location="${preobfuscate.jar.file}" /> | |
<path refid="jar.libs.ref" /> | |
</path> | |
<!-- Set the project jar files Path object into a single property. It'll be | |
all the jar files separated by a platform path-separator. | |
Each path must be quoted if it contains spaces. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Set the project jar files Path object into a single property. It'll be | |
all the jar files separated by a platform path-separator. | |
Each path must be quoted if it contains spaces. | |
--> | |
<pathconvert property="project.jars" refid="jar.libs.ref" pathsep=" "> | |
<firstmatchmapper> | |
<regexpmapper from='^([^ ]*)( .*)$$' to='-injars "\1\2"(!META-INF/MANIFEST.MF)'/> | |
<regexpmapper from='(.*)' to='-injars \1(!META-INF/MANIFEST.MF)'/> | |
</firstmatchmapper> | |
</pathconvert> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple demonstration of an 'implicit' return | |
def implicitReturn() | |
"implicit return\n" | |
end | |
# Simple demonstration of an 'explicit' return. Using an explicit return, | |
# even within a block, will exit the function. | |
def explicitReturn() | |
examples = ["pangolin", "cat", "macgyver"] |