This repository contains my solutions to Advent Of Code.
Before running this project, make sure you have the following software installed:
- Java 23 (or higher)
- Maven
java formatting bazel formatting ci Document command of running specific day manually: echo "input" | bazel run //years/2024/01:solver or bazel run //years/2024/01:solver then enter input + ctrl + d. make a better run.sh script / should it even use bazel? generate java day script?
The program automatically retrieves the problem input, and therefore requires the Advent of Code session cookie. To use it, retrieve the session cookie from your browser and set it as an environment variable AOC_SESSION
. For example, in Windows it can be set with the following command:
setx AOC_SESSION "<your_session_cookie_here>"
Build the project with the following command:
mvn clean install
Run the program with following Maven command with the -year
and -day
flags to specify the year and day of the puzzle:
mvn exec:java -Dyear=<year> -Dday=<day>
To automate posting answers to the Advent of Code website, you can use the following commands. Choose the appropriate command based on which part of the challenge you want to submit:
mvn exec:java -Dyear=<year> -Dday=<day> "-Dexec.args=-p1 -p2"
mvn exec:java -Dyear=<year> -Dday=<day> "-Dexec.args=-p1"
mvn exec:java -Dyear=<year> -Dday=<day> "-Dexec.args=-p2"
Java
Java
Java
Scala
Clojure
Clojure
Kotlin
Clojure
Java
Java