{"id":20414548,"url":"https://github.com/codecov/example-kotlin-flat","last_synced_at":"2025-06-25T06:01:56.261Z","repository":{"id":62380176,"uuid":"290263618","full_name":"codecov/example-kotlin-flat","owner":"codecov","description":"Kotlin codecov example with standard file structure","archived":false,"fork":false,"pushed_at":"2024-01-23T17:15:42.000Z","size":67,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-06-22T01:02:25.916Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codecov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2020-08-25T16:16:12.000Z","updated_at":"2024-08-02T15:39:30.000Z","dependencies_parsed_at":"2024-11-15T12:16:41.578Z","dependency_job_id":null,"html_url":"https://github.com/codecov/example-kotlin-flat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codecov/example-kotlin-flat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecov%2Fexample-kotlin-flat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecov%2Fexample-kotlin-flat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecov%2Fexample-kotlin-flat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecov%2Fexample-kotlin-flat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codecov","download_url":"https://codeload.github.com/codecov/example-kotlin-flat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecov%2Fexample-kotlin-flat/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261816051,"owners_count":23213839,"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-11-15T06:11:00.764Z","updated_at":"2025-06-25T06:01:55.399Z","avatar_url":"https://github.com/codecov.png","language":"Kotlin","readme":"# [Codecov](https://codecov.io) Kotlin Example with standard file structure\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcodecov%2Fexample-kotlin-flat.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fexample-kotlin-flat?ref=badge_shield)\n\n## Guide\n\n**Using maven?** See [maven kotlin example](https://github.com/codecov/example-kotlin)\n\n### Travis Setup\n\nAdd to your `.travis.yml` file.\n```yml\nlanguage: java\nafter_success:\n  - bash \u003c(curl -s https://codecov.io/bash)\n```\n### Produce Coverage Reports\n#### Add Jacoco plugin\n```xml\nplugins {\n    ...\n    jacoco\n}\n\n...\n\ntasks.withType\u003cJacocoReport\u003e {\n    reports {\n        xml.isEnabled = true\n        csv.isEnabled = false\n        html.isEnabled = false\n    }\n}\n```\n## Caveats\n### Fixes for the report file paths\nThe standard file structure for kotlin omits the common prefix for packages, for example: `org.jacoco.examples.gradle`. Jacoco will render its reports with the complete import path, which can throw off codecov when it start looking for the files. To fix the issues, create a `codecov.yml` and add this content in it.\n\n```yaml\nfixes:\n  - \"src/main/org/jacoco/examples/gradle/kotlin/::src/main/kotlin/\" \n  - \"src/test/org/jacoco/examples/gradle/kotlin/::src/test/kotlin/\" \n```\n\nReplacing `org/jacoco/examples/gradle` with your own package prefix.\n\n### Private Repo\nRepository tokens are required for (a) all private repos, (b) public repos not using Travis-CI, CircleCI or AppVeyor. Find your repository token at Codecov and provide via appending `-t \u003cyour upload token\u003e` to you where you upload reports.\n\n## Links\n- [Community Boards](https://community.codecov.io)\n- [Support](https://codecov.io/support)\n- [Documentation](https://docs.codecov.io)\n\n## License\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcodecov%2Fexample-kotlin-flat.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fexample-kotlin-flat?ref=badge_large)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecov%2Fexample-kotlin-flat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodecov%2Fexample-kotlin-flat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecov%2Fexample-kotlin-flat/lists"}