-
Notifications
You must be signed in to change notification settings - Fork 2
Developer Notes
- codetoart/r2-shared-kotlin is forked from readium/r2-shared-kotlin.
- codetoart/r2-streamer-kotlin is forked from readium/r2-streamer-kotlin.
readium/r2-xxx-kotlin repos has master and develop branches. They push their latest code in develop branch. develop branch generally gets merged in master at the time of releases.
codetoart/r2-xxx-kotlin repos has these branches - master, develop, codetoart-master, codetoart-develop. master and develop doesn't play any role here as we can keep watch on these directly from readium/r2-xxx-kotlin remote origin. codetoart-develop is where we push dev code first and at the time of release it should be merged into codetoart-master.
To keep codetoart/r2-xxx-kotlin repos in sync with readium/r2-xxx-kotlin repos, developer should merge readium:develop into codetoart:codetoart-develop. If any merge conflicts then resolve it.
Now to test these changes in FolioReader, publish the HEAD on codetoart:codetoart-develop locally by running gradlew install command. Before running this command, name the version variable in r2-xxx/build.gradle to something uniquely (like "1.0.4-2.dev.1") to avoid any conflict with remote and local releases. This locally released files can be found in maven local directory of the current user (In Windows this might be in "C:\Users\UserName\.m2\repository\com\github\codetoart\r2-xxx-kotlin\1.0.4-2.dev.1").
Change the version in FolioReader-Android/versions.gradle file. FolioReader already has the setup to give priority to look artifact versions first in mavenLocal() directory (See FolioReader-Android/build.gradle). If everything works well, then it is up to developer, whether to commit r2-xxx-kotlin projects with version like ".dev.x" versions to distinguish each merge from readium:develop branch or keep the version number untouched. It would be better to keep increasing ".dev.x" counter for each merge from readium:develop branch.
When times come to release new FolioReader version, first give appropriate unique version for r2-xxx-kotlin repos. Generally, Readium developers give semantic versioning (like "1.0.4"). So to differentiate from their release append a number with a hyphen (like "1.0.4-2"). Commit with an appropriate message and tag it with same version string so that once pushed to remote repos, Jitpack makes a release out of this newly pushed tag.
First, make a release of r2-shared-kotlin and check if the version is released on https://jitpack.io/#codetoart/r2-shared-kotlin. Then embed r2-shared-kotlin version string in r2-streamer-kotlin repo and then release r2-streamer-kotlin. Verify it on https://jitpack.io/#codetoart/r2-streamer-kotlin. By release means pushing tags to the remote repo as explained before. Now embed these release versions in FolioReader-Android/versions.gradle and build the project. If the build is successful, then release FolioReader.
Fork a feature or fix branch from readium:develop, add necessary code, commit it, push to codetoart/r2-xxx-kotlin, open a PR to readium/r2-xxx-kotlin repo to merge this feature or fix branch in readium:develop. Wait till someone merges it. Once merged, fetch readium:develop and merge it in codetoart:codetoart-develop like the way we sync two repos.
If you are confident about this feature or fix branch then, follow these steps. Fork a feature or fix branch from readium:develop, add necessary code, commit it, merge it in codetoart:codetoart-develop, push feature or fix branch to codetoart/r2-xxx-kotlin, open a PR to readium/r2-xxx-kotlin repo to merge this feature or fix branch in readium:develop.