Skip to content

1.6.0

Compare
Choose a tag to compare
@dmitrykuzmin dmitrykuzmin released this 09 Sep 12:47
· 3185 commits to master since this release
d382587

This release brings numerous API improvements, as well as fixes and infrastructure updates to the framework.

API changes

Execution environment

  1. Custom environments support is introduced [#539, #542, #545].


The Environment now exposes API to register user-defined environment types.
This can be done by extending the EnvironmentType class:

public final class AwsLambda extends EnvironmentType {

    @Override
    public boolean enabled() {
        // ...
    }
}

Then, the environment can be registered to give the user ability to check if it's active at any given moment of time:

Environment.instance()
           .register(new AwsLambda());

// ...

if (Environment.instance().is(AwsLambda.class)) {
    this.sender = new AwsEmailSender();
}


The Spine framework provides two environments out of the box: Production and Tests.


  1. The io.spine.testing package is added to the list of known testing libraries. When it occurs in the class path, the environment will always be resolved to Tests [#544].


Protobuf Model definition

  1. (min), (max) and (range) constraints will now be verified to be the whole numbers when applied to a whole number field (int32, etc.) [#560].
  2. (is) and (every_is) options will now be applied simultaneously instead of (is) taking priority over (every_is) [#531].
  3. New tools are added for working with regex-es in Protobuf [#520].
  4. An (is_required) validation option is added for oneof group fields [#523].
  5. The spine.ui.Language enumeration is now defined and contains language codes defined by ISO 639-1 [#522].

Other

JSON parser will now ignore unknown fields, allowing easier data migrations between old/new Protobuf schemas [#518].

Fixes

  1. The Spine protoc plugin location process is simplified. This enables creation of composite builds for Spine-based projects [#559].
  2. Time is tweaked to provide identical behaviour on all platforms under Java 8 and Java 9+ [#554].
  3. The proper import resolution is implemented for the Dart client [#524].
  4. javax.annotations-api dependency is added to the project so the Spine protoc plugin can be run safely with Java 11 [#546].

Infrastructure

  1. Stricter Gradle task ordering is introduced to eliminate randomness in build execution and improve the process reliability [#562].
  2. The project build scripts are migrated to Kotlin [#532, #534].