Search Gradle plugins

se.jensim.kt2ts

Generate TypeScript Definitions from your existing code. In case you have your backend written in kotlin or java and you dont want to write your Angular type definitions yourself.

https://github.com/jensim/kt2ts-gradle-plugin

Sources: https://github.com/jensim/kt2ts-gradle-plugin

Version 0.7.2

Created 16 May 2019.

# Generate TypeScript Definitions from your existing code. In case you have your backend written in kotlin or java and you dont want to write your Angular type definitions yourself. [README for this release.](https://github.com/jensim/kt2ts-gradle-plugin/blob/0.7.2/README.md) [README for master branch](https://github.com/jensim/kt2ts-gradle-plugin/blob/master/README.md) ``` plugins { id("se.jensim.kt2ts") version "0.7.2" } kt2ts { annotation = "com.example.ToTypescript" classesDirs = files( tasks.findByName("compileKotlin")?.outputs, tasks.findByName("compileJava")?.outputs) outputFile = file("$buildDir/ts/kt2ts.d.ts") } ```

Add this plugin to your build using the plugins DSL:

plugins {
  id("se.jensim.kt2ts") version "0.7.2"
}

See also:

  • Adding the plugin to build logic for usage in precompiled script plugins.

    See the relevant documentation for more information.

    Add this plugin as a dependency to <convention-plugins-build>/build.gradle(.kts):

    dependencies {
      implementation("se.jensim.kt2ts:se.jensim.kt2ts.gradle.plugin:0.7.2")
    }
    It can then be applied in the precompiled script plugin:
    plugins {
      id("se.jensim.kt2ts")
    }
  • The legacy method of plugin application. See the relevant documentation for more information.
    buildscript {
      repositories {
        gradlePluginPortal()
      }
      dependencies {
        classpath("se.jensim.kt2ts:se.jensim.kt2ts.gradle.plugin:0.7.2")
      }
    }
    
    apply(plugin = "se.jensim.kt2ts")
  • Applying plugins to all subprojects .