{"id":13428889,"url":"https://github.com/tschuchortdev/kotlin-compile-testing","last_synced_at":"2026-01-12T09:17:10.111Z","repository":{"id":37852515,"uuid":"162429842","full_name":"tschuchortdev/kotlin-compile-testing","owner":"tschuchortdev","description":"A library for testing Kotlin and Java annotation processors, compiler plugins and code generation","archived":false,"fork":false,"pushed_at":"2024-07-15T10:22:01.000Z","size":1029,"stargazers_count":677,"open_issues_count":32,"forks_count":64,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-16T02:39:43.802Z","etag":null,"topics":["annotation-processing","annotation-processor","annotation-processors","compile","compiler","compiler-plugin","kotlin","testing","testing-kotlin","testing-tools"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tschuchortdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2018-12-19T11:46:41.000Z","updated_at":"2025-03-13T19:57:11.000Z","dependencies_parsed_at":"2024-01-14T02:39:10.849Z","dependency_job_id":"e9dc6bf0-686f-4755-98c6-6e6532d88dc9","html_url":"https://github.com/tschuchortdev/kotlin-compile-testing","commit_stats":null,"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/tschuchortdev/kotlin-compile-testing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tschuchortdev%2Fkotlin-compile-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tschuchortdev%2Fkotlin-compile-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tschuchortdev%2Fkotlin-compile-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tschuchortdev%2Fkotlin-compile-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tschuchortdev","download_url":"https://codeload.github.com/tschuchortdev/kotlin-compile-testing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tschuchortdev%2Fkotlin-compile-testing/sbom","scorecard":{"id":900598,"data":{"date":"2025-08-11","repo":{"name":"github.com/tschuchortdev/kotlin-compile-testing","commit":"a0e418b04f6113396c515ca36b8d41f86f9b7317"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.5,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":1,"reason":"Found 3/23 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/ci.yml:79","Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/gradle-wrapper-validation.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/tschuchortdev/kotlin-compile-testing/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/tschuchortdev/kotlin-compile-testing/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/tschuchortdev/kotlin-compile-testing/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/tschuchortdev/kotlin-compile-testing/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/tschuchortdev/kotlin-compile-testing/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/tschuchortdev/kotlin-compile-testing/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:81: update your workflow using https://app.stepsecurity.io/secureworkflow/tschuchortdev/kotlin-compile-testing/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/tschuchortdev/kotlin-compile-testing/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:119: update your workflow using https://app.stepsecurity.io/secureworkflow/tschuchortdev/kotlin-compile-testing/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/gradle-wrapper-validation.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/tschuchortdev/kotlin-compile-testing/gradle-wrapper-validation.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/gradle-wrapper-validation.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/tschuchortdev/kotlin-compile-testing/gradle-wrapper-validation.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/gradle-wrapper-validation.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/tschuchortdev/kotlin-compile-testing/gradle-wrapper-validation.yml/master?enable=pin","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Mozilla Public License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/ci.yml:64"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":8,"reason":"5 out of the last 5 releases have a total of 5 signed artifacts.","details":["Info: signed release artifact: kotlin-compile-testing-1.6.0-javadoc.jar.asc: https://github.com/tschuchortdev/kotlin-compile-testing/releases/tag/1.6.0","Info: signed release artifact: kotlin-compile-testing-1.5.0-javadoc.jar.asc: https://github.com/tschuchortdev/kotlin-compile-testing/releases/tag/1.5.0","Info: signed release artifact: kotlin-compile-testing-1.4.9-javadoc.jar.asc: https://github.com/tschuchortdev/kotlin-compile-testing/releases/tag/1.4.9","Info: signed release artifact: kotlin-compile-testing-1.4.9-alpha01-javadoc.jar.asc: https://github.com/tschuchortdev/kotlin-compile-testing/releases/tag/1.4.9-alpha01","Info: signed release artifact: kotlin-compile-testing-1.4.8-javadoc.jar.asc: https://github.com/tschuchortdev/kotlin-compile-testing/releases/tag/1.4.8","Warn: release artifact 1.6.0 does not have provenance: https://api.github.com/repos/tschuchortdev/kotlin-compile-testing/releases/157524736","Warn: release artifact 1.5.0 does not have provenance: https://api.github.com/repos/tschuchortdev/kotlin-compile-testing/releases/94571616","Warn: release artifact 1.4.9 does not have provenance: https://api.github.com/repos/tschuchortdev/kotlin-compile-testing/releases/69345731","Warn: release artifact 1.4.9-alpha01 does not have provenance: https://api.github.com/repos/tschuchortdev/kotlin-compile-testing/releases/65837011","Warn: release artifact 1.4.8 does not have provenance: https://api.github.com/repos/tschuchortdev/kotlin-compile-testing/releases/63621142"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T15:25:21.317Z","repository_id":37852515,"created_at":"2025-08-24T15:25:21.318Z","updated_at":"2025-08-24T15:25:21.318Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["annotation-processing","annotation-processor","annotation-processors","compile","compiler","compiler-plugin","kotlin","testing","testing-kotlin","testing-tools"],"created_at":"2024-07-31T01:01:07.920Z","updated_at":"2026-01-12T09:17:10.092Z","avatar_url":"https://github.com/tschuchortdev.png","language":"Kotlin","funding_links":[],"categories":["Libraries"],"sub_categories":[],"readme":"\u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/0/06/Kotlin_Icon.svg/512px-Kotlin_Icon.svg.png\" align=\"right\" title=\"Kotlin Logo\" width=\"120\"\u003e\n\n# Kotlin Compile Testing\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.tschuchortdev/kotlin-compile-testing/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.tschuchortdev/kotlin-compile-testing)\n![GitHub](https://img.shields.io/github/license/tschuchortdev/kotlin-compile-testing.svg?color=green\u0026style=popout)\n[![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-green.svg)](https://shields.io/)\n[![Build Status](https://github.com/tschuchortdev/kotlin-compile-testing/workflows/Continuous%20Integration/badge.svg)](https://github.com/tschuchortdev/kotlin-compile-testing/actions)\n\nA library for in-process compilation of Kotlin and Java code, in the spirit of [Google Compile Testing](https://github.com/google/compile-testing). For example, you can use this library to test your annotation processor or compiler plugin.\n\n## Use Cases\n\n- Compile Kotlin and Java code in tests\n- Test annotation processors\n- Test compiler plugins\n- Test Kotlin code generation\n\n## Example\n\nCreate sources\n\n```Kotlin\nclass TestEnvClass {}\n\n@Test\nfun `test my annotation processor`() {\n  val kotlinSource = SourceFile.kotlin(\n    \"KClass.kt\", \"\"\"\n        class KClass {\n            fun foo() {\n                // Classes from the test environment are visible to the compiled sources\n                val testEnvClass = TestEnvClass() \n            }\n        }\n    \"\"\"\n  )\n\n  val javaSource = SourceFile.java(\n    \"JClass.java\", \"\"\"\n        public class JClass {\n            public void bar() {\n                // compiled Kotlin classes are visible to Java sources\n                KClass kClass = new KClass(); \n            }\n\t    }\n    \"\"\")\n```\nConfigure compilation\n```Kotlin\n    val result = KotlinCompilation().apply {\n        sources = listOf(kotlinSource, javaSource)\n        \n        // pass your own instance of an annotation processor\n        annotationProcessors = listOf(MyAnnotationProcessor()) \n\n        // pass your own instance of a compiler plugin\n        compilerPlugins = listOf(MyComponentRegistrar())\n\tcommandLineProcessors = listOf(MyCommandlineProcessor())\n        \n        inheritClassPath = true\n        messageOutputStream = System.out // see diagnostics in real time\n    }.compile()\n```\nAssert results\n```Kotlin\n    assertThat(result.exitCode).isEqualTo(ExitCode.OK)\t\n    \n    // Test diagnostic output of compiler\n    assertThat(result.messages).contains(\"My annotation processor was called\") \n    \n    // Load compiled classes and inspect generated code through reflection\n    val kClazz = result.classLoader.loadClass(\"KClass\")\n    assertThat(kClazz).hasDeclaredMethods(\"foo\")\n}\n```\n\n\n## Features\n- Mixed-source sets: Compile Kotlin and Java source files in a single run\n- Annotation processing: \n    - Run annotation processors on Kotlin and Java sources\n    - Generate Kotlin and Java sources\n    - Both Kotlin and Java sources have access to the generated sources\n    - Provide your own instances of annotation processors directly to the compiler instead of letting the compiler create them with a service locator\n    - Debug annotation processors: Since the compilation runs in the same process as your application, you can easily debug it instead of having to attach your IDE's debugger manually to the compilation process\n- Inherit classpath: Compiled sources have access to classes in your application\n- Project Jigsaw compatible: Kotlin-Compile-Testing works with JDK 8 as well as JDK 9 and later\n- JDK-crosscompilation: Provide your own JDK to compile the code against, instead of using the host application's JDK. This allows you to easily test your code on all JDK versions\n- Find dependencies automatically on the host classpath\n\n## Installation \u003cimg src=\"https://i.imgur.com/iV36acM.png\" width=\"23\"\u003e\n\nThe package is available on Maven Central.\n\nAdd dependency to your module's `build.gradle` file:\n\n```Groovy\ndependencies {\n        // ...\n\ttestImplementation(\"com.github.tschuchortdev:kotlin-compile-testing:1.5.0\")\n}\n```\n\n\u003cimg src=\"https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/whatsapp/186/white-medium-star_2b50.png\" width=\"23\"\u003e Remember to leave a star if you found it useful \u003cimg src=\"https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/whatsapp/186/white-medium-star_2b50.png\" width=\"23\"\u003e\n\n## Compatible Compiler Versions\n\nKotlin-Compile-Testing is compatible with all _local_ compiler versions. It does not matter what compiler you use to compile your project. \n\nHowever, if your project or any of its dependencies depend directly on compiler artifacts such as `kotlin-compiler-embeddable` or `kotlin-annotation-processing-embeddable` then they have to be the same version as the one used by Kotlin-Compile-Testing or there will be a transitive dependency conflict.\n\n\n- Current `kotlin-compiler-embeddable` version: `1.9.24`\n\nBecause the internal APIs of the Kotlin compiler often change between versions, we can only support one `kotlin-compiler-embeddable` version at a time. \n\n## Kotlin Symbol Processing API Support\n[Kotlin Symbol Processing (KSP)](https://goo.gle/ksp) is a new annotation processing pipeline that builds on top of the\nplugin architecture of the Kotlin Compiler, instead of delegating to javac as `kapt` does.\n\nTo test KSP processors, you need to use the KSP dependency:\n\n```Groovy\ndependencies {\n    testImplementation(\"com.github.tschuchortdev:kotlin-compile-testing-ksp:1.6.0\")\n}\n```\n\nThis module adds a new function to the `KotlinCompilation` to specify KSP processors:\n\n```Kotlin\nclass MySymbolProcessorProvider : SymbolProcessorProvider {\n    // implementation of the SymbolProcessorProvider from the KSP API\n}\nval compilation = KotlinCompilation().apply {\n    sources = listOf(source)\n    symbolProcessorProviders = listOf(MySymbolProcessorProvider())\n}\nval result = compilation.compile()\n```\nAll code generated by the KSP processor will be written into the `KotlinCompilation.kspSourcesDir` directory.\n\n\n## Projects that use Kotlin-Compile-Testing\n\n- [androidx/room](https://github.com/androidx/androidx/tree/androidx-master-dev/room/compiler-xprocessing)\n- [google/dagger](https://github.com/google/dagger/tree/master/javatests/dagger/hilt)\n- [square/moshi](https://github.com/square/moshi)\n- [uber/motif](https://github.com/uber/motif)\n- [arrow-kt/arrow-meta](https://github.com/arrow-kt/arrow-meta)\n- [foso/mpapt](https://github.com/foso/mpapt)\n- [kotlintest/kotlintest](https://github.com/kotlintest/kotlintest)\n- [bnorm/kotlin-power-assert](https://github.com/bnorm/kotlin-power-assert)\n- [JakeWharton/confundus](https://github.com/JakeWharton/confundus)\n- [kotest/kotest](https://github.com/kotest/kotest)\n- [ZacSweers/aak](https://github.com/ZacSweers/aak)\n- [apollographql/apollo-kotlin](https://github.com/apollographql/apollo-kotlin)\n- [patxibocos/poetimizely](https://github.com/patxibocos/poetimizely)\n- [AhmedMourad0/no-copy](https://github.com/AhmedMourad0/no-copy)\n- [ansman/auto-plugin](https://github.com/ansman/auto-plugin)\n- [livefront/sealed-enum](https://github.com/livefront/sealed-enum)\n- [him188/kotlin-jvm-blocking-bridge](https://github.com/him188/kotlin-jvm-blocking-bridge)\n- [Strum355/lsif-kotlin](https://github.com/Strum355/lsif-kotlin)\n- [mars885/hilt-binder](https://github.com/mars885/hilt-binder)\n- [Guardsquare/proguard-core](https://github.com/Guardsquare/proguard-core)\n- [Guardsquare/proguard](https://github.com/Guardsquare/proguard)\n- [komapper/komapper](https://github.com/komapper/komapper)\n- [SimonMarquis/SealedObjectInstances](https://github.com/SimonMarquis/SealedObjectInstances)\n- [ansman/kotshi](https://github.com/ansman/kotshi)\n- [mcarleio/konvert](https://github.com/mcarleio/konvert)\n- your project...\n\n## Java 16 compatibility\n\nWith the release of Java 16 the access control of the new Jigsaw module system is starting to be enforced by the JVM. Unfortunately, this impacts kotlin-compile-testing because KAPT still tries to access classes of javac that are not exported by the jdk.compiler module, leading to errors such as:\n```\njava.lang.IllegalAccessError: class org.jetbrains.kotlin.kapt3.base.KaptContext (in unnamed module @0x43b6aa9d) cannot access class com.sun.tools.javac.util.Context (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.util to unnamed module @0x43b6aa9d\n```\nTo mitigate this problem, you have to add the following code to your module's `build.gradle` file:\n```groovy\nif (JavaVersion.current() \u003e= JavaVersion.VERSION_16) {\n    test {\n        jvmArgs(\n          \"--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED\",\n          \"--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED\",\n          \"--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED\",\n          \"--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED\",\n          \"--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED\",\n          \"--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED\",\n          \"--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED\",\n          \"--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED\",\n          \"--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED\",\n          \"--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED\",\n        )\n    }\n}\n```\n\nor for Kotlin DSL\n\n```kotlin\nif (JavaVersion.current() \u003e= JavaVersion.VERSION_16) {\n    tasks.withType\u003cTest\u003e().all {\n        jvmArgs(\n            \"--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED\",\n            \"--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED\",\n            \"--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED\",\n            \"--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED\",\n            \"--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED\",\n            \"--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED\",\n            \"--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED\",\n            \"--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED\",\n            \"--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED\",\n            \"--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED\",\n        )\n    }\n}\n```\nSince the kotlin compilation tests run in the same process as the test runner, these options have to be added manually and can not be set automatically by the kotlin-compile-testing library.\n\n## License\n\nCopyright (C) 2023 Thilo Schuchort\n\nLicensed under the Mozilla Public License 2.0\n\nFor custom license agreements contact me directly \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftschuchortdev%2Fkotlin-compile-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftschuchortdev%2Fkotlin-compile-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftschuchortdev%2Fkotlin-compile-testing/lists"}