Class SnapshotJson

  • All Implemented Interfaces:
    java.lang.Comparable<SnapshotJson>

    public class SnapshotJson
    extends java.lang.Object
    implements java.lang.Comparable<SnapshotJson>
    This is different from the standard maven snapshot metadata. Because none of that data is exposed to us as a user of gradle/maven/whatever. So we JUST use the timestamp. { "latest": "yyyyMMdd.hhmmss", "versions": [ { "md5": "md5 in hex lowercase", "timestamp": "yyyyMMdd.hhmmss" ] }
    • Field Detail

      • LOGGER

        private static final org.apache.logging.log4j.Logger LOGGER
      • TIMESTAMP

        public static final java.text.DateFormat TIMESTAMP
      • GSON

        private static final com.google.gson.Gson GSON
      • latest

        private java.lang.String latest
    • Constructor Detail

      • SnapshotJson

        public SnapshotJson()
    • Method Detail

      • create

        public static SnapshotJson create​(java.io.File target)
      • getLatest

        public java.lang.String getLatest()
      • remove

        public boolean remove​(java.lang.String timestamp)
      • updateLatest

        public java.lang.String updateLatest()
      • write

        public void write​(java.io.File target)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • compareTo

        public int compareTo​(SnapshotJson o)
        Specified by:
        compareTo in interface java.lang.Comparable<SnapshotJson>