{"id":27598530,"url":"https://github.com/bjoernq/intellijjunitpatcher","last_synced_at":"2025-04-22T14:14:54.780Z","repository":{"id":20487583,"uuid":"23765735","full_name":"bjoernQ/IntelliJJUnitPatcher","owner":"bjoernQ","description":"Android Studio Plugin to enable you running standard Java-JUnit tests in the JVM (using robolectric-gradle-plugin)","archived":false,"fork":false,"pushed_at":"2015-02-13T10:08:58.000Z","size":168,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-22T14:14:47.525Z","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/bjoernQ.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}},"created_at":"2014-09-07T17:19:59.000Z","updated_at":"2019-06-05T12:01:40.000Z","dependencies_parsed_at":"2022-08-21T18:20:53.231Z","dependency_job_id":null,"html_url":"https://github.com/bjoernQ/IntelliJJUnitPatcher","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/bjoernQ%2FIntelliJJUnitPatcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjoernQ%2FIntelliJJUnitPatcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjoernQ%2FIntelliJJUnitPatcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjoernQ%2FIntelliJJUnitPatcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bjoernQ","download_url":"https://codeload.github.com/bjoernQ/IntelliJJUnitPatcher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250255772,"owners_count":21400410,"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":"2025-04-22T14:14:54.240Z","updated_at":"2025-04-22T14:14:54.774Z","avatar_url":"https://github.com/bjoernQ.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DEPRECATED AS OF Android Studio 1.1-beta3 / Android Gradle Plugin 1.1.0-rc1 - WON'T WORK ANYMORE AND YOU SHOULD USE THE NOW BUILT IN FUNCTIONALITY\n\n# JUnitPatcher for Android Studio\n\nThis is a very simple plugin which should enable the execution of JUnit tests in the JVM from inside Android Studio.\n\nIt plays together with the Robolectric Gradle Plugin.\n\nAfter installation into Android Studio (tested with 0.8.7) it will patch the classpath of generated JUnit run configurations.\n\nThere is just one thing you should change in your build.gradle file.Add\n\n```\n// always compile tests when assembling the app\nafterEvaluate { project -\u003e\n    String variantTestCompileTaskName = 'compileTestDebugJava';\n    boolean found = false;\n\n    project.tasks.each() { task -\u003e\n        String taskName = task.name;\n        if(taskName.startsWith(\"compileTest\") \u0026\u0026 taskName.endsWith(\"Java\")){\n            if(!found){\n                variantTestCompileTaskName = taskName;\n            }\n            found = true;\n        }\n    };\n\n    project.tasks.each() { task -\u003e\n        String taskName = task.name;\n        if(taskName.startsWith(\"assemble\")){\n            String variantName = taskName.substring(8);\n            task.dependsOn(variantTestCompileTaskName);\n        }\n    };\n\n}\n```\n\n\nto your build file. This way Studio will compile the tests whenever the debug configuration is compiled.\nOtherwise it's possible you will run old versions of your tests in Studio and changes to the tests are not taken into account when running the tests.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjoernq%2Fintellijjunitpatcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbjoernq%2Fintellijjunitpatcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjoernq%2Fintellijjunitpatcher/lists"}