{"id":18001573,"url":"https://github.com/hehonghui/gradledemo","last_synced_at":"2025-10-08T21:43:24.581Z","repository":{"id":146185495,"uuid":"64379620","full_name":"hehonghui/GradleDemo","owner":"hehonghui","description":null,"archived":false,"fork":false,"pushed_at":"2016-08-02T04:07:49.000Z","size":273,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-18T13:49:11.963Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hehonghui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-28T08:52:12.000Z","updated_at":"2018-03-12T20:06:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"82c5e1e1-754e-4d08-aa78-be812caf1ee5","html_url":"https://github.com/hehonghui/GradleDemo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hehonghui/GradleDemo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hehonghui%2FGradleDemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hehonghui%2FGradleDemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hehonghui%2FGradleDemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hehonghui%2FGradleDemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hehonghui","download_url":"https://codeload.github.com/hehonghui/GradleDemo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hehonghui%2FGradleDemo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000704,"owners_count":26082837,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-29T23:18:01.131Z","updated_at":"2025-10-08T21:43:24.562Z","avatar_url":"https://github.com/hehonghui.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gradle 相关项目\n\n* translateplugin 为gradle插件, 模拟参数传递等\n* app 为使用translateplugin插件,且配置好checktyle的App, git commit之前会执行 checkstyle\n* app 中使用 Roboletric 进行单元测试, 参考文章 [用Robolectric来做Android unit testing](https://segmentfault.com/a/1190000002904944)\n\n\u003e 使用 Roboletric做单元测试时测试代码在 src/test目录，而不是 src/androidTest目录. 第一次运行 测试用例时会下载相关依赖\n\n\n## 保证项目的代码质量三部曲\n\n1. 代码规范\n2. 单元测试 ( 少量的ui测试 ), 单元测试主要测试热点业务逻辑以及数据相关的接口\n3. Code Review 机制, (代码的逻辑、设计、重构方法等)\n\n\n\u003e 1. git commit 阶段执行 checkstyle\n\u003e 2. git push 阶段执行 ut\n\u003e 3. pull request时执行code review\n\n\n\n## 测试选型\n\n1. Robolectric 、Mockito 测试业务逻辑, 包括 数据库、网络数据解析、Presenter业务逻辑, 脱离Android虚拟机,测试更快速.\n2. Espresso 测试部分稳定的ui逻辑\n\n注意两种测试类型的配置\n\n## 参考文章\n\n* [解读Android官方MVP项目单元测试](http://www.jianshu.com/p/cf446be43ae8)\n* [Google Application Architecture](https://github.com/googlesamples/android-architecture/tree/todo-mvp)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhehonghui%2Fgradledemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhehonghui%2Fgradledemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhehonghui%2Fgradledemo/lists"}