-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add paket-unity UPM mode [ATLAS-1273] #96
Conversation
src/main/groovy/wooga/gradle/paket/unity/PaketUpmPackageSpec.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/wooga/gradle/paket/unity/PaketUpmPackageSpec.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/wooga/gradle/paket/unity/internal/UPMPaketPackage.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/wooga/gradle/paket/unity/internal/UPMPaketPackage.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/wooga/gradle/paket/unity/PaketUpmPackageSpec.groovy
Outdated
Show resolved
Hide resolved
1d64f69
to
bf30021
Compare
@Input | ||
@Optional | ||
MapProperty<String, Map<String, Object>> getPaketUpmPackageManifests() { | ||
return paketUpmPackageManifest | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a typo, an s
at the end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its not a typo, there may be many manifests. Its a map of [paket_name: upm manifest] after all.
bf30021
to
8dcadb7
Compare
8dcadb7
to
ab1c14e
Compare
ab1c14e
to
1f7fc1d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
I have one concern i'd like to clarify first before merging. please see comment directly in code.
if (isPaketUpmPackageEnabled().get()) { | ||
def references = new PaketUnityReferences(getReferencesFile()) | ||
def locks = new PaketLock(getLockFile()) | ||
def packages = locks.getAllDependencies(references.nugets).collect { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one thing that we need to make sure is, that ONLY whatever was being installed in Assets/Paket.Unity3D gets installed in Packages/ too, and nothing more. So if there is any dependency of something referenced in the unity3d reference file but it would have NOT be installed in there, it should not be installed in Packages either.
My concern is to remind you that paket actually only copies the .net dll variants that are defined/supported inside Paket.Unity3D.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pletoss this task is the exact same one the installs stuff in Assets/Paket.Unity3D
. All I'm doing there is changing the installation directory and making sure that the package.json file is in the right place. So don't worry about this ;)
Description
Paket packages can now be configured to be installed as UPM packages. This can be useful when your paket package contains an UPM one (with a
package.json
file), and you want it to be integrated with Unity's packages folder.This mode sets the installation directory (
paketOutputDirectoryName
) to the unity project'sPackages
folder, and ensures that thepackage.json
file for each dependency is in the installed package root.If an installed package is not UPM-compatible, that is, it doesn't have a
package.json
file, such file will be created. By default, apackage.json
is generated withcom.wooga.nuget.${paketPackage.toLowerCase()}
name, and version0.0.0
, but those can be overridden and more properties can be added on using the mappings inpaketUpmPacakgeJson
.UPM mode can be enabled through the
paketUpmPackageEnabled
property, or using thepaketUnity.enablePaketUpmPackages()
extension method. It is disabled by default.Changes
PaketUnityInstall
taskpaketUpmPackageEnabled
andpaketUpmPacakgeJson
properties toPaketUnityPluginExtension