This repository is set up for solving Advent of Code 2025 puzzles in Kotlin with JUnit-based tests.
- Run the sample tests:
./gradlew test - Execute a day's solution by running the
mainfunction inside itsDayXX.kt(via your IDE orkotlinrunner). The entry point prints both parts usingsrc/main/resources/dayXX.txt.
- Create
src/main/kotlin/aoc2025/dayXX/DayXX.ktimplementingDay<P1, P2>. - Put your real puzzle input in
src/main/resources/dayXX.txt. - Add sample input for tests in
src/test/resources/dayXX_sample.txt(or any other variant name). - Write tests in
src/test/kotlin/aoc2025/dayXX/DayXXTest.ktcallingreadInput(day = XX, variant = "sample")and asserting both parts.
readInput(day: Int, variant: String = "input")loadsdayXX.txt(ordayXX_<variant>.txt) from the classpath.- The
Dayinterface keeps signatures consistent across all days:part1(input: List<String>)andpart2(input: List<String>).