{"id":20082111,"url":"https://github.com/exercism/kotlin","last_synced_at":"2025-04-05T00:09:58.238Z","repository":{"id":37706537,"uuid":"47675865","full_name":"exercism/kotlin","owner":"exercism","description":"Exercism exercises in Kotlin.","archived":false,"fork":false,"pushed_at":"2024-04-30T07:09:20.000Z","size":2111,"stargazers_count":206,"open_issues_count":49,"forks_count":184,"subscribers_count":16,"default_branch":"main","last_synced_at":"2024-05-01T11:25:21.352Z","etag":null,"topics":["community-contributions-paused","exercism-track"],"latest_commit_sha":null,"homepage":"https://exercism.org/tracks/kotlin","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/exercism.png","metadata":{"funding":{"github":["exercism"],"custom":["https://exercism.org/donate"]},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-09T07:31:10.000Z","updated_at":"2024-05-02T14:21:48.918Z","dependencies_parsed_at":"2024-04-15T01:56:19.615Z","dependency_job_id":"a16795fb-3a0d-4918-a4c1-0ed24a6acbbc","html_url":"https://github.com/exercism/kotlin","commit_stats":{"total_commits":678,"total_committers":90,"mean_commits":7.533333333333333,"dds":0.8333333333333334,"last_synced_commit":"a4eab610aa148d191e724889440e79c60338a1d1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fkotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fkotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fkotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fkotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exercism","download_url":"https://codeload.github.com/exercism/kotlin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246112662,"owners_count":20725300,"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":["community-contributions-paused","exercism-track"],"created_at":"2024-11-13T15:41:57.734Z","updated_at":"2025-03-28T23:08:36.293Z","avatar_url":"https://github.com/exercism.png","language":"Kotlin","readme":"# Exercism Kotlin Track\n\n[![Build Status](https://travis-ci.org/exercism/kotlin.svg?branch=master)](https://travis-ci.org/exercism/kotlin)\n\nSource for Exercism Exercises in Kotlin.\n\n## Contributing Guide\n\nFor general information about how to contribute to Exercism, please refer to the [contributing guide](https://exercism.org/docs/building).\n\n## Table of Contents\n\n* [Overview](#overview)\n* [Contributing With Minimal Setup](#contributing-with-minimal-setup)\n* [Getting Familiar With the Codebase](#getting-familiar-with-the-codebase)\n  * [The `exercises` Module](#the-exercises-module)\n  * [The Problem Submodules](#the-problem-submodules)\n* [Advanced: Complete Local Setup](#advanced-complete-local-setup)\n  * [Tip: `gradle clean` before `exercism fetch`](#tip-gradle-clean-before-exercism-fetch)\n\n\n## Overview\n\nThis guide covers contributing to the Kotlin track.  If you are new, this guide is for you.\n\nIf, at any point, you're having any trouble, pop in the [Building Exercism](https://forum.exercism.org/c/exercism/building-exercism/125) category of the [Exercism forum](https://forum.exercism.org/) for help.\n\n## Contributing With Minimal Setup\n\nFirst things first: by contributing to Exercism, you are making this learning tool that much better and improving our industry as a whole... thank you!!!\n\nTo submit a fix for an existing exercise or port an exercise to Kotlin with the least amount of setup:\n\n1. **Ensure you have the basic Java tooling installed:**  JDK 1.8+, an editor and Gradle 2.x.\n\n   (see [exercism.io: Installing Kotlin](https://exercism.org/docs/tracks/kotlin/installation))\n-  **Setup a branch on a fork of [exercism/kotlin](https://github.com/exercism/kotlin) on your computer.**\n\nNext steps:\n   * \"fork\" a repository on GitHub;\n   - install `git`;\n   - \"clone\" a copy of your fork;\n   - configure an \"upstream remote\" (in this case, `exercism/kotlin`);\n   - create a branch to house your work\n-  **Write the codes.**  Do your work on that branch you just created.\n\n   The [Getting Familiar With the Codebase](#getting-familiar-with-the-codebase) section, below, is an orientation.\n-  **Commit, push and create a pull request.**\n\n   Something like:\n   ```\n   $ git add .\n   $ git commit -m \"(An intention-revealing commit message)\"\n   $ git push\n   ```\n\n   It is advised you write meaningful commit messages. [Chris Beams wrote about \"How to Write a Git Commit Message\"](https://chris.beams.io/posts/git-commit/).\n\n-  **Verify that your work passes all tests.**  When you create a pull request (PR), GitHub triggers a build on Travis CI.  Your PR will not be merged unless those tests pass.\n\n## Getting Familiar With the Codebase\n\nThere are two objectives to the design of this build:\n\n1. when a problem is built from within the `exercism/kotlin` repo (i.e. when you, the contributor, are developing the exercise), the tests run against the reference solution;\n2. when a problem is built outside the `exercism/kotlin` repo (when a participant is solving the exercise), the tests run against the \"main\" code.\n\nThis repo is a multi-project gradle build.\n\n### The `exercises` Module\n\nThis is the top-level module, contained in the `exercises` directory.  It is a container for the problem sub-modules.\n\n  * its `build.gradle` points the \"main\" sourceset to the reference solution.\n  * its `settings.gradle` names each of the subprojects, one for each problem in the set.\n\n### The Problem Submodules\n\nThe `exercises` subdirectory contains all of the problem submodules.\nEach problem/submodule is a subdirectory of the same name as its slug.\n\n  * its `build.gradle.kts` names dependencies required to work that problem.\n\nEach problem/submodule has three source sets:\n\n* `src/test/kotlin/` — a test suite defining the edges of the problem\n* `.meta/src/reference/kotlin/` — a reference solution that passes all the tests\n* `src/main/kotlin/` — starter source files, if required/desired *(this directory usually only has a `.keep` file in it)*.\n\nTo run the tests for a specific exercise, run the `test` Gradle task from the exercises\ndirectory. For example:\n\n```bash\ncd exercises\nhttps://github.com/exercism/v3/blob/main/gradlew bob:test\n\n```\n\nSteps for modifying an exercise:\n1. Change the test(s).\n2. Watch the changes fail.\n3. Update the reference solution to make the test(s) pass.\n\n----\n\n## Advanced: Complete Local Setup\n\nIf you are going to make significant contribution(s) to the track, you might find it handy to have a complete local install of exercism on your computer.  This way, you can run the full suite of tests without having to create/update a PR.\n\nThe easiest way to achieve this is simply use the `bin/journey-test.sh` script.  However, you may want to perform other tests, depending on what you are doing.  You can do so by duplicating the setup performed by the `bin/journey-test.sh` script.\n\n### Tip: `gradle clean` before `exercism fetch`\n\nIf you `exercism fetch` after doing a build, the CLI will fail with the following error message:\n\n```\n$ exercism fetch kotlin bob\n2015/09/06 15:03:21 an internal server error was received.\nPlease file a bug report with the contents of 'exercism debug' at: https://github.com/exercism/exercism.io/issues\n```\n\nand if you review the logs of your x-api, you'll find:\n\n```\n127.0.0.1 - - [06/Sep/2015:15:20:56 -0700] \"GET /v2/exercises/kotlin/bob HTTP/1.1\" 500 514949 0.2138\n2015-09-06 15:21:01 - JSON::GeneratorError - source sequence is illegal/malformed utf-8:\n```\n\nThis is because some files generated by the build can't be served from the x-api.  This is by design: the CLI does not serve binaries.  To fix this, simply make sure you do a clean in your `exercism/kotlin` repo before you fetch:\n\n```\ncd ~/workspace/exercism/kotlin/exercises\ngradle clean\ncd ~/workspace/exercism/exercises\nexercism fetch kotlin bob\n```\n","funding_links":["https://github.com/sponsors/exercism","https://exercism.org/donate"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexercism%2Fkotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexercism%2Fkotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexercism%2Fkotlin/lists"}