This project is created for toptal exam. The application has simple user management and world clocks features. Basically a user can register, and create clocks depending on timezones. Admin level user is also able to manage other users and their clock records.
Since this project contains both server and client application code, it has 3 modules as following;
- app (Android Client Application)
- protocol (Common code between client and server)
- server (Server Application)
For app part, application has;
- Jetpack Libraries
- Arch Components
- Material Theme
- Dagger
- ReactiveX
- RxBinding
- Retrofit
- and many more
On server side;
- Spring Boot Starter Packs
- HSQLDB
- Jackson Faster XML
- Joda Time
- and more
Well, applications can be run directly on the command line or builds can be deployed for non-dev environments.
Server runs with command:
./gradlew bootRun
Android Application can be installed directly to connected device or emulator by:
./gradlew installDebug
After making sure server is running, following command runs instrumentation tests.
./gradlew connectedAndroidTest
In order to run Unit Tests for Android:
./gradlew testDebugUnitTest
On the same machine, server and emulator are configured to work together
without additional tuning. However if required to work on different devices;
app/build.gradle
contains IP and Port information as following:
buildConfigField 'String', 'BASE_URL', '"http://10.0.2.2:8080"'
In addition, for security reasons; Android does not allow cleartext traffic
to an arbitrary IP address, thus app/src/debug/res/xml/network_security_config.xml
should be edited appropriately.
Fat jar for server can be created by;
./gradlew bootJar
jar file will be generated as server/build/libs/toptal-rest-service.jar
.
Similarly APK file can be generated by;
./gradlew aDebug
and APK file will be app/build/outputs/apk/debug/app-debug.apk
.
However careful! IP address, SSL certificate, Android App Signing certificate is not prepared. They should be handled carefully prior tp deploying production. But it is out of the scope of this project.