update to Java 17, update to Gradle 7.5

This commit is contained in:
Jörg Prante 2022-08-04 11:47:14 +02:00
parent 54b000429d
commit eb3a89ddfa
63 changed files with 363 additions and 352 deletions

View file

@ -8,7 +8,7 @@ plugins {
} }
wrapper { wrapper {
gradleVersion = "${rootProject.property('gradle.wrapper.version')}" gradleVersion = libs.versions.gradle.get()
distributionType = Wrapper.DistributionType.ALL distributionType = Wrapper.DistributionType.ALL
} }

View file

@ -179,12 +179,12 @@ public class ConfigParams implements Comparable<ConfigParams> {
fileLocations; fileLocations;
} }
public static class SuffixedReader { static class SuffixedReader {
Reader reader; Reader reader;
String suffix; String suffix;
} }
public static class JdbcLookup { static class JdbcLookup {
Connection connection; Connection connection;
String statement; String statement;
String[] params; String[] params;

View file

@ -2,6 +2,9 @@ package org.xbib.config;
public class NullConfigLogger implements ConfigLogger { public class NullConfigLogger implements ConfigLogger {
public NullConfigLogger() {
}
@Override @Override
public void info(String string) { public void info(String string) {
} }

View file

@ -2,6 +2,9 @@ package org.xbib.config;
public class SystemConfigLogger implements ConfigLogger { public class SystemConfigLogger implements ConfigLogger {
public SystemConfigLogger() {
}
@Override @Override
public void info(String string) { public void info(String string) {
System.err.println("info: " + string); System.err.println("info: " + string);

View file

@ -1,4 +1,4 @@
dependencies { dependencies {
api project(':content-api') api project(':content-api')
api "com.fasterxml.jackson.core:jackson-core:${project.property('jackson.version')}" api libs.jackson.core
} }

View file

@ -12,6 +12,9 @@ public abstract class AbstractXContentGenerator implements XContentGenerator {
protected XContentGenerator generator; protected XContentGenerator generator;
public AbstractXContentGenerator() {
}
public AbstractXContentGenerator setGenerator(XContentGenerator generator) { public AbstractXContentGenerator setGenerator(XContentGenerator generator) {
this.generator = generator; this.generator = generator;
return this; return this;

View file

@ -6,19 +6,15 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/**
*
*/
public abstract class AbstractXContentParser implements XContentParser { public abstract class AbstractXContentParser implements XContentParser {
//private static final MapFactory SIMPLE_MAP_FACTORY = HashMap::new;
//private static final MapFactory TINY_MAP_FACTORY = TinyMap::builder;
private boolean losslessDecimals; private boolean losslessDecimals;
private boolean base16Checks; private boolean base16Checks;
public AbstractXContentParser() {
}
protected abstract MapFactory getMapFactory(); protected abstract MapFactory getMapFactory();
protected abstract MapFactory getOrderedMapFactory(); protected abstract MapFactory getOrderedMapFactory();

View file

@ -22,6 +22,9 @@ public class XContentService {
} }
} }
private XContentService() {
}
public static XContentBuilder builder(String name) throws IOException { public static XContentBuilder builder(String name) throws IOException {
return xcontents.containsKey(name) ? DefaultXContentBuilder.builder(xcontents.get(name)) : null; return xcontents.containsKey(name) ? DefaultXContentBuilder.builder(xcontents.get(name)) : null;
} }

View file

@ -1,7 +1,5 @@
dependencies { dependencies {
api project(':content-core') api project(':content-core')
api "com.fasterxml.jackson.core:jackson-databind:${project.property('jackson.version')}" api libs.jackson.databind
testImplementation("org.mockito:mockito-core:${project.property('mockito.version')}") { testImplementation libs.mockito.inline
exclude group: 'org.hamcrest'
}
} }

View file

@ -7,7 +7,7 @@ module org.xbib.content.json {
exports org.xbib.content.json.mergepatch; exports org.xbib.content.json.mergepatch;
exports org.xbib.content.json.patch; exports org.xbib.content.json.patch;
exports org.xbib.content.json.pointer; exports org.xbib.content.json.pointer;
requires org.xbib.content.core; requires transitive org.xbib.content.core;
requires com.fasterxml.jackson.databind; requires transitive com.fasterxml.jackson.databind;
provides XContent with org.xbib.content.json.JsonXContent; provides XContent with org.xbib.content.json.JsonXContent;
} }

View file

@ -23,6 +23,7 @@ import java.nio.charset.StandardCharsets;
public class JsonXContent implements XContent { public class JsonXContent implements XContent {
private static final JsonXContent jsonXContent; private static final JsonXContent jsonXContent;
private static final JsonFactory jsonFactory; private static final JsonFactory jsonFactory;
static { static {

View file

@ -3,6 +3,7 @@ package org.xbib.content.json.jackson;
import com.fasterxml.jackson.core.JsonLocation; import com.fasterxml.jackson.core.JsonLocation;
import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.io.ContentReference;
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.MappingIterator; import com.fasterxml.jackson.databind.MappingIterator;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
@ -69,20 +70,8 @@ public final class JsonNodeReader {
* from the stream * from the stream
*/ */
public JsonNode fromInputStream(final InputStream in) throws IOException { public JsonNode fromInputStream(final InputStream in) throws IOException {
JsonParser parser = null; try (JsonParser parser = reader.getFactory().createParser(in); MappingIterator<JsonNode> iterator = reader.readValues(parser)) {
MappingIterator<JsonNode> iterator = null;
try {
parser = reader.getFactory().createParser(in);
iterator = reader.readValues(parser);
return readNode(iterator); return readNode(iterator);
} finally {
if (parser != null) {
parser.close();
}
if (iterator != null) {
iterator.close();
}
} }
} }
@ -94,35 +83,21 @@ public final class JsonNodeReader {
* @throws java.io.IOException malformed input, or problem encountered when reading * @throws java.io.IOException malformed input, or problem encountered when reading
* from the reader * from the reader
*/ */
public JsonNode fromReader(final Reader r) public JsonNode fromReader(final Reader r) throws IOException {
throws IOException { try (JsonParser parser = reader.getFactory().createParser(r); MappingIterator<JsonNode> iterator = reader.readValues(parser)) {
JsonParser parser = null;
MappingIterator<JsonNode> iterator = null;
try {
parser = reader.getFactory().createParser(r);
iterator = reader.readValues(parser);
return readNode(iterator); return readNode(iterator);
} finally {
if (parser != null) {
parser.close();
}
if (iterator != null) {
iterator.close();
}
} }
} }
/**
*
*/
private static final class JsonParseExceptionBuilder { private static final class JsonParseExceptionBuilder {
private JsonParser jsonParser;
private final JsonParser jsonParser;
private JsonLocation location; private JsonLocation location;
private JsonParseExceptionBuilder(final JsonParser jsonParser, final Object source) { private JsonParseExceptionBuilder(final JsonParser jsonParser, final Object source) {
this.jsonParser = jsonParser; this.jsonParser = jsonParser;
location = new JsonLocation(source, 0L, 1, 1); location = new JsonLocation(ContentReference.construct(false, source), 0L, 1, 1);
} }
private JsonParseExceptionBuilder setLocation(final JsonLocation location) { private JsonParseExceptionBuilder setLocation(final JsonLocation location) {

View file

@ -17,6 +17,9 @@ import java.io.IOException;
* write our own here. * write our own here.
*/ */
public final class JsonMergePatchDeserializer extends JsonDeserializer<JsonMergePatch> { public final class JsonMergePatchDeserializer extends JsonDeserializer<JsonMergePatch> {
public JsonMergePatchDeserializer() {}
@Override @Override
public JsonMergePatch deserialize(final JsonParser jp, final DeserializationContext ctxt) public JsonMergePatch deserialize(final JsonParser jp, final DeserializationContext ctxt)
throws IOException { throws IOException {

View file

@ -15,27 +15,24 @@ import java.io.Reader;
import java.io.StringReader; import java.io.StringReader;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
/**
*
*/
public final class JsonNodeReaderTest { public final class JsonNodeReaderTest {
@Test @Test
public void streamIsClosedOnRead() public void streamIsClosedOnRead() throws IOException {
throws IOException { ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream("[]".getBytes(StandardCharsets.UTF_8));
final InputStream in = spy(new ByteArrayInputStream("[]".getBytes(StandardCharsets.UTF_8))); final InputStream in = spy(byteArrayInputStream);
final JsonNode node = new JsonNodeReader().fromInputStream(in); final JsonNode node = new JsonNodeReader().fromInputStream(in);
verify(in).close(); verify(in).close();
assertEquals(node, new ObjectMapper().readTree(new ByteArrayInputStream("[]".getBytes("UTF-8")))); assertEquals(node, new ObjectMapper().readTree(new ByteArrayInputStream("[]".getBytes(StandardCharsets.UTF_8))));
} }
@Test @Test
public void readerIsClosedOnRead() public void readerIsClosedOnRead() throws IOException {
throws IOException { StringReader stringReader = new StringReader("[]");
final Reader reader = spy(new StringReader("[]")); final Reader reader = spy(stringReader);
final JsonNode node = new JsonNodeReader().fromReader(reader); final JsonNode node = new JsonNodeReader().fromReader(reader);
assertEquals(node, new ObjectMapper().readTree(new StringReader("[]")));
verify(reader).close(); verify(reader).close();
assertEquals(node, new ObjectMapper().readTree(new StringReader("[]")));
} }
@Test @Test

View file

@ -10,7 +10,7 @@ module org.xbib.content.rdf {
exports org.xbib.content.rdf.io.turtle; exports org.xbib.content.rdf.io.turtle;
exports org.xbib.content.rdf.io.xml; exports org.xbib.content.rdf.io.xml;
exports org.xbib.content.rdf.util; exports org.xbib.content.rdf.util;
requires org.xbib.content.resource; requires transitive org.xbib.content.resource;
requires org.xbib.content.xml; requires transitive org.xbib.content.xml;
requires org.xbib.content.json; requires transitive org.xbib.content.json;
} }

View file

@ -23,6 +23,9 @@ public class DefaultRdfGraph implements RdfGraph<RdfGraphParams> {
private final Map<IRI, Resource> resources = new LinkedHashMap<>(); private final Map<IRI, Resource> resources = new LinkedHashMap<>();
public DefaultRdfGraph() {
}
@Override @Override
public Iterator<Resource> getResources() { public Iterator<Resource> getResources() {
return resources.values().stream().iterator(); return resources.values().stream().iterator();

View file

@ -10,6 +10,9 @@ import java.net.URLConnection;
*/ */
public abstract class BaseStreamProcessor { public abstract class BaseStreamProcessor {
public BaseStreamProcessor() {
}
protected abstract void startStream() throws IOException; protected abstract void startStream() throws IOException;
protected abstract void endStream() throws IOException; protected abstract void endStream() throws IOException;

View file

@ -1,97 +0,0 @@
package org.xbib.content.rdf.util;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
/**
* A {@link TreeMap} based multi map. The keys ore ordered.
* @param <K> te key type
* @param <V> the value type
*/
public class TreeMultiMap<K, V> implements MultiMap<K, V> {
private final Map<K, Set<V>> map = new TreeMap<>();
@Override
public int size() {
return map.size();
}
@Override
public void clear() {
map.clear();
}
@Override
public boolean isEmpty() {
return map.isEmpty();
}
@Override
public boolean containsKey(K key) {
return map.containsKey(key);
}
@Override
public Set<K> keySet() {
return map.keySet();
}
@Override
public boolean put(K key, V value) {
Set<V> set = map.get(key);
if (set == null) {
set = new LinkedHashSet<>();
set.add(value);
map.put(key, set);
return true;
} else {
set.add(value);
return false;
}
}
@Override
public void putAll(K key, Collection<V> values) {
Set<V> set = map.get(key);
if (set == null) {
set = new LinkedHashSet<>();
map.put(key, set);
}
set.addAll(values);
}
@Override
public Collection<V> get(K key) {
return map.get(key);
}
@Override
public Set<V> remove(K key) {
return map.remove(key);
}
@Override
public boolean remove(K key, V value) {
Set<V> set = map.get(key);
return set != null && set.remove(value);
}
@Override
public boolean equals(Object obj) {
return obj != null && obj instanceof TreeMultiMap && map.equals(((TreeMultiMap) obj).map);
}
@Override
public int hashCode() {
return map.hashCode();
}
@Override
public String toString() {
return map.toString();
}
}

View file

@ -5,9 +5,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import java.util.Arrays; import java.util.Arrays;
/**
*
*/
public class MultiMapTest { public class MultiMapTest {
@Test @Test
@ -23,19 +20,4 @@ public class MultiMapTest {
map.putAll("a", Arrays.asList("d", "e")); map.putAll("a", Arrays.asList("d", "e"));
assertEquals("[b, c, d, e]", map.get("a").toString()); assertEquals("[b, c, d, e]", map.get("a").toString());
} }
@Test
public void testTreeMultiMap() {
TreeMultiMap<String, String> map = new TreeMultiMap<>();
map.put("a", "b");
map.put("b", "c");
map.put("a", "c");
assertTrue(map.containsKey("a"));
assertTrue(map.containsKey("b"));
assertEquals("[a, b]", map.keySet().toString());
assertEquals("[b, c]", map.get("a").toString());
assertEquals("[c]", map.get("b").toString());
map.putAll("a", Arrays.asList("d", "e"));
assertEquals("[b, c, d, e]", map.get("a").toString());
}
} }

View file

@ -1,4 +1,4 @@
dependencies { dependencies {
api "org.xbib:net-url:${project.property('xbib.net.version')}" api libs.net
testImplementation "com.fasterxml.jackson.core:jackson-databind:${project.property('jackson.version')}" testImplementation libs.jackson.databind
} }

View file

@ -1,5 +1,5 @@
module org.xbib.content.resource { module org.xbib.content.resource {
exports org.xbib.content.resource; exports org.xbib.content.resource;
exports org.xbib.content.resource.text; exports org.xbib.content.resource.text;
requires org.xbib.net.url; requires transitive org.xbib.net.url;
} }

View file

@ -1,4 +0,0 @@
/**
* Classes for content resources (resource identifiers, namespaces, schemes, uniform locations).
*/
package org.xbib.content.resource;

View file

@ -9,8 +9,12 @@ import java.util.NoSuchElementException;
public abstract class CodepointIterator implements Iterator<Codepoint> { public abstract class CodepointIterator implements Iterator<Codepoint> {
protected int position = -1; protected int position = -1;
protected int limit = -1; protected int limit = -1;
public CodepointIterator() {
}
/** /**
* Get a CodepointIterator for the specified char array. * Get a CodepointIterator for the specified char array.
* @param array char array * @param array char array

View file

@ -1,4 +1,4 @@
dependencies { dependencies {
api project(':content-core') api project(':content-core')
api "com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${project.property('jackson.version')}" api libs.jackson.dataformat.smile
} }

View file

@ -1,7 +1,7 @@
dependencies { dependencies {
api project(':content-core') api project(':content-core')
api project(':content-resource') api project(':content-resource')
api "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${project.property('jackson.version')}" api libs.jackson.dataformat.xml
runtimeOnly "com.fasterxml.woodstox:woodstox-core:${project.property('woodstox.version')}" runtimeOnly libs.woodstox
testImplementation project(':content-json') // for XContentHelper reading JSON testImplementation project(':content-json') // for XContentHelper reading JSON
} }

View file

@ -10,6 +10,6 @@ module org.xbib.content.xml {
requires transitive org.xbib.content.core; requires transitive org.xbib.content.core;
requires transitive org.xbib.content.resource; requires transitive org.xbib.content.resource;
requires transitive com.fasterxml.jackson.dataformat.xml; requires transitive com.fasterxml.jackson.dataformat.xml;
requires com.fasterxml.jackson.core; requires transitive com.fasterxml.jackson.core;
provides XContent with org.xbib.content.xml.XmlXContent; provides XContent with org.xbib.content.xml.XmlXContent;
} }

View file

@ -4,11 +4,11 @@ import java.util.Iterator;
import javax.xml.namespace.NamespaceContext; import javax.xml.namespace.NamespaceContext;
/**
*
*/
public class JsonNamespaceContext implements NamespaceContext { public class JsonNamespaceContext implements NamespaceContext {
public JsonNamespaceContext() {
}
@Override @Override
public String getNamespaceURI(String prefix) { public String getNamespaceURI(String prefix) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();

View file

@ -23,7 +23,7 @@ import javax.xml.transform.sax.SAXSource;
*/ */
public class JsonStylesheet { public class JsonStylesheet {
private QName root = new QName("root"); private QName root;
private XmlNamespaceContext context; private XmlNamespaceContext context;
@ -31,6 +31,10 @@ public class JsonStylesheet {
private String[] stylesheets; private String[] stylesheets;
public JsonStylesheet() {
this.root = new QName("root");
}
public JsonStylesheet root(QName root) { public JsonStylesheet root(QName root) {
this.root = root; this.root = root;
return this; return this;

View file

@ -8,9 +8,6 @@ import javax.xml.namespace.QName;
import javax.xml.stream.Location; import javax.xml.stream.Location;
import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamException;
/**
*
*/
public abstract class JsonReaderXmlEvent { public abstract class JsonReaderXmlEvent {
private Location location; private Location location;
@ -21,6 +18,9 @@ public abstract class JsonReaderXmlEvent {
private List<Attribute> attributes; private List<Attribute> attributes;
public JsonReaderXmlEvent() {
}
protected void setQName(QName name) { protected void setQName(QName name) {
this.name = name; this.name = name;
} }

View file

@ -17,12 +17,15 @@ import javax.xml.namespace.NamespaceContext;
*/ */
public class SimpleNamespaceContext implements NamespaceContext { public class SimpleNamespaceContext implements NamespaceContext {
private Map<String, String> prefixToNamespaceUri = new HashMap<>(); private final Map<String, String> prefixToNamespaceUri = new HashMap<>();
private Map<String, List<String>> namespaceUriToPrefixes = new HashMap<>(); private final Map<String, List<String>> namespaceUriToPrefixes = new HashMap<>();
private String defaultNamespaceUri = ""; private String defaultNamespaceUri = "";
public SimpleNamespaceContext() {
}
@Override @Override
public String getNamespaceURI(String prefix) { public String getNamespaceURI(String prefix) {
if (XMLConstants.XML_NS_PREFIX.equals(prefix)) { if (XMLConstants.XML_NS_PREFIX.equals(prefix)) {

View file

@ -13,6 +13,9 @@ public class XMLFilterImplEx extends XMLFilterImpl implements LexicalHandler {
protected boolean namespacePrefixes; protected boolean namespacePrefixes;
public XMLFilterImplEx() {
}
public boolean getNamespacePrefixes() { public boolean getNamespacePrefixes() {
return namespacePrefixes; return namespacePrefixes;
} }

View file

@ -8,6 +8,9 @@ import javax.xml.transform.TransformerException;
*/ */
public class DefaultStylesheetErrorListener implements ErrorListener { public class DefaultStylesheetErrorListener implements ErrorListener {
public DefaultStylesheetErrorListener() {
}
@Override @Override
public void warning(TransformerException e) throws TransformerException { public void warning(TransformerException e) throws TransformerException {
//logger.log(Level.WARNING, "warning (recoverable): " + e.getMessage(), e); //logger.log(Level.WARNING, "warning (recoverable): " + e.getMessage(), e);

View file

@ -1,6 +1,5 @@
package org.xbib.content.xml.transform; package org.xbib.content.xml.transform;
import java.text.MessageFormat;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
@ -21,6 +20,9 @@ public final class StylesheetPool {
*/ */
private final Map<String, Templates> stylesheets = new ConcurrentHashMap<>(); private final Map<String, Templates> stylesheets = new ConcurrentHashMap<>();
public StylesheetPool() {
}
/** /**
* @param transformerFactory transformer factory * @param transformerFactory transformer factory
* @return returns the identity transformer handler. * @return returns the identity transformer handler.

View file

@ -47,6 +47,9 @@ public class StylesheetTransformer implements Closeable {
private Result result; private Result result;
public StylesheetTransformer() {
}
public StylesheetTransformer setPath(String... path) { public StylesheetTransformer setPath(String... path) {
if (transformerFactory == null) { if (transformerFactory == null) {
transformerFactory = (SAXTransformerFactory) TransformerFactory.newInstance(); transformerFactory = (SAXTransformerFactory) TransformerFactory.newInstance();

View file

@ -9,6 +9,9 @@ import javax.xml.transform.TransformerException;
*/ */
public final class TransformerErrorListener implements ErrorListener { public final class TransformerErrorListener implements ErrorListener {
public TransformerErrorListener() {
}
/** /**
* We store the exception internally as a workaround to xalan, which reports * We store the exception internally as a workaround to xalan, which reports
* {@link javax.xml.transform.TransformerException} as {@link RuntimeException} (wrapped). * {@link javax.xml.transform.TransformerException} as {@link RuntimeException} (wrapped).

View file

@ -36,7 +36,7 @@ public class XML11Char {
/** /**
* Character flags for XML 1.1. * Character flags for XML 1.1.
*/ */
private static final byte XML11CHARS[] = new byte[1 << 16]; private static final byte[] XML11CHARS = new byte[1 << 16];
static { static {
Arrays.fill(XML11CHARS, 1, 9, (byte) 17); // Fill 8 of value (byte) 17 Arrays.fill(XML11CHARS, 1, 9, (byte) 17); // Fill 8 of value (byte) 17
@ -97,6 +97,9 @@ public class XML11Char {
Arrays.fill(XML11CHARS, 65008, 65534, (byte) -19); // Fill 526 of value (byte) -19 Arrays.fill(XML11CHARS, 65008, 65534, (byte) -19); // Fill 526 of value (byte) -19
} }
public XML11Char() {
}
/** /**
* Returns true if the specified character is a valid name start * Returns true if the specified character is a valid name start
* character as defined by production [4] in the XML 1.1 * character as defined by production [4] in the XML 1.1

View file

@ -1,5 +1,5 @@
dependencies { dependencies {
api project(':content-core') api project(':content-core')
api "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${project.property('jackson.version')}" api libs.jackson.dataformat.yaml
implementation "org.yaml:snakeyaml:${project.property('snakeyaml.version')}" implementation libs.snakeyaml
} }

View file

@ -20,6 +20,7 @@ import java.nio.charset.StandardCharsets;
public class YamlXContent implements XContent { public class YamlXContent implements XContent {
private static final YamlXContent yamlXContent; private static final YamlXContent yamlXContent;
private static final YAMLFactory yamlFactory; private static final YAMLFactory yamlFactory;
static { static {
@ -27,6 +28,9 @@ public class YamlXContent implements XContent {
yamlXContent = new YamlXContent(); yamlXContent = new YamlXContent();
} }
public YamlXContent() {
}
public static YamlXContent yamlContent() { public static YamlXContent yamlContent() {
return yamlXContent; return yamlXContent;
} }

View file

@ -1,13 +1,5 @@
group = org.xbib group = org.xbib
name = content name = content
version = 4.0.0 version = 5.0.0
org.gradle.warning.mode = ALL org.gradle.warning.mode = ALL
gradle.wrapper.version = 7.3.2
xbib.net.version = 2.1.1
xbib-datastructures.version = 1.0.0
jackson.version = 2.12.3
woodstox.version = 6.2.6
snakeyaml.version = 1.28
mockito.version = 3.10.0
asciidoclet.version = 1.5.6

View file

@ -1,6 +1,7 @@
apply plugin: "com.github.spotbugs" apply plugin: "com.github.spotbugs"
spotbugs { spotbugs {
toolVersion = '4.7.1'
ignoreFailures = true ignoreFailures = true
} }

View file

@ -1,12 +1,8 @@
def junitVersion = project.hasProperty('junit.version')?project.property('junit.version'):'5.7.2'
def hamcrestVersion = project.hasProperty('hamcrest.version')?project.property('hamcrest.version'):'2.2'
dependencies { dependencies {
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}" testImplementation libs.junit.jupiter.api
testImplementation "org.junit.jupiter:junit-jupiter-params:${junitVersion}" testImplementation libs.junit.jupiter.params
testImplementation "org.hamcrest:hamcrest-library:${hamcrestVersion}" testImplementation libs.hamcrest
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}" testRuntimeOnly libs.junit.jupiter.engine
} }
test { test {

Binary file not shown.

View file

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

275
gradlew vendored
View file

@ -1,7 +1,7 @@
#!/usr/bin/env sh #!/bin/sh
# #
# Copyright 2015 the original author or authors. # Copyright © 2015-2021 the original authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@ -17,67 +17,101 @@
# #
############################################################################## ##############################################################################
## #
## Gradle start up script for UN*X # Gradle start up script for POSIX generated by Gradle.
## #
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
############################################################################## ##############################################################################
# Attempt to set APP_HOME # Attempt to set APP_HOME
# Resolve links: $0 may be a link # Resolve links: $0 may be a link
PRG="$0" app_path=$0
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do # Need this for daisy-chained symlinks.
ls=`ls -ld "$PRG"` while
link=`expr "$ls" : '.*-> \(.*\)$'` APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
if expr "$link" : '/.*' > /dev/null; then [ -h "$app_path" ]
PRG="$link" do
else ls=$( ls -ld "$app_path" )
PRG=`dirname "$PRG"`"/$link" link=${ls#*' -> '}
fi case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle" APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"` APP_BASE_NAME=${0##*/}
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum" MAX_FD=maximum
warn () { warn () {
echo "$*" echo "$*"
} } >&2
die () { die () {
echo echo
echo "$*" echo "$*"
echo echo
exit 1 exit 1
} } >&2
# OS specific support (must be 'true' or 'false'). # OS specific support (must be 'true' or 'false').
cygwin=false cygwin=false
msys=false msys=false
darwin=false darwin=false
nonstop=false nonstop=false
case "`uname`" in case "$( uname )" in #(
CYGWIN* ) CYGWIN* ) cygwin=true ;; #(
cygwin=true Darwin* ) darwin=true ;; #(
;; MSYS* | MINGW* ) msys=true ;; #(
Darwin* ) NONSTOP* ) nonstop=true ;;
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
if [ -n "$JAVA_HOME" ] ; then if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables # IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java" JAVACMD=$JAVA_HOME/jre/sh/java
else else
JAVACMD="$JAVA_HOME/bin/java" JAVACMD=$JAVA_HOME/bin/java
fi fi
if [ ! -x "$JAVACMD" ] ; then if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation." location of your Java installation."
fi fi
else else
JAVACMD="java" JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the Please set the JAVA_HOME variable in your environment to match the
@ -106,80 +140,101 @@ location of your Java installation."
fi fi
# Increase the maximum file descriptors if we can. # Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
MAX_FD_LIMIT=`ulimit -H -n` case $MAX_FD in #(
if [ $? -eq 0 ] ; then max*)
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then MAX_FD=$( ulimit -H -n ) ||
MAX_FD="$MAX_FD_LIMIT" warn "Could not query maximum file descriptor limit"
fi esac
ulimit -n $MAX_FD case $MAX_FD in #(
if [ $? -ne 0 ] ; then '' | soft) :;; #(
warn "Could not set maximum file descriptor limit: $MAX_FD" *)
fi ulimit -n "$MAX_FD" ||
else warn "Could not set maximum file descriptor limit to $MAX_FD"
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac esac
fi fi
# Escape application args # Collect all arguments for the java command, stacking in reverse order:
save () { # * args from the command line
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done # * the main class name
echo " " # * -classpath
} # * -D...appname settings
APP_ARGS=`save "$@"` # * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# Collect all arguments for the java command, following the shell quoting and substitution rules # For Cygwin or MSYS, switch paths to Windows format before running java
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@" exec "$JAVACMD" "$@"

14
gradlew.bat vendored
View file

@ -14,7 +14,7 @@
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View file

@ -1,3 +1,3 @@
dependencies { dependencies {
api "org.xbib:datastructures-api:${project.property('xbib-datastructures.version')}" api libs.datastructures.api
} }

View file

@ -11,6 +11,9 @@ public interface Settings extends AutoCloseable {
class Holder { class Holder {
private Holder() {
}
private static SettingsBuilder createBuilder() { private static SettingsBuilder createBuilder() {
ServiceLoader<SettingsBuilder> serviceLoader = ServiceLoader.load(SettingsBuilder.class); ServiceLoader<SettingsBuilder> serviceLoader = ServiceLoader.load(SettingsBuilder.class);
Optional<SettingsBuilder> optionalSettingsBuilder = serviceLoader.findFirst(); Optional<SettingsBuilder> optionalSettingsBuilder = serviceLoader.findFirst();

View file

@ -4,8 +4,7 @@ import org.xbib.settings.content.json.JsonSettingsLoader;
module org.xbib.settings.content.json { module org.xbib.settings.content.json {
exports org.xbib.settings.content.json; exports org.xbib.settings.content.json;
requires transitive org.xbib.settings.content; requires transitive org.xbib.settings.content;
requires org.xbib.content.api; requires transitive org.xbib.content.json;
requires org.xbib.content.json;
requires org.xbib.settings.api; requires org.xbib.settings.api;
uses SettingsLoader; uses SettingsLoader;
provides SettingsLoader with JsonSettingsLoader; provides SettingsLoader with JsonSettingsLoader;

View file

@ -11,6 +11,9 @@ import java.util.Set;
*/ */
public class JsonSettingsLoader extends AbstractSettingsLoader { public class JsonSettingsLoader extends AbstractSettingsLoader {
public JsonSettingsLoader() {
}
@Override @Override
public XContent content() { public XContent content() {
return JsonXContent.jsonContent(); return JsonXContent.jsonContent();

View file

@ -4,8 +4,7 @@ import org.xbib.settings.content.yaml.YamlSettingsLoader;
module org.xbib.settings.content.yaml { module org.xbib.settings.content.yaml {
exports org.xbib.settings.content.yaml; exports org.xbib.settings.content.yaml;
requires transitive org.xbib.settings.content; requires transitive org.xbib.settings.content;
requires org.xbib.content.api; requires transitive org.xbib.content.yaml;
requires org.xbib.content.yaml;
requires org.xbib.settings.api; requires org.xbib.settings.api;
uses SettingsLoader; uses SettingsLoader;
provides SettingsLoader with YamlSettingsLoader; provides SettingsLoader with YamlSettingsLoader;

View file

@ -15,6 +15,9 @@ public class YamlSettingsLoader extends AbstractSettingsLoader {
private static final Set<String> YAML_SUFFIXES = Set.of("yml", "yaml"); private static final Set<String> YAML_SUFFIXES = Set.of("yml", "yaml");
public YamlSettingsLoader() {
}
@Override @Override
public XContent content() { public XContent content() {
return YamlXContent.yamlContent(); return YamlXContent.yamlContent();

View file

@ -1,6 +1,6 @@
dependencies { dependencies {
api project(':settings-api') api project(':settings-api')
api project(':content-core') api project(':content-core')
api "org.xbib:datastructures-tiny:${project.property('xbib-datastructures.version')}" api libs.datastructures.tiny
testImplementation project(":settings-content-json") testImplementation project(":settings-content-json")
} }

View file

@ -9,8 +9,7 @@ module org.xbib.settings.content {
uses SettingsBuilder; uses SettingsBuilder;
provides SettingsBuilder with ContentSettingsBuilder; provides SettingsBuilder with ContentSettingsBuilder;
exports org.xbib.settings.content; exports org.xbib.settings.content;
requires org.xbib.settings.api; requires transitive org.xbib.settings.api;
requires org.xbib.content.core; requires transitive org.xbib.content.core;
requires org.xbib.datastructures.api;
requires transitive org.xbib.datastructures.tiny; requires transitive org.xbib.datastructures.tiny;
} }

View file

@ -20,6 +20,9 @@ import java.util.Map;
*/ */
public abstract class AbstractSettingsLoader implements SettingsLoader { public abstract class AbstractSettingsLoader implements SettingsLoader {
public AbstractSettingsLoader() {
}
public abstract XContent content(); public abstract XContent content();
@Override @Override

View file

@ -21,6 +21,9 @@ public class PropertiesSettingsLoader implements SettingsLoader {
private static final Set<String> PROPERTIES_SUFFIXES = new HashSet<>(Collections.singletonList("properties")); private static final Set<String> PROPERTIES_SUFFIXES = new HashSet<>(Collections.singletonList("properties"));
public PropertiesSettingsLoader() {
}
@Override @Override
public Set<String> suffixes() { public Set<String> suffixes() {
return PROPERTIES_SUFFIXES; return PROPERTIES_SUFFIXES;

View file

@ -1,4 +1,4 @@
dependencies { dependencies {
api project(':settings-datastructures') api project(':settings-datastructures')
api "org.xbib:datastructures-json-tiny:${project.property('xbib-datastructures.version')}" api libs.datastructures.json.tiny
} }

View file

@ -7,6 +7,9 @@ import java.util.Set;
public class JsonSettingsLoader extends AbstractSettingsLoader { public class JsonSettingsLoader extends AbstractSettingsLoader {
public JsonSettingsLoader() {
}
@Override @Override
public DataStructure dataStructure() { public DataStructure dataStructure() {
return new Json(); return new Json();

View file

@ -1,4 +1,4 @@
dependencies { dependencies {
api project(':settings-datastructures') api project(':settings-datastructures')
api "org.xbib:datastructures-yaml-tiny:${project.property('xbib-datastructures.version')}" api libs.datastructures.yaml.tiny
} }

View file

@ -10,6 +10,9 @@ import java.util.Set;
public class YamlSettingsLoader extends AbstractSettingsLoader { public class YamlSettingsLoader extends AbstractSettingsLoader {
public YamlSettingsLoader() {
}
@Override @Override
public DataStructure dataStructure() { public DataStructure dataStructure() {
return new Yaml(); return new Yaml();

View file

@ -1,4 +1,4 @@
dependencies { dependencies {
api project(':settings-api') api project(':settings-api')
api "org.xbib:datastructures-tiny:${project.property('xbib-datastructures.version')}" api libs.datastructures.tiny
} }

View file

@ -19,6 +19,9 @@ import java.util.Map;
public abstract class AbstractSettingsLoader implements SettingsLoader { public abstract class AbstractSettingsLoader implements SettingsLoader {
public AbstractSettingsLoader() {
}
public abstract DataStructure dataStructure(); public abstract DataStructure dataStructure();
@Override @Override

View file

@ -13,6 +13,9 @@ import java.util.Set;
*/ */
public class PropertiesSettingsLoader implements SettingsLoader { public class PropertiesSettingsLoader implements SettingsLoader {
public PropertiesSettingsLoader() {
}
@Override @Override
public Set<String> suffixes() { public Set<String> suffixes() {
return Set.of("properties"); return Set.of("properties");

View file

@ -1,3 +1,32 @@
dependencyResolutionManagement {
versionCatalogs {
libs {
version('gradle', '7.5')
version('junit', '5.8.2')
version('jackson', '2.13.3')
version('datastructures', '1.0.0')
library('junit-jupiter-api', 'org.junit.jupiter', 'junit-jupiter-api').versionRef('junit')
library('junit-jupiter-params', 'org.junit.jupiter', 'junit-jupiter-params').versionRef('junit')
library('junit-jupiter-engine', 'org.junit.jupiter', 'junit-jupiter-engine').versionRef('junit')
library('junit4', 'junit', 'junit').version('4.13.2')
library('hamcrest', 'org.hamcrest:hamcrest-library:2.2')
library('jackson-core', 'com.fasterxml.jackson.core', 'jackson-core').versionRef('jackson')
library('jackson-databind', 'com.fasterxml.jackson.core', 'jackson-databind').versionRef('jackson')
library('jackson-dataformat-smile', 'com.fasterxml.jackson.dataformat', 'jackson-dataformat-smile').versionRef('jackson')
library('jackson-dataformat-xml', 'com.fasterxml.jackson.dataformat', 'jackson-dataformat-xml').versionRef('jackson')
library('jackson-dataformat-yaml', 'com.fasterxml.jackson.dataformat', 'jackson-dataformat-yaml').versionRef('jackson')
library('datastructures-api', 'org.xbib', 'datastructures-api').versionRef('datastructures')
library('datastructures-tiny', 'org.xbib', 'datastructures-tiny').versionRef('datastructures')
library('datastructures-json-tiny', 'org.xbib', 'datastructures-json-tiny').versionRef('datastructures')
library('datastructures-yaml-tiny', 'org.xbib', 'datastructures-yaml-tiny').versionRef('datastructures')
library('mockito-core', 'org.mockito', 'mockito-core').version('4.6.1')
library('mockito-inline', 'org.mockito', 'mockito-inline').version('4.6.1')
library('net', 'org.xbib', 'net-url').version('2.1.1')
library('woodstox', 'com.fasterxml.woodstox', 'woodstox-core').version('6.3.0')
library('snakeyaml', 'org.yaml', 'snakeyaml').version('1.30')
}
}
}
include 'content-api' include 'content-api'
include 'content-core' include 'content-core'
include 'content-csv' include 'content-csv'
@ -16,3 +45,14 @@ include 'settings-datastructures'
include 'settings-datastructures-json' include 'settings-datastructures-json'
include 'settings-datastructures-yaml' include 'settings-datastructures-yaml'
include 'config' include 'config'
/*
gradle.wrapper.version = 7.4.2
xbib.net.version = 2.1.1
xbib-datastructures.version = 1.0.0
jackson.version = 2.12.3
woodstox.version = 6.2.6
snakeyaml.version = 1.28
mockito.version = 3.10.0
asciidoclet.version = 1.5.6
*/