{"id":50718403,"url":"https://github.com/overpas/depstoml","last_synced_at":"2026-06-09T21:03:24.139Z","repository":{"id":172806367,"uuid":"649800541","full_name":"overpas/depstoml","owner":"overpas","description":"A CLI tool facilitating migration from buildSrc-hardcoded dependencies to Gradle version catalog TOML file in Kotlin projects","archived":false,"fork":false,"pushed_at":"2026-06-03T09:33:28.000Z","size":56914,"stargazers_count":1,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-03T11:16:11.951Z","etag":null,"topics":["buildsrc","gradle-version-catalogs","kotlin","toml"],"latest_commit_sha":null,"homepage":"","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/overpas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-06-05T17:00:49.000Z","updated_at":"2024-10-05T16:52:32.000Z","dependencies_parsed_at":"2025-06-04T17:27:38.651Z","dependency_job_id":"59a51940-5a42-44c6-b695-54fb3bb72bdc","html_url":"https://github.com/overpas/depstoml","commit_stats":null,"previous_names":["overpas/depstoml"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/overpas/depstoml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overpas%2Fdepstoml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overpas%2Fdepstoml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overpas%2Fdepstoml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overpas%2Fdepstoml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/overpas","download_url":"https://codeload.github.com/overpas/depstoml/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overpas%2Fdepstoml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34125332,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"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":["buildsrc","gradle-version-catalogs","kotlin","toml"],"created_at":"2026-06-09T21:03:22.841Z","updated_at":"2026-06-09T21:03:24.130Z","avatar_url":"https://github.com/overpas.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# depstoml\n[![CI](https://github.com/overpas/depstoml/actions/workflows/ci.yml/badge.svg)](https://github.com/overpas/depstoml/actions/workflows/ci.yml)\n\nA CLI tool facilitating migration from `buildSrc`-hardcoded dependencies to Gradle version catalog TOML file in Kotlin projects\n\n### Installation\n\nDownload the `depstoml-x.x.jar` file from the latest GitHub release and launch it with corresponding arguments\n\n### Usage\n\n```\n$ java -jar depstoml-x.x.jar [OPTIONS] deps [toml]\n```\n\nSample deps value: `buildSrc/src/main/kotlin/Dependencies.kt`\n\nSample toml value: `gradle/libs.versions.toml`\n\n#### Options\n- `-o`, `--order-lexicographically` - if you want to sort the dependencies lexicographically\n- `-r`, `--replace-usages` - if you want to replace usages of old dependencies with new ones in build.gradle.kts files\n\n#### Arguments\n- `deps` - path to Kotlin dependencies file\n- `toml` - generated libs.versions.toml file path (defaults to current directory)\n\nYour Kotlin dependencies file in `buildSrc` (or `build-logic`, or whatever) is expected to be structured in 2 possible ways:\n1) versions grouped together with artifacts\n```kotlin\nobject Dependencies {\n\n    object Kotlin {\n\n        private const val version = \"1.8.21\"\n        private const val dateTimeVersion = \"0.4.0\"\n\n        const val gradlePlugin = \"org.jetbrains.kotlin:kotlin-gradle-plugin:$version\"\n        const val dateTime = \"org.jetbrains.kotlinx:kotlinx-datetime:$dateTimeVersion\"\n\n        object Coroutines {\n\n            private const val version = \"1.6.4\"\n\n            const val core = \"org.jetbrains.kotlinx:kotlinx-coroutines-core:$version\"\n            const val test = \"org.jetbrains.kotlinx:kotlinx-coroutines-test:$version\"\n        }\n    }\n\n    object Log {\n\n        private const val version = \"2.6.1\"\n\n        const val napier = \"io.github.aakira:napier:$version\"\n    }\n\n    object Plugins {\n\n        private const val version = \"1.8.21-1.0.11\"\n\n        const val ksp = \"com.google.devtools.ksp:$version\"\n    }\n}\n```\n\n2) versions and artifacts separately\n```kotlin\nobject Versions {\n\n    object Kotlin {\n\n        const val version = \"1.8.21\"\n        const val dateTimeVersion = \"0.4.0\"\n\n        object Coroutines {\n\n            const val version = \"1.6.4\"\n        }\n    }\n\n    object Log {\n\n        const val version = \"2.6.1\"\n    }\n\n    object Plugins {\n\n        const val kspVersion = \"1.8.21-1.0.11\"\n    }\n}\n\nobject Deps {\n\n    object Kotlin {\n\n        const val gradlePlugin = \"org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.Kotlin.version}\"\n        const val dateTime = \"org.jetbrains.kotlinx:kotlinx-datetime:${Versions.Kotlin.dateTimeVersion}\"\n\n        object Coroutines {\n\n            const val core = \"org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.Kotlin.Coroutines.version}\"\n            const val test = \"org.jetbrains.kotlinx:kotlinx-coroutines-test:${Versions.Kotlin.Coroutines.version}\"\n        }\n    }\n\n    object Log {\n\n        const val napier = \"io.github.aakira:napier:${Versions.Log.version}\"\n    }\n\n    object Plugins {\n\n        const val ksp = \"com.google.devtools.ksp:${Versions.Plugins.kspVersion}\"\n    }\n}\n```\n\n###### ! Note that the program can't parse complex logic with `by lazy`, `fun` etc.\n\nSample dependencies file 1 above will generate the following:\n```toml\n[versions]\nkotlin-version = \"1.8.21\"\nkotlin-date-time-version = \"0.4.0\"\nkotlin-coroutines-version = \"1.6.4\"\nlog-version = \"2.6.1\"\nplugins-version = \"1.8.21-1.0.11\"\n\n[libraries]\nkotlin-gradle-plugin = { group = \"org.jetbrains.kotlin\", name = \"kotlin-gradle-plugin\", version.ref = \"kotlin-version\" }\nkotlin-date-time = { group = \"org.jetbrains.kotlinx\", name = \"kotlinx-datetime\", version.ref = \"kotlin-date-time-version\" }\nkotlin-coroutines-core = { group = \"org.jetbrains.kotlinx\", name = \"kotlinx-coroutines-core\", version.ref = \"kotlin-coroutines-version\" }\nkotlin-coroutines-test = { group = \"org.jetbrains.kotlinx\", name = \"kotlinx-coroutines-test\", version.ref = \"kotlin-coroutines-version\" }\nlog-napier = { group = \"io.github.aakira\", name = \"napier\", version.ref = \"log-version\" }\n\n[plugins]\nplugins-ksp = { id = \"com.google.devtools.ksp\", version.ref = \"plugins-version\" }\n```\n\nSample dependencies file 2 above will generate the following:\n```toml\n[versions]\nkotlin-version = \"1.8.21\"\nkotlin-date-time-version = \"0.4.0\"\nkotlin-coroutines-version = \"1.6.4\"\nlog-version = \"2.6.1\"\nplugins-ksp-version = \"1.8.21-1.0.11\"\n\n[libraries]\nkotlin-gradle-plugin = { group = \"org.jetbrains.kotlin\", name = \"kotlin-gradle-plugin\", version.ref = \"kotlin-version\" }\nkotlin-date-time = { group = \"org.jetbrains.kotlinx\", name = \"kotlinx-datetime\", version.ref = \"kotlin-date-time-version\" }\nkotlin-coroutines-core = { group = \"org.jetbrains.kotlinx\", name = \"kotlinx-coroutines-core\", version.ref = \"kotlin-coroutines-version\" }\nkotlin-coroutines-test = { group = \"org.jetbrains.kotlinx\", name = \"kotlinx-coroutines-test\", version.ref = \"kotlin-coroutines-version\" }\nlog-napier = { group = \"io.github.aakira\", name = \"napier\", version.ref = \"log-version\" }\n\n[plugins]\nplugins-ksp = { id = \"com.google.devtools.ksp\", version.ref = \"plugins-ksp-version\" }\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foverpas%2Fdepstoml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foverpas%2Fdepstoml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foverpas%2Fdepstoml/lists"}