Skip to content

Commit f6e12de

Browse files
committed
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.
1 parent 0eb7381 commit f6e12de

File tree

8 files changed

+20
-25
lines changed

8 files changed

+20
-25
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ with `configlib-paper` (see [here](#support-for-bukkit-classes-like-itemstack)).
862862
<dependency>
863863
<groupId>com.github.Exlll.ConfigLib</groupId>
864864
<artifactId>configlib-yaml</artifactId>
865-
<version>v4.1.0</version>
865+
<version>v4.2.0</version>
866866
</dependency>
867867
```
868868

@@ -871,13 +871,13 @@ with `configlib-paper` (see [here](#support-for-bukkit-classes-like-itemstack)).
871871
```groovy
872872
repositories { maven { url 'https://jitpack.io' } }
873873
874-
dependencies { implementation 'com.github.Exlll.ConfigLib:configlib-yaml:v4.1.0' }
874+
dependencies { implementation 'com.github.Exlll.ConfigLib:configlib-yaml:v4.2.0' }
875875
```
876876

877877
```kotlin
878878
repositories { maven { url = uri("https://jitpack.io") } }
879879
880-
dependencies { implementation("com.github.Exlll.ConfigLib:configlib-yaml:v4.1.0") }
880+
dependencies { implementation("com.github.Exlll.ConfigLib:configlib-yaml:v4.2.0") }
881881
```
882882

883883
</details>
@@ -901,7 +901,7 @@ this [issue](https://github.com/Exlll/ConfigLib/issues/12) if you have any troub
901901
<dependency>
902902
<groupId>de.exlll</groupId>
903903
<artifactId>configlib-yaml</artifactId>
904-
<version>4.1.0</version>
904+
<version>4.2.0</version>
905905
</dependency>
906906
```
907907

@@ -910,13 +910,13 @@ this [issue](https://github.com/Exlll/ConfigLib/issues/12) if you have any troub
910910
```groovy
911911
repositories { maven { url 'https://maven.pkg.github.com/Exlll/ConfigLib' } }
912912
913-
dependencies { implementation 'de.exlll:configlib-yaml:4.1.0' }
913+
dependencies { implementation 'de.exlll:configlib-yaml:4.2.0' }
914914
```
915915

916916
```kotlin
917917
repositories { maven { url = uri("https://maven.pkg.github.com/Exlll/ConfigLib") } }
918918
919-
dependencies { implementation("de.exlll:configlib-yaml:4.1.0") }
919+
dependencies { implementation("de.exlll:configlib-yaml:4.2.0") }
920920
```
921921

922922
</details>

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
allprojects {
22
group = "de.exlll"
3-
version = "4.1.0"
3+
version = "4.2.0"
44
}

buildSrc/src/main/kotlin/core-config.gradle.kts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ repositories {
2323
}
2424

2525
dependencies {
26-
testFixturesApi("org.junit.jupiter:junit-jupiter-api:5.8.2")
27-
testFixturesApi("org.junit.jupiter:junit-jupiter-params:5.8.2")
28-
testFixturesApi("org.junit.jupiter:junit-jupiter-engine:5.8.2")
29-
testFixturesApi("org.junit.platform:junit-platform-runner:1.8.2")
30-
testFixturesApi("org.junit.platform:junit-platform-suite-api:1.8.2")
31-
testFixturesApi("org.mockito:mockito-inline:4.2.0")
32-
testFixturesApi("org.mockito:mockito-junit-jupiter:4.2.0")
26+
testFixturesApi("org.junit.jupiter:junit-jupiter-api:5.9.0")
27+
testFixturesApi("org.junit.jupiter:junit-jupiter-params:5.9.0")
28+
testFixturesApi("org.junit.jupiter:junit-jupiter-engine:5.9.0")
29+
testFixturesApi("org.junit.platform:junit-platform-runner:1.9.0")
30+
testFixturesApi("org.junit.platform:junit-platform-suite-api:1.9.0")
31+
testFixturesApi("org.mockito:mockito-inline:4.7.0")
32+
testFixturesApi("org.mockito:mockito-junit-jupiter:4.7.0")
3333
testFixturesApi("org.hamcrest:hamcrest-all:1.3")
3434
testFixturesApi("com.google.jimfs:jimfs:1.2")
3535
}

configlib-core/build.gradle.kts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
plugins {
22
`core-config`
3-
}
4-
5-
dependencies {
6-
implementation("org.snakeyaml:snakeyaml-engine:2.3")
73
}

configlib-core/src/main/java/de/exlll/configlib/PolymorphicTypes.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@
1212
* <pre>
1313
* {@code
1414
* @Polymorphic
15-
* @PolymorphicTypes({
15+
* @PolymorphicTypes( {
1616
* @PolymorphicTypes.Type(type = Impl1.class, alias = "IMPL_1"),
1717
* @PolymorphicTypes.Type(type = Impl2.class, alias = "IMPL_2")
18-
* }
19-
* <code>})</code>
20-
* {@code
18+
* })
19+
*
2120
* interface A { ... }
2221
*
2322
* record Impl1(...) implements A { ... }

configlib-paper/src/main/resources/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: ConfigLib
2-
version: 4.1.0
2+
version: 4.2.0
33
website: https://github.com/Exlll/ConfigLib
44
description: A library for working with YAML configurations.
55
author: Exlll

configlib-velocity/src/main/java/de/exlll/configlib/ConfigLib.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@Plugin(
99
id = "configlib",
1010
name = "ConfigLib",
11-
version = "4.1.0",
11+
version = "4.2.0",
1212
url = "https://github.com/Exlll/ConfigLib",
1313
description = "A library for working with YAML configurations.",
1414
authors = {"Exlll"}

configlib-waterfall/src/main/resources/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: ConfigLib
2-
version: 4.1.0
2+
version: 4.2.0
33
website: https://github.com/Exlll/ConfigLib
44
description: A library for working with YAML configurations.
55
author: Exlll

0 commit comments

Comments
 (0)