Morimekta Utilities

Various utilities maintained and primarily developed by @morimekta, a.k.a. Stein Eldar Johnsen. Contributions are welcome. These are java libraries residing in the net.morimekta.util package, but split up into a number of separate libraries:

  • [io-util] Docs Pipeline Coverage Utilities for facilitating heavy computational IO, specifically reading and writing typed data to IO streams. The library has grown over time and has in later time become more of a commons-lang type library, which includes a number of non-I/O but still pretty core language feature classes.

  • [console-util] Docs Pipeline Coverage Utilities for facilitating interactive command line interfaced (cli) targeted mainly at utilities used in the linux terminals.

  • [diff-util] Docs Pipeline Coverage Utility classes for finding changes between strings.

  • [testing-util] Docs Pipeline Coverage This module contains a number of utilities and helpers to help with testing. It is based on the junit 4 paradigms, but may be updated to work with junit 5 when that is out and stable. It consists of a number of mostly independent parts.

Deprecated Utiltities

  • [android-util] Docs Pipeline Coverage This is a set of android classes ported to work as a stand-alone library. The API interfaces should be identical to that of the android classes, but uses only pure java and java bindings to work. This way it can be linked in non-android projects to act as a framework for testing of android utility libraries without depending on the whole android SDK.

    Android-Util is mostly abandoned, as I have no current use for it

  • [config-util] Docs Pipeline Coverage Utilities for handling config files with a type safe interface. The purpose of the config utilities is to be an interface between ‘flat’ structured config files, and a deeply structured config. The input and output formats of the config is always flat, or maximally sectioned in named ‘prefix sections’.

    Config-Util is deprecated in favor of providence-config

Side Notes

PS: These projects aims for stability, so if it appears to be running stale means that it does not have new needed features, and has not needed recent bug-fixes. To gauge if it is maintained enough for your project to feel confident, it is at least used in these projects:

  • providence. Full stack Java replacement for Apache Thrift. Has extensible code generator, maven & gradle plugin, and various handy tools and utilities.
  • idltool: A java based port and functionality-cleanup of Über’s node.js based idl tool.

Releases

Each library in the utils group is releases separately. The release process follows the simple set of steps. Note that when performing the release you should use the latest JDK. Currently openjdk 10 is used.

  • Check for updated dependencies

    mvn versions:display-dependency-updates
    mvn versions:display-plugin-updates
    
  • Perform The Release

    mvn release:prepare
    mvn release:perform
    mvn release:clean
    git fetch origin
    
  • Check artifacts and publish

    Go to Nexus Repository Manager and check the artifacts (pom, jar, javadoc). If it looks OK, press the release / publish button. Now just wait for the artifact to be available.

License Exceptions

Most of this is licensed under the Apache 2.0 license, and copyrighted by the Morimekta Utils Authord, but there are some exceptions, as the code has been copied from other Open Source projects and adapted for modern java uses.

So the copyright holder is whoever contributed to each file, as noted in the Copyright portion of the file. If the file does not have a Copyright (c) notice, or the copyright section does not refer to the author(s) of the project, then this project does not claim copyright over that file.

From iharder/base64 library (public domain, unlicensed):

  • android.util.Base64: Modified to match the android version of the interface.
  • android.util.Base64OutputStream: Separated from Base64 (was internal class), and modified to match android version of the interface.
  • android.util.Base64InputStream: Separated from Base64 (was internal class), and modified to match android version of the interface.
  • net.morimekta.util.Base64: Stripped to bare minimum to encode and decode standard base64.

Other imported code pieces (Apache 2.0 licensed):

  • android.util.Base64Test: Mainly unmodified from original, from old android open sourced code (2010).
  • net.morimekta.diff.*: Comes from diff-match-patch, (c) Google 2012, a pretty old but useful library for diffing files or simple string content. Repackaged since the library was almost unusable without some refactoring. Valid for Bisect, Change, Diff, DiffBase, DiffOptions, LinesToCharsResult classes and the Operation enum.