My solutions to the Advent of Code. The source code is here.
Also includes my solutions for Project Euler. The source code is here. (It's in a private repo.)
Project Euler does not allow sharing solutions. Therefore, the code for Project Euler is stored in a private repository. This repository is included as a git submodule. In other words, this repository contains a link to a specific commit in that other repository.
Note the following usage instructions.
# Clone without submodules
git clone git@github.com:FWDekker/aoc.git
# Clone with submodules
git clone git@github.com: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
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).
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. This repository has the following subprojects:
buildSrc
: Common build logic for all subprojects.std
: Utility and helper functions for other subprojects.aoc
: Advent of Code.euler
: Project Euler.
Check their respective README.md
s for more information.
You can run tasks as follows:
# 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"