 a27d2804f3
			
		
	
	
		a27d2804f3
		
	
	
	
	
		
			
			PNG crunching is not a deterministic process, especially the way aapt does it. This makes the F-Droid builds not reproducible. The easy solution to this is to pre-crunch the PNGs and commit them to git. It also makes the final APK a tiny amount smaller, for whatever reason. https://medium.com/@duhroach/smaller-pngs-and-android-s-aapt-tool-4ce38a24019d
		
			
				
	
	
		
			12 lines
		
	
	
		
			281 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			281 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env sh
 | |
| 
 | |
| set -e
 | |
| set -x
 | |
| 
 | |
| for f in `find $(dirname $0)/../app/src/ -type f -name \*.png`; do
 | |
|     echo $f | grep -Eo '\.9\.png$' && continue  # do not optimized 9-patch, it breaks them
 | |
|     tmpfile=$(mktemp)
 | |
|     aapt singleCrunch -v -i $f -o $tmpfile
 | |
|     mv $tmpfile $f
 | |
| done
 |