{"id":13662917,"url":"https://github.com/mob-sakai/GitDependencyResolverForUnity","last_synced_at":"2025-04-25T13:30:37.943Z","repository":{"id":40309066,"uuid":"186792495","full_name":"mob-sakai/GitDependencyResolverForUnity","owner":"mob-sakai","description":"This plugin resolves git url dependencies in the package for Unity Package Manager. You can use a git url as a package dependency!","archived":false,"fork":false,"pushed_at":"2021-01-08T15:49:16.000Z","size":168,"stargazers_count":248,"open_issues_count":9,"forks_count":33,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-08-03T05:15:56.098Z","etag":null,"topics":["dependency","git","package","package-manager","unity","unity3d"],"latest_commit_sha":null,"homepage":null,"language":"C#","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/mob-sakai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-15T09:19:39.000Z","updated_at":"2024-08-02T09:45:43.000Z","dependencies_parsed_at":"2022-06-28T20:02:59.195Z","dependency_job_id":null,"html_url":"https://github.com/mob-sakai/GitDependencyResolverForUnity","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mob-sakai%2FGitDependencyResolverForUnity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mob-sakai%2FGitDependencyResolverForUnity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mob-sakai%2FGitDependencyResolverForUnity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mob-sakai%2FGitDependencyResolverForUnity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mob-sakai","download_url":"https://codeload.github.com/mob-sakai/GitDependencyResolverForUnity/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224003724,"owners_count":17239495,"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":["dependency","git","package","package-manager","unity","unity3d"],"created_at":"2024-08-02T05:02:12.042Z","updated_at":"2024-11-10T19:30:32.328Z","avatar_url":"https://github.com/mob-sakai.png","language":"C#","funding_links":["https://www.patreon.com/join/mob_sakai?"],"categories":["C\\#","C#","UPM Utilities"],"sub_categories":[],"readme":"Git Dependency Resolver For Unity\n===\n\nThis plugin resolves git-based dependencies in the package for Unity Package Manager.  \nYou can use git repositories url as a package dependencies! :+1:\n\n![logo](https://user-images.githubusercontent.com/12690315/57779067-636a7e00-7760-11e9-8f4a-06bbaee402e8.png)\n\n[![](https://img.shields.io/npm/v/com.coffee.git-dependency-resolver?label=openupm\u0026registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.coffee.git-dependency-resolver/)\n[![](https://img.shields.io/github/v/release/mob-sakai/GitDependencyResolverForUnity?include_prereleases)](https://github.com/mob-sakai/GitDependencyResolverForUnity/releases)\n[![](https://img.shields.io/github/release-date/mob-sakai/GitDependencyResolverForUnity.svg)](https://github.com/mob-sakai/GitDependencyResolverForUnity/releases)\n![](https://img.shields.io/badge/unity-2018.3%20or%20later-green.svg)\n[![](https://img.shields.io/github/license/mob-sakai/GitDependencyResolverForUnity.svg)](https://github.com/mob-sakai/GitDependencyResolverForUnity/blob/upm/LICENSE.txt)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-orange.svg)](http://makeapullrequest.com)\n[![](https://img.shields.io/twitter/follow/mob_sakai.svg?label=Follow\u0026style=social)](https://twitter.com/intent/follow?screen_name=mob_sakai)\n\n\u003c\u003c [Description](#Description) | [Install](#install) | [Usage](#usage) | [Development Note](#development-note) | [Contributing](#contributing) | [Change log][CL] \u003e\u003e\n\n[CL]: https://github.com/mob-sakai/GitDependencyResolverForUnity/blob/upm/CHANGELOG.md\n\n\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n## Description\n\nIn Unity 2018.3, [the Unity Package Manager (UPM) supported Git](https://forum.unity.com/threads/git-support-on-package-manager.573673/). :)\n\nThis update allows us to quickly install packages on code hosting services such as GitHub.\n\nHowever, UPM does not support git-based dependencies in the package. :(\n\n```\n[ package-a/package.json ]\n{\n  \"name\": \"com.coffee.package-a\",\n  \"version\": \"0.1.0\",\n  \"dependencies\": {\n    \"com.coffee.core-a\" : \"https://github.com/mob-sakai/GitPackageTest#core-a-0.1.0\"\n  }\n}\n```\nWhen the above package is installed, the following error occur.\n![console](https://user-images.githubusercontent.com/12690315/57829436-e84daa00-77e9-11e9-84af-f5e46b1f0f02.png)\n\n**Git-based dependencies in packages** feature is on the roadmap for 2020, [but no specific ETA](https://forum.unity.com/threads/custom-package-with-git-dependencies.628390/#post-5367033).\n\n\u003cbr\u003e\n\nThis plugin resolves git-based dependencies in the package.  \nYou can use git repositories url as a package dependencies! :+1:\n\n\n### Features\n\n* Easy to use: just install\n* Resolve git-based dependencies in packages\n* Automatically uninstall unused packages that is installed by this plugin\n* Support GitHub, Bitbucket, GitLab, etc.\n* Support private repository\n* Support Unity 2018.3 or later\n* Support .Net 3.5 and 4.x\n* Update package with a specific tag/branch/hash\n* Deterministic package installation\n* Support CI environment\n* Support [path query parameter (sub-directory)](https://forum.unity.com/threads/some-feedback-on-package-manager-git-support.743345/) even Unity 2019.2 or earlier\n  * path must be a relative path to the root of the repository.\n  * path query parameter **must** be placed **before** the revision anchor. The reverse order will fail.\n  * A package manifest (package.json) is expected in the specified path.\n  * e.g. With Path query parameter: `https://github.com/user/repo.git?path=/example/folder`\n  * e.g. With revision anchor and path query parameter: `https://github.com/user/repo.git?path=/example/folder#v1.2.3`\n\n\n### Notes\n\nFrom: https://forum.unity.com/threads/git-support-on-package-manager.573673/page-3#post-4552084\n\n\u003e There is no conflict detection and/or resolution algorithm.\n\u003e The lastest package found with the same name is used.\n\u003e This is not how the package manager resolve dependency (See https://docs.unity3d.com/Manual/upm-conflicts-auto.html).\n\nIn Unity's algorithm, package conflicts are resolved by \"dependency-level from root\".  \nThe all packages resolved by this plugin are \"dependency-level=1\".  \nTherefore, in some cases, the package of the intended version may not be installed.\n\nFor example, in the case of a project with a dependency graph like this:\n\n```\nproject (root)\n ├ package A: 1.0.0\n │  └ package X: 2.0.0\n └ package B: 1.0.0\n    └ package C: 2.0.0\n       └ package X: 2.0.1\n```\n\n**This plugin's algorithm**\n\nInstall -\u003e A: 1.0.0, B: 1.0.0, C: 2.0.0, X: **2.0.1**\n\n**Unity's algorithm**\n\nInstall -\u003e A: 1.0.0, B: 1.0.0, C: 2.0.0, X: **2.0.0**\n\n\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n## Installation\n\n### Requirement\n\n* Unity 2018.3 or later\n\n### Using OpenUPM\n\nThis package is available on [OpenUPM](https://openupm.com). \nYou can install it via [openupm-cli](https://github.com/openupm/openupm-cli).\n```\nopenupm add com.coffee.git-dependency-resolver\n```\n\n### Using Git\n\nFind the `manifest.json` file in the `Packages` directory in your project and edit it as follows:\n```\n{\n  \"dependencies\": {\n    \"com.coffee.git-dependency-resolver\": \"https://github.com/mob-sakai/GitDependencyResolverForUnity.git\",\n    ...\n  },\n}\n```\nTo update the package, change suffix `#{version}` to the target version.\n\n* e.g. `\"com.coffee.git-dependency-resolver\": \"https://github.com/mob-sakai/GitDependencyResolverForUnity.git#1.2.0\",`\n\nOr, use [UpmGitExtension](https://github.com/mob-sakai/UpmGitExtension) to install and update the package.\n\n\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n## Usage\n\n### For package user\n\n* Install this plugin.\n  * See [installation section](#installation).\n* If the dependencies are not resolved successfully, reopen the project. If that does not work, try the following:\n   1. Close the project.\n   2. Delete `Library/ScriptAssemblies` directory in the project.\n   3. Open the project.\n* When `Unity Package Manager Error` window is opens, click `Continue`.  \n![window](https://user-images.githubusercontent.com/12690315/57823865-08726e80-77d4-11e9-8203-46bf22d504d9.png)\n* Add `Packages/.*` to `.gitignore` to hide auto-installed package. \n\n### For package developer\n\n* Find the `package.json` file in your package and edit it as follows:\n```\n{\n  ...\n  \"gitDependencies\": {\n    \"your.package\": \"https://github.com/yourname/yourpackage.git#v1.2.3\",\n    ...\n  }\n}\n```\n* You can use [path query parameter (sub-directory)](https://forum.unity.com/threads/some-feedback-on-package-manager-git-support.743345/) even Unity 2019.2 or earlier.\n  * e.g. `\"your.package\": \"https://github.com/yourname/yourpackage.git?path=/pkg/dir#v1.2.3\"`\n  * path must be a relative path to the root of the repository.\n  * path query parameter **must** be placed **before** the revision anchor. The reverse order will fail.\n  * A package manifest (package.json) is expected in the specified path.\n* You **must** use `gitDependencies` instead of `dependencies` to define git-based dependencies for the package.\n  * This plugin also supports `dependencies` to resolve git-based dependencies, but if `dependencies` include packages that UPM can't resolve, it will fail to start Unity in CI environment.\n* You **must** announce to your package users that they must install `com.coffee.git-dependency-resolver`.\n  * See [installation section](#installation).\n* It is recommended to use [SemVer](https://semver.org/) as a tag or branch name.  \n  * e.g. `1.0.0`, `0.5.0-preview10`, `0.1.0-alpha+daily5`\n\n\n\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n## Contributing\n\n### Issues\n\nIssues are very valuable to this project.\n\n- Ideas are a valuable source of contributions others can make\n- Problems show where this project is lacking\n- With a question you show where contributors can improve the user experience\n\n### Pull Requests\n\nPull requests are, a great way to get your ideas into this repository.  \nSee [CONTRIBUTING.md](/../../blob/develop/CONTRIBUTING.md).\n\n### Support\n\nThis is an open source project that I am developing in my spare time.  \nIf you like it, please support me.  \nWith your support, I can spend more time on development. :)\n\n[![](https://user-images.githubusercontent.com/12690315/50731629-3b18b480-11ad-11e9-8fad-4b13f27969c1.png)](https://www.patreon.com/join/mob_sakai?)  \n[![](https://user-images.githubusercontent.com/12690315/66942881-03686280-f085-11e9-9586-fc0b6011029f.png)](https://github.com/users/mob-sakai/sponsorship)\n\n\n\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n## License\n\n* MIT\n* [MiniJson](https://gist.github.com/darktable/1411710) by Calvin Rien\n* [SemVer](https://github.com/maxhauser/semver) by Max Hauser\n\n\n\n## Author\n\n[mob-sakai](https://github.com/mob-sakai)\n[![](https://img.shields.io/twitter/follow/mob_sakai.svg?label=Follow\u0026style=social)](https://twitter.com/intent/follow?screen_name=mob_sakai)\n\n\n\n## See Also\n\n* GitHub page : https://github.com/mob-sakai/GitDependencyResolverForUnity\n* Releases : https://github.com/mob-sakai/GitDependencyResolverForUnity/releases\n* Issue tracker : https://github.com/mob-sakai/GitDependencyResolverForUnity/issues\n* Change log : https://github.com/mob-sakai/GitDependencyResolverForUnity/blob/upm/CHANGELOG.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmob-sakai%2FGitDependencyResolverForUnity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmob-sakai%2FGitDependencyResolverForUnity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmob-sakai%2FGitDependencyResolverForUnity/lists"}