|
| 1 | +# Version 1 |
| 2 | + |
| 3 | +@@@warning |
| 4 | +This version of the lockfile has not been finalised and may change as features are added or bugs resolved. |
| 5 | + |
| 6 | +The format will be finalised in version 1.0.0. |
| 7 | +@@@ |
| 8 | + |
| 9 | +* **Added in:** 0.1.0 |
| 10 | +* **Removed in:** _N/A_ |
| 11 | + |
| 12 | +## Types |
| 13 | + |
| 14 | +### Lockfile |
| 15 | + |
| 16 | +Top level object for a project lockfile. Contains details of the build configurations and a list of the resolved |
| 17 | +dependencies. |
| 18 | + |
| 19 | +#### lockVersion |
| 20 | + |
| 21 | +* **Type:** Integer. |
| 22 | +* **Description:** Version of the lockfile - always 1. |
| 23 | + |
| 24 | +#### timestamp |
| 25 | + |
| 26 | +* **Type:** String (timestamp). |
| 27 | +* **Description:** File generation timestamp in ISO 8601 format. |
| 28 | + |
| 29 | +#### configurations |
| 30 | + |
| 31 | +* **Type:** Array of strings. |
| 32 | +* **Description:** List of sbt build configurations in the current project. |
| 33 | + |
| 34 | +#### dependencies |
| 35 | + |
| 36 | +* **Type:** Array of `Dependency`. |
| 37 | +* **Description:** List of all the dependencies in the current project. |
| 38 | + |
| 39 | +### Dependency |
| 40 | + |
| 41 | +Details of a resolved dependency. |
| 42 | + |
| 43 | +#### org |
| 44 | + |
| 45 | +* **Type:** String. |
| 46 | +* **Description:** Organisation of the resolved dependency from Ivy/Maven. |
| 47 | + |
| 48 | +#### name |
| 49 | + |
| 50 | +* **Type:** String. |
| 51 | +* **Description:** Name of the resolved dependency from Ivy/Maven. |
| 52 | + |
| 53 | +#### version |
| 54 | + |
| 55 | +* **Type:** String. |
| 56 | +* **Description:** Version of the resolved dependency. |
| 57 | + |
| 58 | +#### artifacts |
| 59 | + |
| 60 | +* **Type:** Array of `Artifact`. |
| 61 | +* **Description:** List of all the artifacts for the dependency. |
| 62 | +* **Note:** Currently only `jar` artifacts are included. |
| 63 | + |
| 64 | +#### configurations |
| 65 | + |
| 66 | +* **Type:** Array of strings. |
| 67 | +* **Description:** List of the sbt configurations that include this dependency. |
| 68 | + |
| 69 | +### Artifact |
| 70 | + |
| 71 | +Details of an artifact contained within a dependency. |
| 72 | + |
| 73 | +#### name |
| 74 | + |
| 75 | +* **Type:** String. |
| 76 | +* **Description:** Filename of the artifact. |
| 77 | + |
| 78 | +#### hash |
| 79 | + |
| 80 | +* **Type:** String (checksum). |
| 81 | +* **Description:** Checksum of the artifact prefixed with the checksum algorithm. |
| 82 | +* **Note:** Currently only `sha1` is supported. |
| 83 | + |
| 84 | +## Example |
| 85 | + |
| 86 | +```json |
| 87 | +{ |
| 88 | + "lockVersion" : 1, |
| 89 | + "timestamp" : "2019-10-29T17:33:05.944Z", |
| 90 | + "configurations" : [ |
| 91 | + "compile", |
| 92 | + "optional", |
| 93 | + "provided", |
| 94 | + "runtime", |
| 95 | + "test" |
| 96 | + ], |
| 97 | + "dependencies" : [ |
| 98 | + { |
| 99 | + "org" : "org.apache.commons", |
| 100 | + "name" : "commons-lang3", |
| 101 | + "version" : "3.9", |
| 102 | + "artifacts" : [ |
| 103 | + { |
| 104 | + "name" : "commons-lang3.jar", |
| 105 | + "hash" : "sha1:0122c7cee69b53ed4a7681c03d4ee4c0e2765da5" |
| 106 | + } |
| 107 | + ], |
| 108 | + "configurations" : [ |
| 109 | + "test", |
| 110 | + "compile", |
| 111 | + "runtime" |
| 112 | + ] |
| 113 | + }, |
| 114 | + { |
| 115 | + "org" : "org.scala-lang", |
| 116 | + "name" : "scala-library", |
| 117 | + "version" : "2.12.10", |
| 118 | + "artifacts" : [ |
| 119 | + { |
| 120 | + "name" : "scala-library.jar", |
| 121 | + "hash" : "sha1:3509860bc2e5b3da001ed45aca94ffbe5694dbda" |
| 122 | + } |
| 123 | + ], |
| 124 | + "configurations" : [ |
| 125 | + "test", |
| 126 | + "compile", |
| 127 | + "runtime" |
| 128 | + ] |
| 129 | + } |
| 130 | + ] |
| 131 | +} |
| 132 | +``` |
0 commit comments