Update version to 4.2.0

**Support for polymorphic serialization**

This release adds the Polymorphic and PolymorphicTypes annotations that
can be used on types. Serializers for polymorphic types are not
selected based on the compile-time types of configuration elements, but
instead are chosen at runtime based on the actual types of their values.
This enables adding instances of subclasses / implementations of a
polymorphic type to collections.

 **Add SerializeWith annotation**

This annotation enforces the use of the specified serializer for a
configuration element or type. It can be applied to configuration
elements (i.e. class fields and record components), to types, and to
other annotations.

 **Add SerializerContext interface**

Instances of this interface contain information about the context in which
a serializer was selected. They are passed to the constructors of custom
serializers if the serializers are instantiated by this library, or can
alternatively be accessed through the new `addSerializerFactory` method
of `ConfigurationProperties` objects.
dev v4.2.0
Exlll 2 years ago
parent 0eb73815be
commit f6e12de95a

@ -862,7 +862,7 @@ with `configlib-paper` (see [here](#support-for-bukkit-classes-like-itemstack)).
<dependency>
<groupId>com.github.Exlll.ConfigLib</groupId>
<artifactId>configlib-yaml</artifactId>
<version>v4.1.0</version>
<version>v4.2.0</version>
</dependency>
```
@ -871,13 +871,13 @@ with `configlib-paper` (see [here](#support-for-bukkit-classes-like-itemstack)).
```groovy
repositories { maven { url 'https://jitpack.io' } }
dependencies { implementation 'com.github.Exlll.ConfigLib:configlib-yaml:v4.1.0' }
dependencies { implementation 'com.github.Exlll.ConfigLib:configlib-yaml:v4.2.0' }
```
```kotlin
repositories { maven { url = uri("https://jitpack.io") } }
dependencies { implementation("com.github.Exlll.ConfigLib:configlib-yaml:v4.1.0") }
dependencies { implementation("com.github.Exlll.ConfigLib:configlib-yaml:v4.2.0") }
```
</details>
@ -901,7 +901,7 @@ this [issue](https://github.com/Exlll/ConfigLib/issues/12) if you have any troub
<dependency>
<groupId>de.exlll</groupId>
<artifactId>configlib-yaml</artifactId>
<version>4.1.0</version>
<version>4.2.0</version>
</dependency>
```
@ -910,13 +910,13 @@ this [issue](https://github.com/Exlll/ConfigLib/issues/12) if you have any troub
```groovy
repositories { maven { url 'https://maven.pkg.github.com/Exlll/ConfigLib' } }
dependencies { implementation 'de.exlll:configlib-yaml:4.1.0' }
dependencies { implementation 'de.exlll:configlib-yaml:4.2.0' }
```
```kotlin
repositories { maven { url = uri("https://maven.pkg.github.com/Exlll/ConfigLib") } }
dependencies { implementation("de.exlll:configlib-yaml:4.1.0") }
dependencies { implementation("de.exlll:configlib-yaml:4.2.0") }
```
</details>

@ -1,4 +1,4 @@
allprojects {
group = "de.exlll"
version = "4.1.0"
version = "4.2.0"
}

@ -23,13 +23,13 @@ repositories {
}
dependencies {
testFixturesApi("org.junit.jupiter:junit-jupiter-api:5.8.2")
testFixturesApi("org.junit.jupiter:junit-jupiter-params:5.8.2")
testFixturesApi("org.junit.jupiter:junit-jupiter-engine:5.8.2")
testFixturesApi("org.junit.platform:junit-platform-runner:1.8.2")
testFixturesApi("org.junit.platform:junit-platform-suite-api:1.8.2")
testFixturesApi("org.mockito:mockito-inline:4.2.0")
testFixturesApi("org.mockito:mockito-junit-jupiter:4.2.0")
testFixturesApi("org.junit.jupiter:junit-jupiter-api:5.9.0")
testFixturesApi("org.junit.jupiter:junit-jupiter-params:5.9.0")
testFixturesApi("org.junit.jupiter:junit-jupiter-engine:5.9.0")
testFixturesApi("org.junit.platform:junit-platform-runner:1.9.0")
testFixturesApi("org.junit.platform:junit-platform-suite-api:1.9.0")
testFixturesApi("org.mockito:mockito-inline:4.7.0")
testFixturesApi("org.mockito:mockito-junit-jupiter:4.7.0")
testFixturesApi("org.hamcrest:hamcrest-all:1.3")
testFixturesApi("com.google.jimfs:jimfs:1.2")
}

@ -1,7 +1,3 @@
plugins {
`core-config`
}
dependencies {
implementation("org.snakeyaml:snakeyaml-engine:2.3")
}

@ -12,12 +12,11 @@ import java.lang.annotation.Target;
* <pre>
* {@code
* @Polymorphic
* @PolymorphicTypes({
* @PolymorphicTypes( {
* @PolymorphicTypes.Type(type = Impl1.class, alias = "IMPL_1"),
* @PolymorphicTypes.Type(type = Impl2.class, alias = "IMPL_2")
* }
* <code>})</code>
* {@code
* })
*
* interface A { ... }
*
* record Impl1(...) implements A { ... }

@ -1,5 +1,5 @@
name: ConfigLib
version: 4.1.0
version: 4.2.0
website: https://github.com/Exlll/ConfigLib
description: A library for working with YAML configurations.
author: Exlll

@ -8,7 +8,7 @@ import com.velocitypowered.api.plugin.Plugin;
@Plugin(
id = "configlib",
name = "ConfigLib",
version = "4.1.0",
version = "4.2.0",
url = "https://github.com/Exlll/ConfigLib",
description = "A library for working with YAML configurations.",
authors = {"Exlll"}

@ -1,5 +1,5 @@
name: ConfigLib
version: 4.1.0
version: 4.2.0
website: https://github.com/Exlll/ConfigLib
description: A library for working with YAML configurations.
author: Exlll

Loading…
Cancel
Save