Registry / build-tool / kotlinpoet

kotlinpoet

JSON →
library2.3.0javamavenunverified

A Kotlin library for generating Kotlin source code programmatically with a fluent API.

<dependency> <groupId>com.squareup</groupId> <artifactId>kotlinpoet</artifactId> <version>2.3.0</version> </dependency>
INSTALL
IMPORT
SIG · KOTLINPOET
K
kotlinpoet
build-tooljavav2.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FileSpec
com.squareup.kotlinpoet.FileSpec

Generates a Kotlin file with a greeting function.

import com.squareup.kotlinpoet.FileSpec import com.squareup.kotlinpoet.FunSpec val greet = FunSpec.builder("greet") .addParameter("name", String::class) .addStatement("println(\"Hello, \$name\")") .build() val file = FileSpec.builder("com.example", "HelloWorld") .addFunction(greet) .build() file.writeTo(System.out)
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.3.0latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
kotlinpoet — mvn dependency:get kotlinpoet · libregistry