Starter template for solving Advent of Code in Kotlin
- Starter .gitignore
- Junit and Hamcrest test libraries included (see Testing below)
- Gradle setup so you can run a specific day or all days on the command line (see Running below)
Project is already setup with gradle. To run the app:
- Navigate to top-level directory on the command line
- Run
./gradlew run
to run all days - Run
./gradlew run --args $DAY
where$DAY
is an integer to run a specific day
Project includes Junit and Hamcrest and a stub unit test to get you going. To run all tests:
- Navigate to top-level directory on the command line
- Run
./gradlew test
- Add
--info
,--debug
or--stacktrace
flags for more output
- Inputs go into
src/main/resources
and follow the naming conventioninput_day_X.txt
- Solutions go into
src/main/kotlin/days
and extend theDay
abstract class, callings its constructor with their day number - Solutions follow the naming convention
DayX
- It is assumed all solutions will have two parts but share the same input
- Input is exposed in the solution classes in two forms -
inputList
andinputString
- Day 1 solution class and input file are stubbed as a guide on how to extend the project
- To get started simply replace
input_day_1.txt
with the real input and the solutions inDay1
with your own