You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My solutions to [Advent of Code puzzles](https://adventofcode.com/) in Kotlin!
2
+
3
+
My solutions to [Advent of Code](https://adventofcode.com/) puzzles in Kotlin!
3
4
4
5
## Years completed
5
-
2024: 50/50⭐ (not all solutions are implemented in repo yet)
6
+
7
+
2024: 50/50⭐
8
+
9
+
Missing implementations:
10
+
11
+
- Day 24 (part 2): solution is mostly manual, it's difficult to implement in code
6
12
7
13
## Requirements to run
14
+
8
15
- JDK 21
9
16
10
-
## Setup
11
-
- clone the repo `git clone https://github.com/wezik/aoc-kotlin.git`
12
-
- enter `cd aoc-kotlin`
13
-
- build fat jar with `./gradlew buildFat`
14
-
- source aliases with `source ./alias.sh`
17
+
## Installation from source
18
+
19
+
### Linux/macOS
15
20
16
-
or simply copy and paste in terminal:
17
21
```bash
18
22
git clone https://github.com/wezik/aoc-kotlin.git
19
23
cd aoc-kotlin
20
24
./gradlew buildFat
21
25
source ./alias.sh
22
26
```
23
27
24
-
now run the CLI (look [below](#how-to-use) for more details)
28
+
### Windows
29
+
30
+
```ps1
31
+
git clone https://github.com/wezik/aoc-kotlin.git
32
+
cd aoc-kotlin
33
+
.\gradlew buildFat
34
+
```
25
35
26
36
## How to use
27
-
This project is split into 2 separate CLI entrypoints:
28
-
-`aoc` core
29
-
-`aot` test runner
37
+
38
+
This project provides 2 separate CLI entrypoints: [aoc](#aoc) and [aot](#aot).
39
+
These are executed via shell or batch scripts, allowing you to use them like a regular CLI tool.
40
+
The entrypoint scripts are:
41
+
42
+
-[alias.sh](alias.sh) for Linux/macOS - defines `aoc` and `aot` functions
43
+
-[aoc.bat](aoc.bat) for Windows - runs `aoc`
44
+
-[aot.bat](aot.bat) for Windows - runs `aot`
45
+
46
+
> [!NOTE]
47
+
> These scripts are meant to be run from the project directory,
48
+
> they *do not install anything globally* or add commands to your system `PATH`.
49
+
50
+
After building the project (and sourcing aliases for Linux/macOS with `source ./alias.sh`)
51
+
You can invoke them like:
52
+
53
+
```bash
54
+
aoc -d 5
55
+
aot -d 3 --path "inputs/Day03.txt"
56
+
```
57
+
58
+
Or in Powershell:
59
+
60
+
```ps1
61
+
.\aoc.bat -d 5
62
+
.\aot.bat -d 3 --path "inputs/Day03.txt"
63
+
```
30
64
31
65
### AOC
32
-
Serves as the core CLI entrypoint to run solutions
33
66
34
-
> [!NOTE]
35
-
> `aoc` entrypoint runs against real advent of code inputs, you have to either export `ADVENT_COOKIE` value from your advent of code session or provide `--session-cookie` option
67
+
Loads inputs directly from Advent of Code website to run solutions against.
68
+
69
+
> [!IMPORTANT]
70
+
> It runs against advent of code inputs, which requires session cookie, you can either:
0 commit comments