4.12.0 -- Kotlin Rewrite
4.12.0 is the latest version including a rewrite of most of the code base in Kotlin. Much of the interfaces remain the same but there are some potentially breaking changes listed below for awareness:
-
SubmissionFilter builder() → Builder.
-
SubmissionFilter .oR() → or()
List<SubmissionFilter> filters = new ArrayList<>();
filters.add(new SubmissionFilter.Builder().status(SubmissionStatus.COMPLETE).build());
filters.add(new SubmissionFilter.Builder().status(SubmissionStatus.FAILED).build());
SubmissionFilter subFilter = new SubmissionFilter.Builder().ors(filters).build();
-
refresh
function is deprecated. -
New exceptions are thrown from queries and mutations, although catching RuntimeException will still work.
-
IndicoClient is now an interface and the concrete implementation is IndicoKtorClient
IndicoConfig config = new IndicoConfig.Builder()
.host("app.indico.io")
.tokenPath("__TOKEN_PATH__")
.build();
try (IndicoClient client = new IndicoKtorClient(config)) {
- Relies on kotlin runtime so requires additional dependencies for projects who cannot use automatic dependency resolution
- Removed raw graphql class, seems it did not function properly.
- Removed multiple obsolete examples.
- Removed the “WorkflowJob” concept as it is obsolete and was causing confusion.
- Deprecates some API features, especially those that have consumers add full objects to a query.
- Objects in package com.indico.jobs moved to com.indico.query