Skip to content

A Gradle plugin that converts Kotlin data models into TypeScript

Notifications You must be signed in to change notification settings

alexvas/kotlin2typescript

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 100.0%