Advent of Code template project for Kotlin

Overview

Advent of Code Kotlin Template

Advent of Code – an annual event in December since 2015. Every year since then, with the first day of December, a programming puzzles contest is published every day for twenty-four days. A set of Christmas-oriented challenges provide any input you have to use to answer using the language of your choice. We offer you a template prepared to use with Kotlin language within this repository.

Workflow

Advent of Code Kotlin Template is a particular type of GitHub repository that lets you speed up the setup phase and start writing your AoC solutions immediately.

The general idea is straightforward – to create a new project based on this template, you need to log in to your GitHub account and use the Use this template green button. And remember – do not fork it!

After creating a new project based on this template in your account, a dedicated GitHub Actions workflow will start and clean up the code from redundant files. It will also personalize code to use your username and project name in namespaces and Gradle properties. How cool is that?

Right after the @actions-user actor pushes the second commit to your repository, you're ready to clone it within the IntelliJ IDEA.

file:kotlin

Comments
  • Please delete PR 8

    Please delete PR 8

    Hi Team,

    Thank you for creating this template!

    Unfortunately, I forked the template rather than created a new project from it and submitted a solution PR to the repo. Old habits die hard. Can you please delete the PR? https://github.com/kotlin-hands-on/advent-of-code-kotlin-template/pull/8

    Thanks!

    opened by alysyk 2
  • add println extension

    add println extension

    I think this is an even better way to print stuff.

    For example

    println(part1(input))
    println(part2(input))
    

    will become

    part1(input).println()
    part2(input).println()
    

    If you guys like it then I will add other print function variants...

    opened by shalva97 1
  • Template does not work in Android Studio

    Template does not work in Android Studio

    Thanks for making the template! However it does not appear to run when using Android Studio Arctic Fox, although IntelliJ CE does work.

    Can you help me get it working in that IDE?

    opened by johnwilde 1
  • Add toInts() in Utils for Day 1

    Add toInts() in Utils for Day 1

    2021 Day 1 question compares numbers. Without converting it to ints, you get a wrong answer. Added a toInts() function for List<String> which will be useful in other questions too.

    opened by johnkchiu 1
  • Template should hide input files by default

    Template should hide input files by default

    Thanks for providing this template!

    Noticed this tweet from the AoC maintainer while I was setting up: https://twitter.com/ericwastl/status/1465805354214830081

    "In general I ask people not to publish their inputs, just to make it harder for someone to try to steal the whole site."

    This template encourages putting in actual inputs into the DayNN.txt files and committing them to the repository. Perhaps the input files should be added to .gitignore and/or moved to a separate folder to discourage this from happening (at least for future uses of this template).

    opened by jpd236 1
  • Link to template is wrong after github action

    Link to template is wrong after github action

    The link in the readme after the github action template-cleanup has run is https://github.com/kotlinhandson/advent-of-code-kotlin-template but should be https://github.com/kotlin-hands-on/advent-of-code-kotlin-template.

    opened by askeron 0
  • Add gradle task to generate next day

    Add gradle task to generate next day

    I'm a little bit lazy and I don't want to copy paste + edit the code of the previous day myself so I wrote this simple gradle task 😅 Thought we might want to integrate it to the template repo !

    opened by armandmgt 0
  • Rename Day01.kt to Day25.kt for keeping an template for the whole AoC

    Rename Day01.kt to Day25.kt for keeping an template for the whole AoC

    I always forget to copy the solutions file to the next day before writing my solution. If the template would be Day25.kt, I'd be remebered every day, since filling in Day25.kt can only be done on the last day.

    opened by MartinsCode 0
  • .txt extension should not be implicitly assumed for the input files

    .txt extension should not be implicitly assumed for the input files

    The template internally adds .txt extension to the input file names. This leads to confusion for me as a linux user because I used to use input files without any extension.

    Here is my workflow:

    1. I add input files for new problems with no extension to my AoC project
    2. Then I'm adding up some code
    3. Running it to check whether it works or not
    4. Getting an error message that my input file doesn't actually exist
    5. I use refactor->rename to add the .txt extension and it fails again, because now the template is expecting my input file name to be filename.txt.txt :)
    6. Finally I go to my refactored code and remove the '.txt' extension and it finally starts to work :)

    I propose to avoid adding the .txt extension to all input files and leave it to the user. This won't make code any worse but will help to avoid confusion for a plenty of users.

    opened by risboo6909 0
Owner
Kotlin Hands-On Labs
Kotlin Hands-On Labs Repositories
Kotlin Hands-On Labs
A template for Advent of Code challenge with input downloading and prepared test classes

Advent of Code Kotlin Template A template which will help you concentrate on the puzzle solutions. It brings Downloading and caching of the puzzle inp

