Class ProjectDeps


  • public class ProjectDeps
    extends java.lang.Object
    The Java representation of a project's resolved dependency list. Resolved dependencies are stored as JSON as a sibling file to PklProject. Each key in the JSON file records an entry for each dependecy via its base URI, and the major version number.

    A resolved dependency can either be local or remote. A remote dependency will have its checksums recorded, while a local dependency will point to the relative path of the project holding the dependency.

    Sample structure:

     
     {
       "schemaVersion": 1,
       "resolvedDependencies": {
         "package://example.com/my/package@0": {
           "type": "remote",
           "uri": "projectpackage://example.com/my/package@0.5.0",
           "checksums": {
             "sha256": "abc123"
           }
         },
         "package://example.com/other/package@1": {
           "type": "local",
           "uri": "projectpackage://example.com/other/package@1.5.0",
           "path": "../sibling"
         }
       }
     }
     
    • Method Detail

      • writeTo

        public void writeTo​(java.io.OutputStream out)
                     throws java.io.IOException
        Serializes project dependencies to JSON, and writes it to the provided output stream.
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object