A simple configuration library for Java applications providing a node structure, a variety of formats, and tools for transformation
APACHE-2.0 License
Bot releases are visible (Hide)
Published by zml2008 about 3 years ago
Automatic-Module-Name
manifest attribute to all Configurate components. This allows the 3.x series to be used in a modular environment.Note: The module names were selected to align with the Configurate 4 artifact (and module) names. See the 4.0.0 release notes for information on the module renames that happened for that release.
Published by zml2008 over 3 years ago
Published by zml2008 over 3 years ago
This is a minor feature release to the Configurate v4 series that addresses a variety of bugfixes, small API additions, and Javadoc tweaks that have built up in the months since the 4.0.0 release.
Thanks to forresthopkinsa, jpenilla, and ItsTehBrian for their contributions to this release.
NodePath.plus
added to combine pathsAbstractListChildSerializer
is now part of Configurate's public APIConfigurationLoader
to load/save from strings.
so they appear hidden in file viewersConfigurationOptions
and AbstractConfigurationLoader
ConfigurationNode.require
methods for cases where a return value is known to be non-null, to avoid nullabilty warnings in IDEsflags
field to the @Matches
constrant annotation to pass through Pattern
flagsGsonConfigurationLoader.gsonSerializers()
)ConfigurationNode
EnumSet
s rather than HashSet
sTypes.box/unbox
null
-valued non-virtual nodes (#187)get
method to use the appropriate Java overload of get
(#185)NodePath.plus
extension function has been deprecated since it is replaced by the plus
method in NodePath
itself.Published by zml2008 almost 4 years ago
Welcome to a new major release of Configurate! We've taken the time to review a lot of longstanding pain points, so there are a variety of breaking changes in this release. Some of the behaviour changes can be subtle, so please read the changelog carefully.
To ease upgrading for IntelliJ users, a migration XML file has been attached to this release. This can be imported as IDE settings, or placed in your $INTELLIJ_HOME/migration
folder (in %APPDATA%/Roaming/JetBrains
on Windows).
TypeSerializer
s for Path
and File
registerExact
method to TypeSerializerCollection.Builder
to register serializers for only a single type and not its subtypes.DynamicOps
implementation, DataFix
-using transformations, and conversions between Codec
s and TypeSerializer
s.NodePath
across the whole API, for operations like resolving nodes and specifying transformation paths.ConfigurateException
, which provide more machine-readable metadata. ConfigurateException
extends IOException
, so existing error handling may not break.NodeFactory
interface to provide a common view for creating configuration nodes.YAML
files indented with tabs.TypeSerializer
s. This will, for collection types, resolve null
node values as empty collections. Implicit initialization is enabled by default.ninja.leaping
to org.spongepowered
package.objectmapping.serialize
to serialize
package.get
and set
prefixes from method names across the API.TypeToken
moving to use either java.lang.reflect.Type
or the GeAnTyRef TypeToken
.configurate-json
implementation to configurate-jackson
.configurate-ext-kotlin
to configurate-extra-kotlin
.core
into configurate-extra-guice
.null
values instead.YamlConfigurationLoader
now returns CommentedConfigurationNode
instances, in preparation for full comment support coming in a future release.YAML
and HOCON
loaders, the underlying libraries used are now to be treated as an implementation detail. All API that directly referenced them has been replaced with equivalents that use Configurate types.ConfigurationOptions
values for shouldCopyDefaults
has been set to true
.The object mapper has changed quite a bit, so most users will need to change their use in some way.
TypeSerializerCollection
to be immutable. A new child collection must be created to add custom type serializers.ObjectMapper.Factory.Builder
for a more thorough overview.configurate-extra-kotlin
module, Kotlin data
classes.@Setting
annotation is now optional. By default, all non-transient fields will be included in objects, and names will be converted to the kebab-case
naming scheme. Both of these can be customized with a custom ObjectMapper.Factory
shouldCopyDefaults
option is now respected for mapped object fields.ObjectMapperFactory
field has been removed from ConfigurationOptions
. Instead, the object mapper can be registered like any other type serializer, using the TypeSerializerCollection.Builder#registerAnnotatedObjects
method.Published by zml2008 almost 4 years ago
This is a bugfix release for the Configurate 3.7 series, coming with a few minor fixes:
Compiled jars are available from Maven Central
Published by zml2008 about 4 years ago
This is a bugfix release for 3.7, coming with a few minor tweaks:
AtomicFiles
(default for most configuration loaders).Published by zml2008 over 4 years ago
After a long wait, v3.7 is finally here. The biggest feature in this release is the ConfigurationReference
system and associated ability to automatically reload configurations, but it also contains a variety of bug fixes and deprecates some methods in preparation for 4.0. There is now also a collection of idiomatic Configurate examples included in the repository, under the configurate-examples
folder that can be referenced for inspiration on how to effectively use the library.
Additionally, up-to-data Javadocs are now published at https://configurate.aoeu.xyz! It's been a while since javadocs were last updated, so the new revision brings a lot of improvements.
Thanks to @kashike for contributions to this release
set*
methods in ConfigurationOptions
have been deprecated, to be replaced with equivalent methods starting with with___
.TypeSerializers
have been moved to TypeSerializerCollection
, and register____
methods have been renamed to register
TypeSerializerCollection
is deprecated behaviour. Any configurations that need custom type serializers should create their own child of the default collection and add to that.ConfigurationNode.getAppendedChild()
should be replaced with ConfigurationNode.appendListNode()
hasListChildren()
and hasMapChildren()
should be replaced with isList()
and isMap()
to more effectively express that they reflect the type of the node, not whether it has contents.Simple*
nod implementation classes is deprecated. They will be made package-private in 4.0.ConfigurationNodeWalker
has been deprecated, to be replaced with the new more structured ConfigurationVisitor
API.ValueType
will be removed in 4.0. Its functionality is already covered by existing methods.New configuration and value reference system for automatically reloading configurations
New module configurate-ext-kotlin
with some basic utilities for using Configurate in Kotlin
New module configurate-tool
is a CLI tool to inspect configurations loaded through Configurate loaders`
New module: configurate-bom
can be imported to centralize Configurate version declaration across a project
loader: Automatically create parent directories when trying to write a configuration
objectmapping: New TypeSerializer
s for arrays, char
s, Set
s, and ConfigurationNode
s
core: New method isEmpty()
to determine if a node has contents, or exists but with an empty value.
core: New act
method on nodes that takes a Consumer<ConfigurationNode>
to perform an action on the node
core: New setCommentIfAbsent
method on CommentedConfigurationNode
s
core: Abstract TypeSerializer
implementations added for Scalar
s and objects read from list nodes
loader: Added functional helper methods for changing options and options' TypeSerializerCollection
when building a loader
core: New getNode(Iterable<?>)
method will work the same as getNode(Object...)
, but allow looking up nodes without having to convert existing collections to arrays.
core: AttributedConfigurationNode
now extends CommentedConfigurationNode
xml: Load and save comments
all: Configurate jars now include their license for easier compliance
Map
sclass MyConfig<T> { @Setting private List<T> items;
, the list will be appropriately resolved as long as new object mapper factory methods that accept TypeToken
s are used.ObjectMappers
rather than throwing an exceptionTypeSerializer
for subclasses of Number
will now attempt to coerce values to types native to the destination configuration when serializing.AttributedConfigurationNodes
will now be attached as soon as attributes are set on them.getPath()
has been corrected to return this.Releases are available on the Sponge maven repo, and all configurate components are contained within the configurate-tool
distribution attached to this release.
Published by gabizou over 5 years ago
Bug fixes following the 3.6 release:
This bugfix release does not change any previous behaviors of serialization/deserialization, except now merging ConfigurationNode
s will no longer null values from the other node being merged into the parent if the parent has a null value in said node.
Published by kashike about 6 years ago
Published by kashike over 6 years ago
NodePath
and ConfigurationTransformation
Published by kashike over 6 years ago
org.spongepowered
ConfigurationNode#copy
key
+ value
in ConfigurationNode#toString
CommentedConfigurationNode#equals
never returning trueNodeWalker
utility for traversing configuration structuresMigration Note:
As the gradle group has changed from ninja.leaping to org.spongepowered you will need to update your dependencies in your build scripts.
E.g. For Gradle:
compile 'ninja.leaping.configurate:configurate-hocon:3.3'
compile 'ninja.leaping.configurate:configurate-gson:3.3'
compile 'ninja.leaping.configurate:configurate-yaml:3.3'
becomes
compile 'org.spongepowered:configurate-hocon:3.4'
compile 'org.spongepowered:configurate-gson:3.4'
compile 'org.spongepowered:configurate-yaml:3.4'
compile 'org.spongepowered:configurate-xml:3.4'
No other changes should be necessary.
Published by zml2008 over 7 years ago
Downloads are available from Maven Central
Published by zml2008 about 8 years ago
Published by zml2008 almost 9 years ago
Distributed on Maven Central as usual.
Published by zml2008 over 9 years ago
Published by zml2008 over 9 years ago
Published by zml2008 over 9 years ago
Published by zml2008 over 9 years ago
Published by zml2008 over 9 years ago