{"id":21569581,"url":"https://github.com/rickbusarow/gradle-dependency-sync","last_synced_at":"2025-04-10T14:07:22.213Z","repository":{"id":37937503,"uuid":"378504119","full_name":"rickbusarow/gradle-dependency-sync","owner":"rickbusarow","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-04T02:24:35.000Z","size":359,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T15:59:47.943Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rickbusarow.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-06-19T21:03:26.000Z","updated_at":"2023-09-27T01:45:57.000Z","dependencies_parsed_at":"2023-10-05T05:22:53.104Z","dependency_job_id":"fcbca407-1fe4-4448-a2c6-9faacfaabfd0","html_url":"https://github.com/rickbusarow/gradle-dependency-sync","commit_stats":null,"previous_names":["rickbusarow/gradle-dependency-sync"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickbusarow%2Fgradle-dependency-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickbusarow%2Fgradle-dependency-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickbusarow%2Fgradle-dependency-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickbusarow%2Fgradle-dependency-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rickbusarow","download_url":"https://codeload.github.com/rickbusarow/gradle-dependency-sync/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248231993,"owners_count":21069430,"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-24T11:09:50.950Z","updated_at":"2025-04-10T14:07:22.193Z","avatar_url":"https://github.com/rickbusarow.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gradle Plugin Portal](https://img.shields.io/gradle-plugin-portal/v/com.rickbusarow.gradle-dependency-sync?style=flat-square)](https://plugins.gradle.org/plugin/com.rickbusarow.gradle-dependency-sync)\n[![License](https://img.shields.io/badge/license-apache2.0-blue?style=flat-square.svg)](https://opensource.org/licenses/Apache-2.0)\n\n## What does it do?\n\nThis Gradle plugin will sync dependency declarations between\na `build.gradle` or `build.gradle.kts` file and\n[Gradle's new .toml file.](https://docs.gradle.org/nightly/userguide/platforms.html#sub:central-declaration-of-dependencies)\n\nThis is useful if you'd like to utilize IntelliJ/Android Studio's built in dependency update warnings,\nor if you're using [Dependabot](https://github.com/dependabot/dependabot-core).  Both of these tools only support\ndependencies which are defined as string literals in a Gradle build file.\n\nIf a dependency is declared in the build file but not in .toml,\nDependencySync will automatically create a new declaration in the toml file.\n\nIf the dependency is declared in both files, but with different versions,\nDependencySync will replace the older version with the newer one.\n\nIf a toml dependency is declared using a version from the `[versions]` section via `version.ref = \"my-dependency-version\"`,\nthen DependencySync will update the declaration for `my-dependency-version` instead.\nIt will then look for any dependencies in the build file which may need to be updated in order to keep both files in sync.\n\n## Config\n\nFirst, create an empty module in your project, such as `:dependency-sync`.  Add this to your root project's `settings.gradle[.kts]`\nDo not add this module as a dependency to any other module.\n\n```kotlin\n// settings.gradle.kts\n\npluginManagement {\n  repositories {\n    gradlePluginPortal()\n  }\n}\n\n...\n\ninclude(\":dependency-sync\")\n```\nNow add a `build.gradle[.kts]` file.  Declare every single external dependency for the entire project here,\nusing the `dependencySync` configuration.  This configuration doesn't do anything,\nbut it's necessary for the IDE and Dependabot to do their parsing.\n\n```kotlin\n// ./dependency-sync/build.gradle.kts\n\nplugins {\n  id(\"com.rickbusarow.gradle-dependency-sync\") version \"0.11.4\"\n}\n\ndependencySync {\n  gradleBuildFile.set(buildFile.path)  // optional -- default is just the build file of the applied module\n  typeSafeFile.set(\"${rootDir}/gradle/libs.versions.toml\") // optional -- this path is the default\n}\n\ndependencies {\n\n  dependencySync(\"com.android.tools.build:gradle:4.2.1\")\n\n  dependencySync(\"androidx.activity:activity-ktx:1.2.3\")\n\n  // ...\n}\n```\n\n## Task\n\nThis task is very fast.  You can obviously just invoke it manually, but you can also try invoking it as part of your CI on Dependabot pull requests.\n\n``` shell\n./gradlew dependencySync\n```\n\n## License\n\n``` text\nCopyright (C) 2021 Rick Busarow\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n     http://www.apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickbusarow%2Fgradle-dependency-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frickbusarow%2Fgradle-dependency-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickbusarow%2Fgradle-dependency-sync/lists"}