Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fwdekker/aoc
My solutions to the Advent of Code.
https://github.com/fwdekker/aoc
advent-of-code advent-of-code-2023 advent-of-code-2023-kotlin
Last synced: 7 days ago
JSON representation
My solutions to the Advent of Code.
- Host: GitHub
- URL: https://github.com/fwdekker/aoc
- Owner: FWDekker
- Created: 2023-12-01T09:52:34.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-10-18T18:05:29.000Z (20 days ago)
- Last Synced: 2024-10-20T05:57:37.447Z (18 days ago)
- Topics: advent-of-code, advent-of-code-2023, advent-of-code-2023-kotlin
- Language: Kotlin
- Homepage:
- Size: 487 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advent of Code
My solutions to the [Advent of Code](https://adventofcode.com/).
[The source code is here.](https://github.com/FWDekker/aoc/tree/main/aoc/src/main/kotlin/com/fwdekker/aoc)Also includes my solutions for [Project Euler](https://projecteuler.net/).
[The source code is here.](https://github.com/FWDekker/project-euler)
(It's in a private repo.)## Git submodules
Project Euler does not allow sharing solutions.
Therefore, the code for Project Euler is [stored in a private repository](https://github.com/FWDekker/project-euler).
This repository is included as a [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules).
In other words, this repository contains a link to a specific commit in that other repository.Note the following usage instructions.
```shell
# Clone without submodules
git clone [email protected]:FWDekker/aoc.git
# Clone with submodules
git clone [email protected]:FWDekker/aoc.git --recurse-submodules# Add missing submodules after cloning
git submodule update --init --recursive
# Update submodules to respective HEADs
git submodule update --recursive --remote
```To commit changes you've made in the `euler/` directory, run
```shell
cd euler; git commit
```
Now, the root repository will be outdated, since the local repository inside `euler/` no longer matches the commit referred to by the root repository.
Therefore, you'll have to commit the changes there as well (but don't fret if you forget).## Gradle sub-projects
To allow code Advent of Code and Project Euler to be built separately, but still use a common codebase, the repository has been structured using [Gradle subprojects](https://docs.gradle.org/current/userguide/intro_multi_project_builds.html).
This repository has the following subprojects:
* [`buildSrc`](https://github.com/FWDekker/aoc/tree/main/buildSrc): Common build logic for all subprojects.
* [`std`](https://github.com/FWDekker/aoc/tree/main/std): Utility and helper functions for other subprojects.
* [`aoc`](https://github.com/FWDekker/aoc/tree/main/aoc): Advent of Code.
* [`euler`](https://github.com/FWDekker/project-euler): Project Euler.Check their respective `README.md`s for more information.
You can run tasks as follows:
```shell
# Run all tests in all subprojects
gradlew test
# Run all tests in subproject 'aoc'
gradlew :aoc:test
# Run tests tagged with "Foo" in subproject 'aoc'
gradlew :aoc:test -Pkotest.tags="Foo"
```