Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Gradle Plugin for the Kotlin Compiler Test Framework

NotificationsYou must be signed in to change notification settings

GradleUp/kctf

Repository files navigation

Kctf is a Gradle Plugin for the Kotlin Compiler Test Framework (KCTF).

It factors some of the Gradle configuration and boilerplate needed to setup tests for your Kotlin compiler plugin.

Get started

Configure your build

plugins {  id("org.jetbrains.kotlin.jvm")  id("com.gradleup.kctf").version("2.2.20-RC-0.0.1")}dependencies {// Add the kctf runtime, it pulls the kotlin test framework transitively  testImplementation("org.gradleup.kctf:kctf-runtime:2.2.20-RC-0.0.1")}

Write your abstract tests insrc/test/kotlin/com/example:

@TestMetadata("compiler-tests/src/test/data/box")openclassAbstractBoxTest :AbstractFirLightTreeBlackBoxCodegenTest() {overridefunconfigure(builder:TestConfigurationBuilder) {super.configure(builder)with(builder) {      configurePlugin()      defaultDirectives {+FULL_JDK+WITH_STDLIB+IGNORE_DEXING      }    }  }}

Call thekctfGenerateSources task:

./gradlew kctfGenerateSources

Kctf generates your test insrc/test/java:

/** This class is generated by {@link kctf.MainKt}. DO NOT MODIFY MANUALLY */@SuppressWarnings("all")@TestMetadata("compiler-tests/src/test/data/diagnostic")@TestDataPath("$PROJECT_ROOT")publicclassDiagnosticTestGeneratedextendsAbstractDiagnosticTest {// ...}

About

Gradle Plugin for the Kotlin Compiler Test Framework

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp