This outlines the process to bring this library up to date with the latest changes from the official ZXing project.
This is a "complete" version of the BarcodeScanner project, converted to a library. The first step is to update this.
- Clone the zxing project from Github. The scripts assume that zxing-android-minimal and zxing are in the same folder.
- In
zxing-android-complete
, runruby update.rb
. - Inspect the changes with
git diff
, and check that the changes make sense. - Test that the project can compile and run. A simple way to test is to replace
compile(project(':zxing-android'))
withcompile(project(':zxing-android-complete'))
in sample/build.gradle, and test the sample project. - Commit the changes.
See zxing-android-complete/Readme.md for more details on the conversion process.
This is a stripped-down version of zxing-android-complete. Some of the work to produce the stripped-down version is automated, but some is manual.
The project contain two source folders and two resource folders. src-orig
and res-orig
contain
sources and resources from zxing-android-complete that are either unmodified, or adapted
automatically by the update script. src
and res
contains sources and resources that are manually
adapted for the library.
- Make sure zxing-android-complete is updated (see above).
- In
zxing-android
, runruby update.rb
. - Inspect the changes with
git diff
, and check that the changes make sense. - Inspect
zxing-android/res.patch
andzxing-android/sources.patch
. This contains the diff between the files in ourres
andsrc
folders, and the ones from zxing-android-complete. Use this, along with the changes between that were made in the zxing-android-complete project to these files, to manually update them. - Manually update AndroidManifest.xml if required.
- Test!
- Commit and make a pull request.
Notes:
- Assets (used for the help section) are not covered by this conversion process at all. We need a better overall plan here on how to handle help files (Use the stock Barcode Scanner help files? Completely remove the help section?).