diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..cb9a50e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,13 @@ +# Normalize line endings on commit; check out platform-native by default +* text=auto + +# Scripts that must keep LF regardless of platform +gradlew text eol=lf +*.sh text eol=lf +*.py text eol=lf + +# Windows batch files need CRLF +*.bat text eol=crlf + +# Binaries +*.jar binary diff --git a/CHANGELOG.md b/CHANGELOG.md index d611a26..311f22f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,25 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Nothing yet. +## [1.1.0] - 2026-09-21 + +Dependency and toolchain refresh, plus line-ending normalization. No runtime +behavior, challenge content, or public DSL has changed. + +### Added +- `.gitattributes` normalizing line endings on commit: `text=auto` by default, LF enforced for `gradlew`, `*.sh`, and `*.py`, CRLF for `*.bat`, and `*.jar` marked binary. + +### Changed +- Upgraded the Gradle wrapper from 9.6.1 to 9.7.1. +- Bumped dependencies: Ktor → 3.6.0, Kotest → 6.2.5, `readingbat-core` → 3.4.0. +- Bumped build plugins: kotlinter → 5.7.0, detekt → 2.0.0-alpha.6, versions plugin → 0.64.0. +- `gradlew.bat` was renormalized to CRLF and the Gradle wrapper jar refreshed as part of the wrapper upgrade. + +### Documentation +- Reconstructed a `[1.0.0]` section in this changelog from Git history, replacing the former catch-all "Pre-1.0.1 history" heading, and added Keep a Changelog compare links for every release. +- Documented the `.gitattributes` line-ending policy in `README.md`, `CLAUDE.md`, and `llms.txt`. +- Added the CI workflow to the `llms.txt` development section. + ## [1.0.1] - 2026-08-01 Tooling, CI, and toolchain upgrades. No runtime behavior, challenge content, @@ -75,6 +94,7 @@ are less complete than later ones. Structured changelog tracking begins with - `andor7` function name mismatch, and the unregistered `front_back` challenge. - Several incorrect challenge return types. -[Unreleased]: https://github.com/readingbat/readingbat-python-content/compare/1.0.1...master +[Unreleased]: https://github.com/readingbat/readingbat-python-content/compare/1.1.0...master +[1.1.0]: https://github.com/readingbat/readingbat-python-content/compare/1.0.1...1.1.0 [1.0.1]: https://github.com/readingbat/readingbat-python-content/compare/1.0.0...1.0.1 [1.0.0]: https://github.com/readingbat/readingbat-python-content/commits/1.0.0 diff --git a/CLAUDE.md b/CLAUDE.md index d2d7532..155c828 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -26,6 +26,10 @@ The `main()` prints define the test cases — each `print()` call produces an ex Run `make help` for a self-documenting list of the build, test, lint, run, and packaging targets. +## Line Endings + +`.gitattributes` normalizes line endings on commit: LF for `*.py`, `*.sh`, and `gradlew`; CRLF for `*.bat`. Write new challenge files with LF and let Git handle the rest — do not hand-convert. + ## Adding a New Challenge 1. Create `python//challenge_name.py` following the file pattern above diff --git a/README.md b/README.md index 24eadb6..40d47e3 100644 --- a/README.md +++ b/README.md @@ -43,3 +43,9 @@ if __name__ == '__main__': 2. Register the challenge in `src/main/kotlin/Content.kt` — either add a `challenge()` call or ensure the filename matches an existing `includeFilesWithType` glob. Return types are qualified, e.g., `ReturnType.IntType`. 3. Run `make lint` then `make tests` to verify. + +## Line Endings + +`.gitattributes` normalizes line endings on commit: LF for `*.py`, `*.sh`, and +`gradlew`; CRLF for `*.bat`; `*.jar` is treated as binary. If files show as +modified right after a fresh clone or pull, run `git add --renormalize .` once. diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index bfb4233..ee67873 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,48 @@ # Release Notes +## 1.1.0 — dependency refresh and line-ending normalization + +A maintenance release: current versions of the build toolchain and runtime +dependencies, plus a `.gitattributes` file that normalizes line endings across +platforms. No runtime behavior, challenge content, or public DSL has changed. + +### Highlights + +- **Gradle wrapper → 9.7.1.** Up from 9.6.1. +- **Dependency upgrades.** Ktor → 3.6.0, Kotest → 6.2.5, `readingbat-core` → + 3.4.0. Kotlin (2.4.10), `common-utils` (3.2.2), and `kotlin-logging` (8.0.4) + are unchanged from 1.0.1. +- **Build plugin upgrades.** kotlinter → 5.7.0, detekt → 2.0.0-alpha.6, + versions plugin → 0.64.0. +- **`.gitattributes`.** Line endings are now normalized on commit: `text=auto` + by default, LF enforced for `gradlew`, `*.sh`, and `*.py`, CRLF for `*.bat`, + and `*.jar` treated as binary. This keeps the Python challenge files and the + Gradle wrapper scripts stable regardless of the contributor's platform. + +### Documentation + +- The changelog now carries a reconstructed `[1.0.0]` section (built from Git + history after the tag was created retroactively), replacing the former + catch-all "Pre-1.0.1 history" heading, plus compare links for every release. +- `README.md`, `CLAUDE.md`, and `llms.txt` document the new line-ending policy. +- `llms.txt` now mentions the GitHub Actions CI workflow alongside the other + development commands. + +### Upgrade notes + +- Contributors on Windows may see `gradlew.bat` show as modified the first time + they pull, as Git renormalizes it to CRLF under the new `.gitattributes`. + Running `git add --renormalize .` once resolves it. +- Run `./gradlew --refresh-dependencies` (or `make build`) once after pulling so + the new plugin and dependency versions resolve. +- The Java 25 toolchain requirement from 1.0.1 is unchanged. + +### Full diff + +See the [compare view on +GitHub](https://github.com/readingbat/readingbat-python-content/compare/1.0.1...1.1.0) +for the complete set of changes in this release. + ## 1.0.1 — tooling, CI, and dependency upgrades This release focuses on developer ergonomics, continuous integration, and diff --git a/gradle.properties b/gradle.properties index 5a1c7c1..ef1db44 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ group=com.readingbat -version=1.0.1 +version=1.1.0 kotlin.code.style=official org.gradle.caching=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2552c8e..faccb44 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,15 +1,15 @@ [versions] -detekt = "2.0.0-alpha.5" -gradle-wrapper = "9.6.1" +detekt = "2.0.0-alpha.6" +gradle-wrapper = "9.7.1" jvm = "25" -kotest = "6.2.3" +kotest = "6.2.5" kotlin = "2.4.10" -kotlinter = "5.6.0" -ktor = "3.5.1" +kotlinter = "5.7.0" +ktor = "3.6.0" logging = "8.0.4" -readingbat = "3.3.1" +readingbat = "3.4.0" utils = "3.2.2" -versions = "0.57.0" +versions = "0.64.0" [libraries] core-utils = { module = "com.pambrose.common-utils:core-utils", version.ref = "utils" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index b1b8ef5..eddabd2 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a9db115..ad7845b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --git a/llms.txt b/llms.txt index 933b8f5..bf8f454 100644 --- a/llms.txt +++ b/llms.txt @@ -41,6 +41,8 @@ Each .py file has: a `# @desc` comment, a function implementing the challenge, a - JVM toolchain: Java 25 - Testing: Kotest with JUnit5 - Lint/format: kotlinter + detekt, configured via `.editorconfig` and `build.gradle.kts` +- Line endings: normalized by `.gitattributes` (LF for `*.py`, `*.sh`, `gradlew`; CRLF for `*.bat`) +- CI: `.github/workflows/ci.yml` runs `make lint` and `make tests` on every push and PR to `master` ## Adding Challenges