alexvas / kotlin2typescript

A Gradle plugin that converts Kotlin data models into TypeScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kt2ts

A Gradle Plugin which converts Kotlin data models into Typescript. It uses Alicia Boya GarcĂ­a's TypeScript definition generator for that.

Plugin is built with TDD approach demonstrated by Stefan May's in his Gloc Gradle Plugin.

How to use

One is able to use/apply the plugin with build.gradle.kts:

plugins {
  id("kotlin2ts.kt2ts") version "1.0.0"
}

kt2ts {
  packs = arrayOf("org.fidget.models")
}

or build.gradle:

plugins {
  id("kotlin2ts.kt2ts").version("1.0.0")
}

kt2ts {
  packs = ["org.fidget.models"]
}

Extension configuration

The extension provides only one property:

  • packs - a array of packages where data models to be converted into TypeScript are situated

Task

The plugin provides the task called kt2ts.

About

A Gradle plugin that converts Kotlin data models into TypeScript


Languages

Language:Kotlin 100.0%