Skip to content

Commit c496d59

Browse files
committed
Switch project structure
1 parent 01062ce commit c496d59

File tree

78 files changed

+69
-2900
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+69
-2900
lines changed

.github/workflows/gradle_build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
- uses: actions/checkout@v4
1414
with:
1515
fetch-depth: 0
16+
submodules: 'true'
1617
- uses: actions/setup-java@v4
1718
with:
1819
distribution: corretto

README.md

Lines changed: 47 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,55 @@
1-
# Advent of Code
1+
# Advent of Code 2021
22

3-
This project collects all my simple project for [Advent of Code](https://adventofcode.com/) projects. I started in 2022
4-
participating. In the meantime I'm programming the missing Advent of Code years. Done in different languages depending
5-
on interest and learning about languages. All projects are built using build management system
3+
Simple project for Advent of Code 2021.
4+
5+
Done in Kotlin for easier solutions. ;)
6+
7+
For more information see https://adventofcode.com [2021](https://adventofcode.com/2021).
8+
9+
All projects are built using build management system
610
[Gradle](https://gradle.org/) and [GitHub Actions](https://docs.github.com/actions).
711

8-
[![SonarQube](https://sonarcloud.io/api/project_badges/measure?project=de.havox_design.aoc%3Aadvent_of_code&metric=alert_status "The current SonarQube analysis status")
9-
![SonarQube](https://sonarcloud.io/api/project_badges/measure?project=de.havox_design.aoc%3Aadvent_of_code&metric=coverage "The current coverage")
10-
![SonarQube](https://sonarcloud.io/api/project_badges/measure?project=de.havox_design.aoc%3Aadvent_of_code&metric=bugs "The current number of SonarQube bugs")
11-
![SonarQube](https://sonarcloud.io/api/project_badges/measure?project=de.havox_design.aoc%3Aadvent_of_code&metric=vulnerabilities "The current number of SonarQube vulnerabilities")
12-
![SonarQube](https://sonarcloud.io/api/project_badges/measure?project=de.havox_design.aoc%3Aadvent_of_code&metric=code_smells "The current number of SonarQube code smells")](https://sonarcloud.io/dashboard?id=de.havox_design.aoc:advent_of_code)
12+
[![SonarQube](https://sonarcloud.io/api/project_badges/measure?project=de.havox_design.aoc%3Aadvent_of_code2021&metric=alert_status "The current SonarQube analysis status")
13+
![SonarQube](https://sonarcloud.io/api/project_badges/measure?project=de.havox_design.aoc%3Aadvent_of_code2021&metric=coverage "The current coverage")
14+
![SonarQube](https://sonarcloud.io/api/project_badges/measure?project=de.havox_design.aoc%3Aadvent_of_code2021&metric=bugs "The current number of SonarQube bugs")
15+
![SonarQube](https://sonarcloud.io/api/project_badges/measure?project=de.havox_design.aoc%3Aadvent_of_code2021&metric=vulnerabilities "The current number of SonarQube vulnerabilities")
16+
![SonarQube](https://sonarcloud.io/api/project_badges/measure?project=de.havox_design.aoc%3Aadvent_of_code2021&metric=code_smells "The current number of SonarQube code smells")](https://sonarcloud.io/dashboard?id=de.havox_design.aoc:advent_of_code2021)
1317

1418
To run all solutions, simply run `./gradlew run`. If you want to run the solution for day 5, simply run
1519
`./gradlew aoc2023:run day05`.
1620

17-
## Contributions:
18-
| Year | Language(s) | Total Stars | Link to repository |
19-
|---------|--------------------------------------------------------------|--------------:|------------------------------------------------------------------------------------|
20-
| 2025 | Java ![Java](img/java.png) | 0 / 50 ⭐ | [aoc2025](https://github.com/Gentleman1983/advent-of-code/tree/main/aoc2025) |
21-
| 2024 | Kotlin ![Kotlin](img/kotlin.png) | 50 / 50 ⭐ | [aoc2024](https://github.com/Gentleman1983/advent-of-code/tree/main/aoc2024) |
22-
| 2023 | Java ![Java](img/java.png), Kotlin ![Kotlin](img/kotlin.png) | 50 / 50 ⭐ | [aoc2023](https://github.com/Gentleman1983/advent-of-code/tree/main/aoc2023) |
23-
| 2022 | Java ![Java](img/java.png), Kotlin ![Kotlin](img/kotlin.png) | 50 / 50 ⭐ | [aoc2022](https://github.com/Gentleman1983/advent-of-code/tree/main/aoc2022) |
24-
| 2022 | Kotlin ![Kotlin](img/kotlin.png) | 2 / 2 ⭐ | [meilisearch](https://github.com/Gentleman1983/advent-of-code/tree/main/meilisearch) |
25-
| 2021 | Kotlin ![Kotlin](img/kotlin.png) | 50 / 50 ⭐ | [aoc2021](https://github.com/Gentleman1983/aoc2021) |
26-
| 2020 | Kotlin ![Kotlin](img/kotlin.png) | 50 / 50 ⭐ | [aoc2020](https://github.com/Gentleman1983/advent-of-code/tree/main/aoc2020) |
27-
| 2019 | Java ![Java](img/java.png), Kotlin ![Kotlin](img/kotlin.png) | 50 / 50 ⭐ | [aoc2019](https://github.com/Gentleman1983/advent-of-code/tree/main/aoc2019) |
28-
| 2018 | Java ![Java](img/java.png), Kotlin ![Kotlin](img/kotlin.png) | 50 / 50 ⭐ | [aoc2018](https://github.com/Gentleman1983/advent-of-code/tree/main/aoc2018) |
29-
| 2017 | Java ![Java](img/java.png), Kotlin ![Kotlin](img/kotlin.png) | 50 / 50 ⭐ | [aoc2017](https://github.com/Gentleman1983/advent-of-code/tree/main/aoc2017) |
30-
| 2016 | Java ![Java](img/java.png), Kotlin ![Kotlin](img/kotlin.png) | 50 / 50 ⭐ | [aoc2016](https://github.com/Gentleman1983/advent-of-code/tree/main/aoc2016) |
31-
| 2015 | Java ![Java](img/java.png), Kotlin ![Kotlin](img/kotlin.png) | 50 / 50 ⭐ | [aoc2015](https://github.com/Gentleman1983/advent-of-code/tree/main/aoc2015) |
32-
| **SUM** | | **500 + 2 ⭐** | |
21+
## Current status:
22+
23+
| Day | Part 1 | Part 2 |
24+
|---------|--------------------------------|--------------------------------|
25+
| 1 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
26+
| 2 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
27+
| 3 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
28+
| 4 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
29+
| 5 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
30+
| 6 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
31+
| 7 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
32+
| 8 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
33+
| 9 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
34+
| 10 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
35+
| 11 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
36+
| 12 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
37+
| 13 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
38+
| 14 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
39+
| 15 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
40+
| 16 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
41+
| 17 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
42+
| 18 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
43+
| 19 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
44+
| 20 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
45+
| 21 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
46+
| 22 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
47+
| 23 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
48+
| 24 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
49+
| 25 |![Kotlin](img/kotlin.png) |![Kotlin](img/kotlin.png) |
50+
| **SUM** | **25 ⭐** | **25 ⭐** |
51+
52+
Total: 50 ⭐
3353

54+
## Solution image
55+
![AoC2021](img/Advent_of_Code_2021.png)

aoc2021/README.md

Lines changed: 0 additions & 43 deletions
This file was deleted.

aoc2021/aoc2021-kotlin/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
plugins {
2-
alias(libs.plugins.kotlin.jvm)
2+
alias(aoc2021Libs.plugins.kotlin.jvm)
33
}
44

55
dependencies {
6-
api(project(":utils"))
6+
api(project(":aoc-utils"))
77

88
implementation("org.jetbrains.kotlin:kotlin-reflect")
99
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")

aoc2021/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
application
3-
alias(libs.plugins.kotlin.jvm)
3+
alias(aoc2021Libs.plugins.kotlin.jvm)
44
}
55

66
val year = 2021

build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import org.sonarqube.gradle.SonarTask
55
plugins {
66
id("jacoco-report-aggregation")
77
id("java-library")
8-
alias(libs.plugins.kotlin.jvm) apply false
9-
alias(libs.plugins.sonarqube.plugin)
8+
alias(aoc2021Libs.plugins.kotlin.jvm) apply false
9+
alias(aoc2021Libs.plugins.sonarqube.plugin)
1010
}
1111

1212
dependencies {
@@ -57,8 +57,8 @@ rootProject.allprojects.forEach { currentProject ->
5757
}
5858

5959
currentProject.dependencies {
60-
testImplementation(libs.hamcrest)
61-
testImplementation(libs.junit.jupiter)
60+
testImplementation(aoc2021Libs.hamcrest)
61+
testImplementation(aoc2021Libs.junit.jupiter)
6262
}
6363

6464
currentProject.jacoco {

gradle/libs.versions.toml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,12 @@
11
[versions]
2-
commons-codec = "1.18.0"
3-
commons-collections4 = "4.5.0"
4-
commons-lang3 = "3.17.0"
5-
equalsverifier = "4.0"
62
hamcrest = "3.0"
7-
jgrapht = "1.5.2"
83
junit5 = "5.12.2"
94
kotlin-jvm = "2.1.21"
10-
kotlinx-coroutines = "1.10.2"
115
sonarqube-plugin = "6.2.0.5505"
12-
struts2 = "7.0.3"
136

147
[libraries]
15-
commons-codec = { group = "commons-codec", name = "commons-codec", version.ref = "commons-codec" }
16-
commons-collections4 = { group = "org.apache.commons", name = "commons-collections4", version.ref = "commons-collections4" }
17-
commons-lang3 = { group = "org.apache.commons", name = "commons-lang3", version.ref = "commons-lang3" }
18-
equalsverifier = { group = "nl.jqno.equalsverifier", name = "equalsverifier", version.ref = "equalsverifier" }
198
hamcrest = { group = "org.hamcrest", name = "hamcrest", version.ref = "hamcrest" }
20-
jgrapht-core = { group = "org.jgrapht", name = "jgrapht-core", version.ref = "jgrapht" }
219
junit-jupiter = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit5" }
22-
kotlinx-coroutines = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
23-
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" }
24-
struts2-core = { group = "org.apache.struts", name = "struts2-core", version.ref = "struts2" }
2510

2611
[plugins]
2712
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-jvm" }

settings.gradle.kts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,21 @@ plugins {
22
id("com.gradle.develocity") version("4.0.2")
33
}
44

5-
rootProject.name = "advent-of-code-2021"
5+
dependencyResolutionManagement {
6+
versionCatalogs {
7+
create("aoc2021Libs") {
8+
from(files("gradle/libs.versions.toml"))
9+
}
10+
}
11+
}
612

713
include("aoc2021")
814
include("aoc2021:aoc2021-kotlin")
915

10-
include("utils")
11-
include("utils:utils-java")
12-
include("utils:utils-kotlin")
16+
include("advent-of-code-utils")
17+
apply( "advent-of-code-utils/settings.gradle.kts")
18+
project(":aoc-utils").projectDir = file( path = "$rootDir/advent-of-code-utils/aoc-utils")
19+
project(":aoc-utils:aoc-utils-kotlin").projectDir = file( path = "$rootDir/advent-of-code-utils/aoc-utils/aoc-utils-kotlin")
20+
project(":aoc-utils:aoc-utils-java").projectDir = file( path = "$rootDir/advent-of-code-utils/aoc-utils/aoc-utils-java")
21+
22+
rootProject.name = "advent-of-code-2021"

utils/build.gradle.kts

Lines changed: 0 additions & 17 deletions
This file was deleted.

utils/utils-java/build.gradle.kts

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)