Henning B 2 Dec 1, 2021
Advent of Code project 2021!

aoc-2021 Welcome to the Advent of Code1 Kotlin project created by goddabuzz using the Advent of Code Kotlin Template delivered by JetBrains. In this r

Daniel Kloosterman 2 Dec 14, 2022
Solution to the 2021 Advent of code challenge in Kotlin. aoc-2021-in-kotlin

advent-of-code-2021 Welcome to the Advent of Code1 Kotlin project created by aniobistanley using the Advent of Code Kotlin Template delivered by JetBr

null 0 Dec 24, 2021
My Advent of Code solutions written in Kotlin

AOC21 My Advent of Code solutions written in Kotlin Why Kotlin? I think Kotlin is a really suitable language for Advent of Code, because it handles li

Chris 2 Dec 14, 2021
My solutions for Advent of Code 2021 puzzles, mainly using Kotlin.

Advent of Code 2021 Featuring Kotlin What's that ? https://adventofcode.com/2021/about Advent of Code is an Advent calendar of small programming puzzl

Petrole 0 Dec 2, 2021
My solutions for Advent of Code 2021, written in Kotlin!

Advent-of-Code-2021 Welcome to the Advent of Code1 Kotlin project created by thijsboehme using the Advent of Code Kotlin Template delivered by JetBrai

Thijs Boehme 0 Dec 15, 2021
Kotlin fun with Advent of Code 2021

aoc-kotlin Welcome to the Advent of Code1 Kotlin project created by dayanruben using the Advent of Code Kotlin Template delivered by JetBrains. In thi

Dayan Ruben Gonzalez 32 Dec 15, 2022
Advent of Code 2021 implementations in Kotlin

advent-of-code-in-kotlin-2021 Welcome to the Advent of Code1 Kotlin project created by acrane13 using the Advent of Code Kotlin Template delivered by

null 0 Dec 20, 2021
Advent of Code 2021: Solutions in Kotlin

Advent of Code 2021 Solutions in Kotlin This repo is my personal attempt at solving the Advent of Code 2021 set of problems with the Kotlin programmin

Todd Ginsberg 33 Nov 28, 2022
Advent of Code 2021, using Kotlin

Advent of Code 2021, using Kotlin See https://adventofcode.com/2021, https://kotlinlang.org/. See also "the official GitHub template" by JetBrains. Ge

Stefan Scheidt 3 Nov 18, 2022
Advent of Code 2020 - Kotlin

* , _/^\_ < > * /.-.\ * * `/&\` *

Mateo Bošnjak 2 Dec 1, 2022
Repository for solving Advent of Code in Kotlin.

Advent of Code 2021 Repository for solving Advent of Code in Kotlin. Getting started Running Project is already setup with gradle. To run the app: Nav

Felix Ebert 2 Dec 5, 2021
Advent of Code 2021 in Kotlin Multiplatform!

Advent of Code 2021 in Kotlin Multiplatform Structure Each day comes with two parts for you to solve. You'll find a ready-to go and test templates to

Martynas Petuška 2 Dec 6, 2021
🎅 Marry XMas 🎄 Kotlin solutions for my Advent of Code 2021 🤶

Advent of Code 2021 ?? val aMessageFromMe = """ _____________,--, | | | | | | |/ .-.\ HANG IN THERE |_|_|_|_|_|_/ / `. SAN

Nicola Corti 4 Dec 15, 2022
My 2021 Advent of Code Repo - Kotlin this year!

?? Advent of Code 2021 This year I'll be solving the advent problems using Kotlin! ?? If you're interested in trying out Kotlin for AoC this year or e

Mark Alvaro 5 Nov 30, 2022
Advent of Code 2021, in Kotlin

advent-of-code-kotlin-2021 Welcome to the Advent of Code1 Kotlin project created by mbifulco using the Advent of Code Kotlin Template delivered by Jet

Mike Bifulco 1 Dec 4, 2021
Advent of code 2021 (unofficial) in Kotlin for Educational Plugin on Jetbrains IntelliJ IDE.

Kotlin Advent of Code 2021 (unofficial) DISCLAIMER: I am not affiliated with the official Advent of code event or website. To open this course, you ne

null 1 Dec 10, 2021
Advent of code 2021, Kotlin

aoc-2021-kotlin Welcome to the Advent of Code1 Kotlin project created by almar using the Advent of Code Kotlin Template delivered by JetBrains. In thi

Almar Schouten 1 Dec 22, 2021
Advent of Code 2021 - Kotlin solution

aoc21-kt Welcome to the Advent of Code1 Kotlin project created by bubblefoil using the Advent of Code Kotlin Template delivered by JetBrains. In this

Aleš 1 Dec 17, 2021