
| Feature | Screenshot |
|---|---|
| 🔧 Customizable icon for design system component functions | ![]() |
🎨 DS icons in the code completion and gutter (where breakpoints are), like with R.drawable | |
🌈 Colors from DS palette in the code completion and gutter (where breakpoints are), like with R.color | ![]() |
| 📱 Installing the apk file of the demo app (showcase app) on an Android device, as well as navigating to the component page in it via an Intention Action | ![]() |
| 📱 The same via the gutter icons near function declarations | ![]() |
| 🖼 KDoc Images Rendering | ![]() |
| ⌨️ Handy live templates(customizable; after applying, automatically opens code completion popup) | ![]() |
| Library name | API | README | Note | Version |
|---|---|---|---|---|
kotlin-actions-toolkit |
API | README | ||
kotlin-browser |
API | README | ||
kotlin-cesium-engine |
API | README | ||
kotlin-cesium-widgets |
API | README | ||
kotlin-css |
API | README | ||
kotlin-cssom-core |
API | README | ||
kotlin-csstype |
API | README | guide | |
kotlin-electron |
API | README | ||
kotlin-emotion |
API | README | guide | |
kotlin-js |
API | README | ||
kotlin-mui-material |
API | README | ||
kotlin-mui-base |
API | README | ||
kotlin-mui-icons-material |
API | README | ||
kotlin-mui-lab |
API | README | ||
kotlin-mui-system |
API | README | ||
kotlin-muix-date-pickers |
API | README | ||
kotlin-muix-tree-view |
API | README | ||
kotlin-node |
API | README | ||
kotlin-null-writable |
API | README | ||
kotlin-popperjs-core |
API | README | ||
kotlin-preact-signals-core |
API | README | ||
kotlin-preact-signals-react |
API | README | ||
kotlin-react |
API | README | ||
kotlin-react-beautiful-dnd |
API | README | ||
kotlin-react-core |
API | README | ||
kotlin-react-dom |
API | README | ||
kotlin-react-dom-legacyarchived |
API | README | ||
kotlin-react-dom-test-utils |
API | README | ||
kotlin-react-legacyarchived |
API | README | ||
kotlin-react-router |
API | README | ||
kotlin-react-router-dom |
API | README | ||
kotlin-react-popper |
API | README | ||
kotlin-react-select |
API | README | ||
kotlin-react-use |
API | README | ||
kotlin-remix-run-router |
API | README | ||
kotlin-semver |
API | README | ||
kotlin-styled-next |
API | README | ||
kotlin-tanstack-query-core |
API | README | ||
kotlin-tanstack-react-query |
API | README | ||
kotlin-tanstack-react-query-devtools |
API | README | ||
kotlin-tanstack-react-table |
API | README | ||
kotlin-tanstack-react-virtual |
API | README | ||
kotlin-tanstack-table-core |
API | README | ||
kotlin-tanstack-virtual-core |
API | README | ||
kotlin-typescript |
API | README | ||
kotlin-vercel-ncc |
API | README | ||
kotlin-web |
API | README | ||
kotlin-wrappers-bom |
API | README |
class Hello : CliktCommand() {
val count: Int by option().int().default(1).help("Number of greetings")
val name: String by option().prompt("Your name").help("The person to greet")
override fun run() {
repeat(count) {
echo("Hello $name!")
}
}
}
fun main(args: Array<String>) = Hello().main(args)
@Composable
fun Counter() {
var count by remember { mutableIntStateOf(0) }
Text("The count is: ${count}")
LaunchedEffect(Unit) {
for (i in 1..20) {
delay(250)
count = i
}
}
}
fun main() = runMosaicBlocking {
Counter()
}
jvm()
js {
browser()
nodejs()
}
iosX64()
iosArm64()
iosSimulatorArm64()
macosX64()
macosArm64()
watchosArm32()
watchosArm64()
watchosX64()
watchosSimulatorArm64()
linuxX64()
linuxArm64()
mingwX64()
val gradleArgs = "-DmyArg=myArgValue"
val gradle = GradleBuildDsl()
/**
* Pipeline
*/
fun PipelineDsl.gradleBuildPipeline() =
gradle.run {
pipeline {
stages {
stage("Build") {
steps {
gradleCommand("build $gradleArgs")
}
}
stage("Validate") {
parallel {
listOf("api", "ext", "shared", "mod1").forEach { subProject ->
stage("$subProject Test") {
agent(defaultAgent)
steps {
gradleCommand(":$subProject:systemTest $gradleArgs")
}
post {
always {
archiveArtifacts("$subProject/build/test-reports/", true)
}
}
}
}
}
}
stage("Publish") {
agent(defaultAgent)
steps {
gradleCommand("publish $gradleArgs")
}
}
}
}
}
val uid = "uid".groovyVariable()
val dockerDsl = DockerDsl(
defaultDockerBuildArgs = "-u "$uid",
beforeContainer = { def(uid.name) { sh("id -u", true) } })
val sideCars = listOf(SideCar.Image(
containerVariable = "postgres".groovyVariable(),
containerLinkName = "db",
image = "postgres:11".strDouble(),
runArgs = "--env DB=app --expose 5432".strDouble()),
SideCar.Image(
containerVariable = "rabbitmq".groovyVariable(),
containerLinkName = "rabbit",
image = "rabbitmq:11".strDouble(),
runArgs = "--expose 5672".strDouble()))
fun PipelineDsl.dockerPipeline() = pipeline {
stages {
stage("build in container") {
steps {
dockerDsl.run {
insideContainer(
dockerAgent = { dockerFile(
filename = "build.Dockerfile",
additionalBuildArgs = "--arg1 y",
registryUrl = "my.custom.registry",
registryCredentialsId = "registry-creds-id")
},
sideCars = sideCars
) {
echo("Inside a container!")
sh("psql -h db -p 5432 app")
}
}
}
}
}
}
const val PIN_BUTTON = 24 // PIN 18 = BCM 24
const val PIN_LED = 22 // PIN 15 = BCM 22
var pressCount = 0
console {
title("<-- The Pi4J Project -->", "Minimal Example project")
pi4j {
digitalInput(PIN_BUTTON) {
id("button")
name("Press button")
pull(PullResistance.PULL_DOWN)
debounce(3000L)
piGpioProvider()
}.onLow {
pressCount++
+"Button was pressed for the ${pressCount}th time"
}
}
digitalOutput(PIN_LED) {
id("led")
name("LED Flasher")
shutdown(DigitalState.LOW)
initial(DigitalState.LOW)
piGpioProvider()
}.run {
while (pressCount < 5) {
+"LED ${state()}"
toggle()
sleep(500L / (pressCount + 1))
}
}
}
}
}
suspend fun main(vararg args: String) {
val botToken = args.first()
val isDebug = args.getOrNull(1) == "debug"
if (isDebug) {
setDefaultKSLog(
KSLog { level: LogLevel, tag: String?, message: Any, throwable: Throwable? ->
println(defaultMessageFormatter(level, tag, message, throwable))
}
)
}
val bot = telegramBot(botToken)
bot.buildBehaviourWithLongPolling {
onContentMessage { contentMessage ->
val url = contentMessage.withContentOrNull<TextedContent>() ?.let { message ->
message.content.textSources.firstNotNullOfOrNull {
it.textLinkTextSourceOrNull() ?.url ?: it.uRLTextSourceOrNull() ?.source
}
} ?: null.apply {
reply(contentMessage) {
regular("I am support only content with text contains url only")
}
} ?: return@onContentMessage
contentMessage.withContentOrNull<TextedContent>() ?.let {
send(
it.chat,
it.content.textSources,
linkPreviewOptions = LinkPreviewOptions.Disabled
)
send(
it.chat,
it.content.textSources,
linkPreviewOptions = LinkPreviewOptions.Large(url, showAboveText = true)
)
send(
it.chat,
it.content.textSources,
linkPreviewOptions = LinkPreviewOptions.Large(url, showAboveText = false)
)
send(
it.chat,
it.content.textSources,
linkPreviewOptions = LinkPreviewOptions.Small(url, showAboveText = true)
)
send(
it.chat,
it.content.textSources,
linkPreviewOptions = LinkPreviewOptions.Small(url, showAboveText = false)
)
send(
it.chat,
it.content.textSources,
linkPreviewOptions = LinkPreviewOptions.Default(url, showAboveText = true)
)
send(
it.chat,
it.content.textSources,
linkPreviewOptions = LinkPreviewOptions.Default(url, showAboveText = false)
)
}
}
}.join()
}
Kotlin/Dart
val observableTypeName = DeclaredTypeName.typeName("RxSwift.Observable")
val testClass = TypeSpec.classBuilder("Greeter")
.addProperty("name", STRING, Modifier.PRIVATE)
.addFunction(
FunctionSpec.constructorBuilder()
.addParameter("name", STRING)
.addCode("self.name = name\n")
.build()
)
.addFunction(
FunctionSpec.builder("greet")
.returns(observableTypeName.parameterizedBy(STRING))
.addCode("return %T.from(\"Hello \\(name)\")\n", observableTypeName)
.build()
)
.build()
val file = FileSpec.builder("Greeter")
.addType(testClass)
.build()
val out = StringWriter()
file.writeTo(out)
import RxSwift
class Greeter {
private let name: String
init(name: String) {
self.name = name
}
func greet() -> Observable<String> {
return Observable.from("Hello \(name)")
}
}