Skip to content

Rewrite as Kotlin project built with Gradle#2

Draft
Copilot wants to merge 4 commits intomasterfrom
copilot/rewrite-kotlin-project-gradle
Draft

Rewrite as Kotlin project built with Gradle#2
Copilot wants to merge 4 commits intomasterfrom
copilot/rewrite-kotlin-project-gradle

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 26, 2026

Replaces the Scala/SBT implementation with idiomatic Kotlin built via Gradle (Kotlin DSL).

Build

  • build.gradle.kts + settings.gradle.kts using kotlin("jvm") plugin 2.0.21, Java 17 toolchain, JUnit 5
  • Gradle wrapper included (gradlew) — build with ./gradlew build

CI

  • .github/workflows/ci.yml — GitHub Actions workflow that runs ./gradlew test on every push and pull request using Java 17 (Temurin)
  • Gradle dependency cache enabled via cache: gradle on the actions/setup-java step

Source (src/main/kotlin/uk/co/halfninja/randomnames/)

Scala Kotlin
trait NameGenerator interface NameGenerator
sealed trait Gender / case objects sealed class Gender / singleton objects
case class Name data class Name
object Randomness / CompositeNameGenerator / EnglishlikeNameGenerator / NameGenerators Direct Kotlin equivalents; companion objects replace Scala companion objects

Tests (src/test/kotlin/)

ScalaTest FunSuite → JUnit 5 @Test. All seeded-output assertions retained unchanged — both implementations use java.util.Random, so deterministic outputs are identical.

Removed

build.sbt, pom.xml, project/, all src/*/scala/ sources.

Original prompt

Rewrite as a Kotlin project built with Gradle


⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.

Copilot AI changed the title [WIP] Rewrite project as a Kotlin application using Gradle Rewrite as Kotlin project built with Gradle Mar 26, 2026
Copilot AI requested a review from halfninja March 26, 2026 21:59
@halfninja
Copy link
Copy Markdown
Owner

Define GitHub action to run test task

@halfninja
Copy link
Copy Markdown
Owner

Define GitHub action to run test task

@copilot pls

Copy link
Copy Markdown
Author

Copilot AI commented Mar 26, 2026

Define GitHub action to run test task

@copilot pls

Added in commit 2a98bdb.github/workflows/ci.yml runs ./gradlew test on every push and pull request using Java 17 (Temurin).

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot enable action level caching for Gradle

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in commit 3fea20a — added cache: gradle to the actions/setup-java step, which uses the built-in Gradle cache support to cache ~/.gradle/caches and ~/.gradle/wrapper.

Copilot AI requested a review from halfninja March 26, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants