Skip to content
Novus Examples
properties943 B

gradle.properties with Escapes and Continuations

A gradle.properties exercising the .properties grammar rather than Gradle: a \uXXXX escape, a backslash line continuation, all three key/value separator forms, and a key containing escaped separator characters.

Preview — first 25 linesproperties
# Gradle properties. A .properties file is ISO 8859-1 by convention with \uXXXX escapes for
# anything outside it, which is the encoding trap this fixture exists to expose.
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.configuration-cache=true

version=1.4.0
group=com.example.orders

# Escaped non-ASCII: this value is the word "café" written as a Unicode escape.
project.displayName=Orders caf\u00e9 service

# A line continuation: the backslash joins this value with the next line, and the leading
# whitespace on the continuation line is stripped.
project.summary=Fictional orders service used as a \
                build-file parsing fixture.

# Keys may be separated by =, :, or whitespace. All three appear below and mean the same thing.
build.channel:stable
build.owner example-platform-team

# Escaped separators inside a key.
path\:to\=value=escaped key characters

Specifications

Entries
12
Unicode Escapes
1
Line Continuations
1
Separator Forms
=, :, whitespace
Escaped Key Characters
1

Testing contract

Expected to pass
Scenario
Parse a .properties file that uses all three separator forms and a line continuation
Expected result
The \u00e9 escape decodes to é, the continued value joins into one string with the continuation indentation stripped, and build.channel parses identically whether separated by : or =

What is a .properties file?

A .properties file is the Java configuration format: one `key=value` or `key:value` pair per line, with `#` or `!` comments, backslash line continuations, and escapes for spaces, colons, and equals signs inside keys. Keys are conventionally dot-separated to imply hierarchy, though the format itself is flat. In its original definition the file is ISO-8859-1 with `\uXXXX` escapes for anything else; modern Java tooling also reads UTF-8.

How to use this file

Use an example .properties file to test configuration and resource-bundle loaders, checking continuation lines, escaped separators inside keys, duplicate-key precedence, and correct decoding of `\uXXXX` escapes and non-ASCII values.

How to use this file for testing

“gradle.properties with Escapes and Continuations” is a deterministic Novus Examples fixture for Config parsing, Syntax highlighting, Editor testing. TOML and INI configuration files with nested sections and typed values — for testing config parsers and loaders.

Documented properties for this file: 12 entries. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Pipeline and infrastructure fixtures are inert configuration: steps reference fictional images and scripts, and nothing here executes. Run your linter, schema validator, migrator, or policy engine against them, and expect the deprecated-syntax and intentionally invalid variants to be rejected.

Point your config loader at the file and assert it reads the documented sections and typed values, including any deliberately-tricky nesting or comments.

Generated by generation/pipelines.py. Free for any use, no attribution required — license.