{"id":13472078,"url":"https://github.com/Catbag/redux-android-sample","last_synced_at":"2025-03-26T15:31:17.950Z","repository":{"id":151726271,"uuid":"70711066","full_name":"Catbag/redux-android-sample","owner":"Catbag","description":"A Android sample that implements Redux architecture with React and NoSQL","archived":false,"fork":false,"pushed_at":"2016-11-26T16:36:04.000Z","size":1567,"stargazers_count":24,"open_issues_count":5,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-30T04:12:51.887Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Catbag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-10-12T14:58:56.000Z","updated_at":"2022-04-30T18:05:58.000Z","dependencies_parsed_at":"2023-05-01T04:31:17.842Z","dependency_job_id":null,"html_url":"https://github.com/Catbag/redux-android-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Catbag%2Fredux-android-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Catbag%2Fredux-android-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Catbag%2Fredux-android-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Catbag%2Fredux-android-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Catbag","download_url":"https://codeload.github.com/Catbag/redux-android-sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245681274,"owners_count":20655162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T16:00:51.729Z","updated_at":"2025-03-26T15:31:17.518Z","avatar_url":"https://github.com/Catbag.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"# redux-android-sample\n\n[![Build Status](http://drone.catbag.com.br/api/badges/Catbag/redux-android-sample/status.svg)](http://drone.catbag.com.br/Catbag/redux-android-sample)\n\nAn Android sample that implements Redux architecture (using [Fluxxan](https://github.com/frostymarvelous/Fluxxan) and [Anvil](https://github.com/zserge/anvil)) and NoSQL (using [SnappyDB](https://github.com/nhachicha/SnappyDB))\n\n# Architecture\n![Gif Sample Redux Architecture](architecture_gif_sample.png)\n\n#App State Example\n``` javascript\n{\n    hasMoreGifs: true,\n    gifs: [{\n        path: \"path\",\n        url: \"url\",\n        title: \"string\",\n        watched: false,\n        status: PAUSED //PAUSED, LOOPING, DOWNLOADING, DOWNLOADED, NOT_DOWNLOADED, DOWNLOAD_FAILED\n    }]\n}\n```\n\n#Tests\n\n- [Testing fundamentals](https://stuff.mit.edu/afs/sipb/project/android/docs/tools/testing/testing_android.html)\n- [Tests The Android Way](https://www.bignerdranch.com/blog/testing-the-android-way/)\n- [Espresso Test Life Cycle](https://jabknowsnothing.wordpress.com/2015/11/05/activitytestrule-espressos-test-lifecycle/)\n- [Tests with Espresso, Mockito, Dagger 2](https://engineering.circle.com/instrumentation-testing-with-dagger-mockito-and-espresso-f07b5f62a85b#.5rti2kl2e)\n- [Espresso Tutorial](http://www.vogella.com/tutorials/AndroidTestingEspresso/article.html#espresso_exercisesimple)\n- [Roboeletric vs Android Test Framework](http://stackoverflow.com/questions/18271474/robolectric-vs-android-test-framework)\n\n###Integration tests\n\n- The integration tests are running on top of espresso framework, and using \nmockito to handle mocks.\n\nTo setup a CI or run tests in command line use this command:\n\n    adb shell am instrument -w br.com.catbag.gifreduxsample.test/android.support.test.runner.AndroidJUnitRunner\n\n\n###Unit tests\n\n- The unit tests are running with [roboeletric](http://robolectric.org/), that is a android test framework with\nbuiltin mock capabilities of android sdk. The roboeletric give us the power to run some unit tests \nwith functions from android SDK without the requirement of an emulator running, what results \nin very fast tests.\n\nTo run unit tests through a CI or command line:\n\n    ./gradlew  clean test --daemon --continue\n\n### Drone CI\n\n#### Running drone build locally\n\n* [Install](http://readme.drone.io/devs/cli/#install:b659b046131d4024ab5e2d3675716bf0) drone CLI\n\n        curl http://downloads.drone.io/drone-cli/drone_linux_amd64.tar.gz | tar zx\n       sudo install -t /usr/local/bin drone\n\n* Run drone build inside project dir\n\n        drone exec --trusted\n        \n#### CI last build reports\n        \n* [Instrumentation tests](https://catbag.github.io/redux-android-sample/app/build/reports/androidTests/connected/)\n* [Unit tests](https://catbag.github.io/redux-android-sample/app/build/reports/tests/debug)\n* [Coverage](https://catbag.github.io/redux-android-sample/app/build/reports/coverage/debug)\n* [PMD](https://catbag.github.io/redux-android-sample/app/build/reports/pmd/pmd.html)\n* [Findbugs](https://catbag.github.io/redux-android-sample/app/build/reports/findbugs/findbugs.html)\n* [Checkstyle](https://catbag.github.io/redux-android-sample/app/build/reports/checkstyle/checstyle.html) (without errors, no page generated)\n* [Artifacts history](https://github.com/Catbag/redux-android-sample/tree/gh-pages)\n\n#Good Practices\n\n###Actions Creators\n\n- Pay attention on action creation UI calls that do something async and \ndispatch action, the main action has to be dispatched before other async\ncreated actions, and its not a good practice dispatch two actions on the \nsame synchronous cycle.\n\n## CODE INSPECT \n\n### How to use\n\n1. Run **check** task on _Gradle Tasks -\u003e verification_\n\n2. After this attention on Android Studio **Run** console\nor on gradle output if you run on terminal.\n\n3. The reports are inside **app/build/reports/tool_name** folders.\n_eg. flux-android-sample/app/build/reports/lint_\n\n4. The inspect tools custom configurations are inside **app/inspect/**\nfolder.\n\n5. Problems found by inspect tools stops the **check** task.\n\n### References\n\n[Summary](http://vincentbrison.com/2014/07/19/how-to-improve-quality-and-syntax-of-your-android-code/)\n\n[Checkstyle](https://github.com/checkstyle/checkstyle)\n\n[FindBugs](http://findbugs.sourceforge.net/)\n\n[PMD](http://pmd.github.io/)\n\n[Android Lint](https://developer.android.com/studio/write/lint.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCatbag%2Fredux-android-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCatbag%2Fredux-android-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCatbag%2Fredux-android-sample/lists"}