We use a combination of Paket and Paket.Unity3D in our projects for internal dependency management. There is also a wrapper called Wooget for both, but since we don't maintain it anymore, i will not cover it.
We always need 2 steps to update depenencies:
- Paket to Install all defined depenency for your project.
- Paket.Unity3D to add them to the Unity Project.
The Documentation is based on the recommended project structure.
There is a new repository atlas-paket for paket support with gradle. I highly recommend to use this plugin if you use paket and gradle (specially on build machines).
https://fsprojects.github.io/Paket/installation.html or just run
brew install paket
Using brew
will ensure mono
is installed since it's defined as dependency.
I recommend to download and copy
paket.bootstrapper.exe
into.paket
and renamed topaket.exe
. This will automatically download the latest version into a temp file, and execute your command. With this, you don't have to add a fixed version of paket to your project, and the executable binary has only ~56kb instead of >6.5MB (Basically the same behaviour as the gradle wrapper).
https://github.com/wooga/Paket.Unity3D/releases
You can also just copy it from an existing project to your local .paket
folder.
.
├── paket.dependencies
├── paket.lock (automatically created)
├── packages (created by paket, not under vc)
├── .paket
| ├── paket.exe
| ├── paket.unit3d.exe
├── Unity-Project-Directory
| ├── paket.unity3d.references
| ├── paket.template (only for distribution)
| ├── Assets/Paket.Unity3D
paket init
- will create a
.paket
folder withpaket.exe
(which is actually a renamed paket.bootstrapper.exe) - will create an empty
paket.dependencies
file.
All sources and dependencies are defined in paket.dependencies
.
First define all sources you need:
source https://nuget.org/api/v2
Then add depenencies:
nuget Wooga.Services
To identify the right source and depenency, check one of the existing games as reference.
mono .paket/paket.exe install
Download the dependencies specified by the paket.dependencies
or paket.lock
file into the packages
directory and update projects.
you can also use
mono paket.exe restore
to unly download dependencies specified inpaket.lock
.
mono .paket/paket.exe update
Install vs. Update:
paket update
will ignorepaket.lock
file, and pull the latest allowed version inpaket.dependencies
, whilepaket install
will pull the version locked inpaket.lock
file.
Before using paket.unity3d.exe
, we have to create a paket.unity3d.references
file next to Assets
folder manually.
Wooga.Services
Define without version
mono .paket/paket.unity3d.exe install
this will extract all dependencies defined in paket.unity3d.references
in your unity project.
Basic setup looks like:
type file
id Wooga.MySDK
owners Wooga
authors Marco Link
projectUrl
https://github.com/wooga/wdk-unity-Wooga.MySDK
iconUrl
http://wooga.github.io/wdk-unity-Wooga.MySDK/img/logo.png
licenseUrl
https://github.com/wooga/wdk-unity-CoreServices/blob/master/LICENSE.txt
requireLicenseAcceptance
false
copyright
Copyright 2017
tags
wdk
summary
My Wooga SDK
description
My Wooga SDK Description
files
Assets/Wooga/**/* ==> content
!../**/AssemblyInfo.cs
../README.md ==> content
dependencies
Wooga.AnotherSDK ~> 1.1.0
You can find all the Details here!
paket pack output ../test/bin version 0.0.1 -v
https://github.com/wooga/Paket.Unity3D/releases/download/0.2.1/paket.unity3d.bootstrapper.exe
has a bootstrapper too.this one should be added to the project.