Skip to content

Project Layout

Petrus Pradella edited this page Jun 28, 2026 · 6 revisions

Project Layout

Single-module Gradle project; base package br.com.finalcraft.everyconfig.

EveryConfig/
├── build.gradle                     # java-library + maven-publish; Java 25 toolchain, Jabel -> Java 8 floor
├── gradle/libs.versions.toml        # version catalog (single source of truth for versions)
├── gradle.properties                # auto-download off; Gradle auto-detects local JDKs
└── src/
    ├── main/java/br/com/finalcraft/everyconfig/
    │   ├── ECVersion.java               # version marker (mirrors the Gradle version)
    │   ├── config/                      # Config (dynamic API + lifecycle), LoadStatus, ConfigIOException
    │   │   └── section/                 # ConfigSection (scoped path view)
    │   ├── core/
    │   │   ├── KeyOrder.java            # captured key order, consulted on save
    │   │   ├── tree/                    # DPath, PathOptions (dotted-path utilities; DPath avoids java.nio.file.Path)
    │   │   ├── coerce/                  # NodeCoercion (the Java <-> Jackson seam)
    │   │   └── comment/                 # CommentTree, CommentType (the comment overlay)
    │   ├── codec/                       # Codec SPI, CommentFidelity, CommentAware, ObjectMapperAware,
    │   │   │                            #   CodecRegistry, CodecException, ECMapperProfiles
    │   │   └── jackson/                 # JsonCodec, YamlCodec, TomlCodec, JsoncCodec
    │   ├── io/                          # Backend, AtomicFileBackStore, FilePollWatcher, ConfigExecutor
    │   ├── binding/                     # EntityBinder, BindOptions, BindException, LoadIssue, LoadIssueAware
    │   │   ├── schema/                  # Schema, SchemaCache, ClosedSchema, BindingNames
    │   │   ├── merge/                   # SmartMerge, IdIndexer, LifecycleInvoker
    │   │   └── introspect/              # EveryConfigAnnotationIntrospector, EveryConfigModule, EnumNameSerializer
    │   └── annotation/                  # @Key, @Comment, @Section, @Id, @PostLoad, KeyTransformCase, CommentMode
    └── test/java/br/com/finalcraft/everyconfig/
        ├── config/
        │   ├── data/                    # shared DTOs for the contract suite (Dtos)
        │   └── modules/                 # AbstractConfigTest + json/ yaml/ toml/ jsonc/ subclasses
        ├── codec/  binding/  io/        # per-feature unit tests

How the layers depend

  • config is the public handle; it uses core, codec and io, and offers binding as a derived view.
  • core is dependency-free model code (the tree, coercion, comments, key order).
  • codec knows the formats; codec.jackson holds the four concrete codecs.
  • io is file I/O only (no format knowledge).
  • binding is split by concern: the public API in binding, the schema model in binding.schema, the merge + @Id logic in binding.merge, and the Jackson bridge in binding.introspect.

→ See also Architecture Overview

Clone this wiki locally