Skip to content

Commit e35630f

Browse files
committed
add readme
1 parent 659c34a commit e35630f

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

README.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,86 @@
1+
[![Platforms](https://img.shields.io/badge/web-WebAssembly-blue)](https://github.com/avan1235/advent-of-code-kotlin/releases/latest)
2+
[![Platforms](https://img.shields.io/badge/desktop-Windows%20%7C%20macOS%20%7C%20Linux-blue)](https://github.com/avan1235/advent-of-code-kotlin/releases/latest)
3+
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-orange.svg)](./LICENSE.md)
5+
[![Maven Central Version](https://img.shields.io/maven-central/v/in.procyk.adventofcode/solutions?label=Maven%20Central&color=orange)](https://central.sonatype.com/namespace/in.procyk.adventofcode)
6+
7+
[![GitHub Repo stars](https://img.shields.io/github/stars/avan1235/advent-of-code-kotlin?style=social)](https://github.com/avan1235/advent-of-code-kotlin/stargazers)
8+
[![Fork Advent of Code in Kotlin](https://img.shields.io/github/forks/avan1235/advent-of-code-kotlin?logo=github&style=social)](https://github.com/avan1235/advent-of-code-kotlin/fork)
9+
110
# 🎄🎁🎅 Advent of Code in Kotlin 🎅🎁🎄
211

12+
Kotlin Multiplatform utility library for bringing solutions for Advent of Code
13+
and sharing them as an interactive solver.
14+
15+
## Project Contents
16+
17+
### Kotlin Libraries
18+
19+
#### [solutions](./solutions/src/commonMain/kotlin/in/procyk/adventofcode/solutions)
20+
21+
`implementation("in.procyk.adventofcode:solutions:1.0.2")`
22+
23+
- [AdventDay](./solutions/src/commonMain/kotlin/in/procyk/adventofcode/solutions/AdventDay.kt) is a single day solution
24+
- [Advent](./solutions/src/commonMain/kotlin/in/procyk/adventofcode/solutions/Advent.kt) is a collection of solutions
25+
from a single year
26+
- utility functions and classes that are helpful so far in solving the tasks
27+
28+
#### [runner](./runner/src/commonMain/kotlin/in/procyk/adventofcode/runner)
29+
30+
`implementation("in.procyk.adventofcode:runner:1.0.2")`
31+
32+
- [FileAdventInputReader](./runner/src/commonMain/kotlin/in/procyk/adventofcode/runner/FileAdventInputReader.kt) is an
33+
instance of `AdventDay.InputReader` that allows to read inputs from system file
34+
- [Advent.solve](./runner/src/commonMain/kotlin/in/procyk/adventofcode/runner/Advent.kt) is a utility function to solve
35+
single day from current year if executed during the Advent of Code time, while it runs all days on other days. It's
36+
intended to run current day when prototyping the solution for current day.
37+
38+
#### [test-runner](./test-runner/src/commonMain/kotlin/in/procyk/adventofcode/runner)
39+
40+
`implementation("in.procyk.adventofcode:test-runner:1.0.2")`
41+
42+
- [AdventTest](./test-runner/src/commonMain/kotlin/in/procyk/adventofcode/runner/AdventTest.kt) has easy assertions of
43+
solutions from [AdventDay](./solutions/src/commonMain/kotlin/in/procyk/adventofcode/solutions/AdventDay.kt)
44+
45+
#### [solver](./solver/src/commonMain/kotlin/in/procyk/adventofcode/solver)
46+
47+
`implementation("in.procyk.adventofcode:solver:1.0.2")`
48+
49+
- [AdventSolver](./solver/src/commonMain/kotlin/in/procyk/adventofcode/solver/AdventSolver.kt) implements UI for
50+
providing solutions and log outputs for Advent of Code based
51+
on [Compose Multiplatform](https://github.com/JetBrains/compose-multiplatform)
52+
- [adventWebSolver](./solver/src/wasmJsMain/kotlin/in/procyk/adventofcode/solver/AdventWebSolver.kt) is a web entrypoint
53+
for UI
54+
- [adventJvmSolver](./solver/src/jvmMain/kotlin/in/procyk/adventofcode/solver/AdventJvmSolver.kt) is a desktop
55+
entrypoint for UI
56+
57+
### Publishing Utilities
58+
59+
#### [convention-plugins](./convention-plugins/src/main/kotlin)
60+
61+
- [convention.publication.gradle.kts](./convention-plugins/src/main/kotlin/convention.publication.gradle.kts) enables
62+
easy configuration of publication for each project where applied
63+
64+
#### [GitHub Actions](./.github/workflows)
65+
66+
- [release.yml](./.github/workflows/release.yml) implements a GitHub Action that publishes Kotlin Multiplatform
67+
libraries to [Maven Central](https://central.sonatype.com/) when git tag in format `v*.*.*` with a version matching
68+
version configured in [build.gradle.kts](./build.gradle.kts) is pushed. Requires following secrets to be configured:
69+
- `OSSRH_USERNAME`: a `username` generated from [Maven Central Panel](https://s01.oss.sonatype.org/#profile;User%20Token)
70+
- `OSSRH_PASSWORD`: a `password` generated from [Maven Central Panel](https://s01.oss.sonatype.org/#profile;User%20Token)
71+
- `SIGNING_KEY_ID`: last 8 bytes of signing key ID that can be checked with `gpg --list-secret-keys --keyid-format SHORT`
72+
- `SIGNING_PASSWORD`: password for signing key
73+
- `SIGNING_KEY`: signing key in a format extracted with `gpg --armor --export-secret-key 'example@gmail.com' | grep -v '\-\-' | grep -v '=.' | tr -d '\n'`
74+
75+
## Version Catalog
76+
77+
```toml
78+
[versions]
79+
procyk-adventofcode = "1.0.2"
80+
81+
[libraries]
82+
procyk-adventofcode-runner = { module = "in.procyk.adventofcode:runner", version.ref = "procyk-adventofcode" }
83+
procyk-adventofcode-solutions = { module = "in.procyk.adventofcode:solutions", version.ref = "procyk-adventofcode" }
84+
procyk-adventofcode-solver = { module = "in.procyk.adventofcode:solver", version.ref = "procyk-adventofcode" }
85+
procyk-adventofcode-test-runner = { module = "in.procyk.adventofcode:test-runner", version.ref = "procyk-adventofcode" }
86+
```

0 commit comments

Comments
 (0)