diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b5af9d4e7..65c0e1ef6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -56,43 +56,48 @@ If you wish to rebase you should be following the [Golden Rule](https://www.atla ### Building -The default build is `debug`, with this variant you can use a debugger while developing. To install the application click the `run` button in Android Studio with the `app` configuration selected while you have a device connected. All other build types but `release` can be ignored, the `release` build is what gets uploaded to the Google Play store and can be built locally with the dummy credentials/keystore provided. +The Kiwix app is split into 3 modules +1. `core` - the "core" functionality of the app shared between different clients +1. `app` - the main app Kiwix, Wikipedia Offline +1. `custom` - this is for building custom applications that supply only 1 zim file and a custom skin + +The default build is `debug`, with this variant you can use a debugger while developing. To install the application click the `run` button in Android Studio with the `app` configuration selected while you have a device connected. The `release` build is what gets uploaded to the Google Play store and can be built locally with the dummy credentials/keystore provided. By default we fetch kiwix-lib, the key component for interacting with ZIM files from maven, but if you wish to use your own locally compiled version for testing purposes, then you can create the directory `app/libs` and place your .aar file inside it to have it used instead. ### Testing -Unit tests are located in `app/src/test` and to run them locally you +Unit tests are located in `[module]/src/test` and to run them locally you can use the gradle command: - $ gradlew testKiwixDebugUnitTest + $ gradlew testDebugUnitTest or the abbreviated: - $ gradlew tKDUT + $ gradlew tDUT -Automated tests that require a connected device (UI related tests) are located in `app/src/androidTest` & `app/src/androidTestKiwix`, to run them locally you can use the gradle command: +Automated tests that require a connected device (UI related tests) are located in `[module]/src/androidTest` & `app/src/androidTestKiwix`, to run them locally you can use the gradle command: - $ gradlew connectedKiwixDebugAndroidTest + $ gradlew connectedDebugAndroidTest or the abbreviated: - $ gradlew cKDAT + $ gradlew cDAT -All local test results can be seen under `app/build/reports/` +All local test results can be seen under `[module]/build/reports/` ### Code coverage To generate coverage reports for your unit tests run: - $ gradlew jacocoTestKiwixDebugUnitTest + $ gradlew jacocoTestReport To generate coverage reports for your automated tests run: - $ gradlew createKiwixDebugCoverageReport + $ gradlew jacocoInstrumentationTestReport -Code coverage results can be seen under `app/build/reports/` +Code coverage results can be seen under `[module]/build/reports/` ### Continous Integration diff --git a/README.md b/README.md index 64f8fbcc8..207a7fb3c 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,7 @@ pieces in Java). ## Build Instructions -Production releases of the app should be built with our companion -build repository [kiwix-build](https://github.com/kiwix/kiwix-build). +Production releases of the app are built on travis and released automatically To build this repository alone for development purposes you can simply import the project into Android Studio and the hard work will be done @@ -34,8 +33,7 @@ for you. If you prefer to build without Android Studio you must first set up the Android SDK and then run the command: `./gradlew build ` from the root directory of the project. -We utilize different build variants (flavors) to build various versions of our app. Ensure your build variant is -`kiwixDebug` to build the standard app. +Kiwix-Android is a multi-module project, in 99% of scenarios you will want to build the `app` module in the `debug` configuration. ## Libraries Used