mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 10:46:53 -04:00
update readme/contributing
This commit is contained in:
parent
b132d1c615
commit
b1e07aa2a7
@ -56,43 +56,48 @@ If you wish to rebase you should be following the [Golden Rule](https://www.atla
|
|||||||
|
|
||||||
### Building
|
### 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.
|
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
|
### 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:
|
can use the gradle command:
|
||||||
|
|
||||||
$ gradlew testKiwixDebugUnitTest
|
$ gradlew testDebugUnitTest
|
||||||
|
|
||||||
or the abbreviated:
|
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:
|
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
|
### Code coverage
|
||||||
|
|
||||||
To generate coverage reports for your unit tests run:
|
To generate coverage reports for your unit tests run:
|
||||||
|
|
||||||
$ gradlew jacocoTestKiwixDebugUnitTest
|
$ gradlew jacocoTestReport
|
||||||
|
|
||||||
To generate coverage reports for your automated tests run:
|
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
|
### Continous Integration
|
||||||
|
|
||||||
|
@ -25,8 +25,7 @@ pieces in Java).
|
|||||||
|
|
||||||
## Build Instructions
|
## Build Instructions
|
||||||
|
|
||||||
Production releases of the app should be built with our companion
|
Production releases of the app are built on travis and released automatically
|
||||||
build repository [kiwix-build](https://github.com/kiwix/kiwix-build).
|
|
||||||
|
|
||||||
To build this repository alone for development purposes you can simply
|
To build this repository alone for development purposes you can simply
|
||||||
import the project into Android Studio and the hard work will be done
|
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 `
|
set up the Android SDK and then run the command: `./gradlew build `
|
||||||
from the root directory of the project.
|
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
|
Kiwix-Android is a multi-module project, in 99% of scenarios you will want to build the `app` module in the `debug` configuration.
|
||||||
`kiwixDebug` to build the standard app.
|
|
||||||
|
|
||||||
## Libraries Used
|
## Libraries Used
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user