{"id":17280809,"url":"https://github.com/lefou/mill-kotlin","last_synced_at":"2025-07-19T10:06:07.066Z","repository":{"id":42130016,"uuid":"241415801","full_name":"lefou/mill-kotlin","owner":"lefou","description":"Kotlin compiler support for Mill Build Tool","archived":false,"fork":false,"pushed_at":"2025-01-22T10:43:57.000Z","size":195,"stargazers_count":26,"open_issues_count":8,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-27T23:02:24.538Z","etag":null,"topics":["build-tool","kotlin","mill","mill-plugin","scala"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lefou.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"lefou"}},"created_at":"2020-02-18T16:51:41.000Z","updated_at":"2025-01-26T13:22:25.000Z","dependencies_parsed_at":"2024-03-02T11:28:27.469Z","dependency_job_id":"9135a080-b38b-49d5-b8cb-fd455b14de7c","html_url":"https://github.com/lefou/mill-kotlin","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefou%2Fmill-kotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefou%2Fmill-kotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefou%2Fmill-kotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefou%2Fmill-kotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lefou","download_url":"https://codeload.github.com/lefou/mill-kotlin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248855961,"owners_count":21172673,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-tool","kotlin","mill","mill-plugin","scala"],"created_at":"2024-10-15T09:21:59.371Z","updated_at":"2025-04-14T09:42:24.109Z","avatar_url":"https://github.com/lefou.png","language":"Scala","funding_links":["https://github.com/sponsors/lefou"],"categories":[],"sub_categories":[],"readme":"= mill-kotlin - Kotlin compiler support for mill\n:version: 0.3.0\n:mill-platform: 0.11\n:kotlinVersion: 1.9.21\n:projectHome: https://github.com/lefou/mill-kotlin\n:min-mill-version: 0.7.0\n\nifdef::env-github[]\nimage:https://github.com/lefou/mill-kotlin/workflows/.github/workflows/build.yml/badge.svg[\"Build Status (GitHub Actions)\", link=\"https://github.com/lefou/mill-kotlin/actions\"]\nimage:https://codecov.io/gh/lefou/mill-kotlin/branch/main/graph/badge.svg[Test Coverage (Codecov.io), link=\"https://codecov.io/gh/lefou/mill-kotlin\"]\nendif::[]\n\nDocumentation for mill-kotlin, a mill plugin to support the https://kotlinlang.org/[Kotlin language and compiler].\n\n== Quickstart\n\nMill version {min-mill-version} or newer is required.\n\n[source,scala,subs=\"attributes,verbatim\"]\n----\n// Load the plugin from Maven Central via ivy/coursier\nimport $ivy.`de.tototec::de.tobiasroeser.mill.kotlin_mill{mill-platform}:{version}`\n\nimport mill._\nimport mill.scalalib._\nimport mill.define._\n\nimport de.tobiasroeser.mill.kotlin._\n\nobject main extends KotlinModule {\n\n  // Select the Kotlin version\n  def kotlinVersion = T{ \"{kotlinVersion}\" }\n\n  // Set additional Kotlin compiler options, e.g. the language level and annotation processor\n  // Run `mill main.kotlincHelp` to get a list of supported options\n  def kotlincOptions = super.kotlincOptions() ++ Seq(\"-verbose\")\n\n}\n----\n\n== Configuration\n\nTo target the JVM (kotlin-jvm), our module needs to extend `de.tobiasroeser.mill.kotlin.KotlinModule` which itself extends `mill.scalalib.JavaModule`.\n\nFor convenience, you may derive your unit test projects from `de.tobiasroeser.mill.kotlin.KotlinModule.Tests` (or `KotlinModuleTests`) trait.\n\nThe module trait `de.tobiasroeser.mill.kotlin.KotlinModule` has the following configuration options (over those from `mill.scalalib.JavaModule`).\n\n`def kotlinVersion: T[String]`::\n  The Kotlin version to be used (for API and Language level settings).\n\n`def kotlinCompilerVersion: T[String]`:: The version of the Kotlin compiler to be used.\n  Default is derived from `kotlinVersion`.\n\n`def compile: T[CompilationResult]`::\n  Compiles all the sources to JVM class files.\n\n`def kotlincOptions: T[Seq[String]]`::\n  Additional Kotlin compiler options to be use by `compile`.\n\n`def ivyDeps: T[Agg[Dep]]`::\n  The compile and runtime dependencies.\n\n`def kotlincHelp(args: String*): Command[Unit]`::\n  Runs the Kotlin compiler with the `-help` argument to show you the built-in cmdline help.\n  You might want to add additional arguments like `-X` to see extra help.\n\n`def kotlinCompilerIvyDeps: T[Agg[Dep]]`::\n  The Ivy/Coursier dependencies resembling the Kotlin compiler.\n  Default is derived from `kotlinCompilerVersion`.\n\n`def kotlinCompilerClasspath: T[Seq[PathRef]]`::\n  The Java classpath resembling the Kotlin compiler.\n  Default is derived from `kotlinCompilerIvyDeps`.\n\n`trait Tests extends TestModule with KotlinTestModule`::\n  A test sub-module linked to its parent module best suited for unit-tests.\n\nMixed Kotlin/Java projects are also supported. Java compilation is based on mills `mill.scalalib.JavaModule` and Java options are configured via `javacOptions`.\n\n== Version Compatibility Matrix\n\nMill is still in active development, and has no stable API yet.\nHence, not all mill-kotlin versions work with every mill version.\n\nThe following table shows a matrix of compatible mill and mill-kotlin versions.\n\n.Version Compatibility Matrix\n[options=\"header\"]\n|===\n| mill-kotlin | mill\n| 0.3.0 | 0.7.0 - 0.11.x\n| 0.2.4 | 0.7.0 - 0.11.x\n| 0.2.3 | 0.7.0 - 0.11.x\n| 0.2.2 | 0.6.0 - 0.10.x\n| 0.2.1 | 0.6.0 - 0.9.x\n| 0.2.0 | 0.6.0 - 0.9.x\n| 0.1.1 | 0.6.0 - 0.9.6\n| 0.1.0 | 0.6.0 - 0.8.0\n| 0.0.3 | 0.6.0 - 0.6.1\n| 0.0.2 | 0.5.7\n| 0.0.1 | 0.5.7\n|===\n\nTo ensure some basic compatibility, there are some integration tests in place.\nNewer mill versions may work as well.\n\nIf you need support for other versions, please create an {projectHome}/issues[issue].\n\n== Download\n\nYou can download binary releases from https://search.maven.org/artifact/de.tototec/de.tobiasroeser.mill.kotlin_mill{mill-platform}_2.13[Maven Central].\n\nPlease make sure to use the correct _mill platform suffix_ matching your used mill version.\n\n.Mill Platform suffix\n[options=\"header\"]\n|===\n| mill version  | mill platform | suffix | example\n| 0.11.x        | 0.11 | `_mill0.11` | ```$ivy.`de.tototec::de.tobiasroeser.mill.kotlin::{version}````\n| 0.10.x        | 0.10 | `_mill0.10` | ```$ivy.`de.tototec::de.tobiasroeser\n.mill.kotlin::{version}````\n| 0.9.3 -       | 0.9  | `_mill0.9`  | ```$ivy.`de.tototec::de.tobiasroeser.mill.kotlin_mill0.9:{version}````\n| 0.7.0 - 0.8.0 | 0.7  | `_mill0.7`  | ```$ivy.`de.tototec::de.tobiasroeser.mill.kotlin_mill0.7:{version}````\n|===\n\n\n== License\n\nThis project is published under the terms of the https://www.apache.org/licenses/LICENSE-2.0[Apache License, version 2]\n\n== Supporters\n\nThanks to https://iba-cg.de/[iba Consulting Gesellschaft mbH \u0026 Co KG] for the initial development support.\n\n== About\n\nMill::\n  https://github.com/lihaoyi/mill[Mill] is a Scala-based open source build tool.\n  In my opinion the best build tool for the JVM.\n  It is fast, reliable and easy to understand.\n\nMe::\n+\n--\nI am https://github.com/lefou/[Tobias Roeser], a professional software developer who loves to create and use open source tools.\nI'm actively developing and maintaining mill as well as https://github.com/lefou?utf8=%E2%9C%93\u0026tab=repositories\u0026q=topic%3Amill\u0026type=\u0026language=[several mill plugins].\n\nIf you like my work, please star it on GitHub. You can also support me via https://github.com/sponsors/lefou[GitHub Sponsors].\n--\n\nContributing::\n  If you found a bug or have a feature request, please open a {projectHome}/issues[new issue on GitHub].\n  I also accept {projectHome}/pulls[pull requests on GitHub].\n\n== Changelog\n\n=== 0.3.0 - 2023-11-29\n:version: 0.3.0\n:prev-version: 0.2.4\n:github-milestone: 8\n\n* Introduced a shared worker cache to speed up compilation and reduce memory usage\n\n_See\nifeval::[\"{github-milestone}\" != \"\"]\nhttps://github.com/lefou/mill-kotlin/milestone/{github-milestone}?closed=1[milstone {version}]\nand the\nendif::[]\nhttps://github.com/lefou/mill-kotlin/compare/{prev-version}\\...{version}[list of commits]_\n\n\n=== 0.2.4 - 2023-10-23\n:version: 0.2.4\n:prev-version: 0.2.3\n:github-milestone: 7\n\n* Internal improvements and dependency updates\n\n_See\nifeval::[\"{github-milestone}\" != \"\"]\nhttps://github.com/lefou/mill-kotlin/milestone/{github-milestone}?closed=1[milstone {version}]\nand the\nendif::[]\nhttps://github.com/lefou/mill-kotlin/compare/{prev-version}\\...{version}[list of commits]_\n\n\n=== 0.2.3 - 2023-06-12\n:version: 0.2.3\n:prev-version: 0.2.2\n:github-milestone: 6\n\n* Added support for Mill 0.11.x\n* Various internal improvements and version updates\n\n_See\nifeval::[\"{github-milestone}\" != \"\"]\nhttps://github.com/lefou/mill-kotlin/milestone/{github-milestone}?closed=1[milstone {version}]\nand the\nendif::[]\nhttps://github.com/lefou/mill-kotlin/compare/{prev-version}\\...{version}[list of commits]_\n\n\n=== 0.2.2 - 2022-01-16\n:version: main\n:prev-version: 0.2.1\n:github-milestone: 5\n\n* Support for newer Mill versions including 0.10.0\n\n_See\nifeval::[\"{github-milestone}\" != \"\"]\nhttps://github.com/lefou/mill-kotlin/milestone/{github-milestone}?closed=1[milstone {version}]\nand the\nendif::[]\nhttps://github.com/lefou/mill-kotlin/compare/{prev-version}\\...{version}[list of commits]_\n\n\n=== 0.2.1 - 2022-01-16\n:version: 0.2.1\n:prev-version: 0.2.0\n:github-milestone: 4\n\n* Improved integration test suite\n* Various dependency version updates\n\n_See\nifeval::[\"{github-milestone}\" != \"\"]\nhttps://github.com/lefou/mill-kotlin/milestone/{github-milestone}?closed=1[milstone {version}]\nand the\nendif::[]\nhttps://github.com/lefou/mill-kotlin/compare/{prev-version}\\...{version}[list of commits]_\n\n\n=== 0.2.0 - 2021-01-17\n:version: 0.2.0\n:prev-version: 0.1.1\n:github-milestone:\n\n* Overall fixes and improvements\n* Enhanced integration test setup to detect Kotlin version differences\n* Proper support for Kotlin 1.3 and 1.4\n* Limited support for older Kotlin 1.0, 1.1 and 1.2\n+\n_These versions may work for you, but I haven't found a stable integration test setup that works reliable for all these Kotlin releases on different platforms and different Java versions.\n If you know what you're doing, all integration points are configurable, so these versions should work after same tweaking.\n Feedback and pull requests are highly appreciated._\n\n_See\nifeval::[\"{github-milestone}\" != \"\"]\nhttps://github.com/lefou/mill-kotlin/milestone/{github-milestone}?closed=1[milstone {version}]\nand the\nendif::[]\nhttps://github.com/lefou/mill-kotlin/compare/{prev-version}\\...{version}[list of commits]_\n\n=== 0.1.1 - 2020-12-01\n:version: 0.1.1\n:prev-version: 0.1.0\n:github-milestone: 3\n\n* Support for mill API 0.9.3\n* Introduced artifact suffix indicating the mill platform (e.g. `mill0.9`)\n\n_See\nifeval::[\"{github-milestone}\" != \"\"]\nhttps://github.com/lefou/mill-kotlin/milestone/{github-milestone}?closed=1[milstone {version}]\nand the\nendif::[]\nhttps://github.com/lefou/mill-kotlin/compare/{prev-version}\\...{version}[list of commits]_\n\n=== 0.1.0 - 2020-06-30\n:version: 0.1.0\n:prev-version: 0.0.3\n:github-milestone: 2\n\n* Cross publish for Mill APi 0.6 and 0.7, also Scala 2.12 and Scala 2.13.\n\n_See\nifeval::[\"{github-milestone}\" != \"\"]\nhttps://github.com/lefou/mill-kotlin/milestone/{github-milestone}?closed=1[milstone {version}]\nand the\nendif::[]\nhttps://github.com/lefou/mill-kotlin/compare/{prev-version}\\...{version}[list of commits]_\n\n\n=== 0.0.3 - 2020-02-25\n:version: 0.0.3\n:prev-version: 0.0.2\n:github-milestone:\n\n* Updated Mill API to 0.6.0\n\n_See\nifeval::[\"{github-milestone}\" != \"\"]\nhttps://github.com/lefou/mill-kotlin/milestone/{github-milestone}?closed=1[milstone {version}]\nand the\nendif::[]\nhttps://github.com/lefou/mill-kotlin/compare/{prev-version}\\...{version}[list of commits]_\n\n\n=== 0.0.2 - 2020-02-25\n:version: 0.0.2\n:prev-version: 0.0.1\n:github-milestone: 1\n\n* Fixed non-functional `kotlincHelp` target\n\n_See\nifeval::[\"{github-milestone}\" != \"\"]\nhttps://github.com/lefou/mill-kotlin/milestone/{github-milestone}?closed=1[milstone {version}]\nand the\nendif::[]\nhttps://github.com/lefou/mill-kotlin/compare/{prev-version}\\...{version}[list of commits]_\n\n=== 0.0.1 - 2020-02-20\n:version: 0.0.1\n:prev-version: 6756a7323d020eabedf9a9cd70f54c61fe30472a\n:github-milestone:\n\n* Initial release\n\n_See\nifeval::[\"{github-milestone}\" != \"\"]\nhttps://github.com/lefou/mill-kotlin/milestone/{github-milestone}?closed=1[milstone {version}]\nand the\nendif::[]\nhttps://github.com/lefou/mill-kotlin/compare/{prev-version}\\...{version}[list of commits]_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flefou%2Fmill-kotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flefou%2Fmill-kotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flefou%2Fmill-kotlin/lists"}