gradle-typescript-plugin

Gradle TypeScript plugin

License

License

Categories

Categories

Gradle Build Tools
GroupId

GroupId

com.prezi.typescript
ArtifactId

ArtifactId

gradle-typescript-plugin
Last Version

Last Version

5.0
Release Date

Release Date

Type

Type

jar
Description

Description

gradle-typescript-plugin
Gradle TypeScript plugin
Project URL

Project URL

http://github.com/prezi/gradle-typescript-plugin
Source Code Management

Source Code Management

http://github.com/prezi/gradle-typescript-plugin

Download gradle-typescript-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/com.prezi.typescript/gradle-typescript-plugin/ -->
<dependency>
    <groupId>com.prezi.typescript</groupId>
    <artifactId>gradle-typescript-plugin</artifactId>
    <version>5.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.prezi.typescript/gradle-typescript-plugin/
implementation 'com.prezi.typescript:gradle-typescript-plugin:5.0'
// https://jarcasting.com/artifacts/com.prezi.typescript/gradle-typescript-plugin/
implementation ("com.prezi.typescript:gradle-typescript-plugin:5.0")
'com.prezi.typescript:gradle-typescript-plugin:jar:5.0'
<dependency org="com.prezi.typescript" name="gradle-typescript-plugin" rev="5.0">
  <artifact name="gradle-typescript-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.prezi.typescript', module='gradle-typescript-plugin', version='5.0')
)
libraryDependencies += "com.prezi.typescript" % "gradle-typescript-plugin" % "5.0"
[com.prezi.typescript/gradle-typescript-plugin "5.0"]

Dependencies

compile (3)

Group / Artifact Type Version
com.google.guava : guava jar 17.0
commons-lang : commons-lang jar 2.6
commons-io : commons-io jar 2.4

test (1)

Group / Artifact Type Version
org.spockframework : spock-core jar 0.7-groovy-2.0

Project Modules

There are no modules declared in this project.

Gradle TypeScript Plugin

TypeScript support for Gradle.

Build Status

Gradle 2.0 required. With earlier versions you will get an error that org.gradle.runtime.base.BinaryContainer is missing.

The plugin automatically configures the following things:

  • adds src/main/ts as the default TypeScript source folder
  • configures a compile task to compile TypeScript sources to build/compiled-typescript/output.js

How to release

  1. Run: ./gradlew clean uploadArchives -Prelease -Psonatype
  2. Open: https://oss.sonatype.org/#stagingRepositories
  3. Find the comprezi staging repo, close it and release it.

Tasks

TypeScriptCompile

task compileTypeScript(type: com.prezi.typescript.gradle.TypeScriptCompile) {
	// prepends the given javascript file() to the beginning of the output
	prependJs "<jsfile>"

	// appends the given javascript file() to the end of the output
	appendJs "<jsfile>"

	// source files to compile
	source "<sources>"

	// output file
	outputFile "<jsfile>"

	// invokes the '--noImplicitAny' option (false by default)
	strict false

	// does not remove comments (false by default)
	enableComments false

	// ECMAScript target version: ES3 or ES5 (default)
	target "ES5"

	// add additional flags
	flag "--sourceRoot", "sources/something"
}

Configurations

You can add dependencies (like d.ts files) to the build path using these pre-defined configurations:

  • compile
  • testCompile (extends compile)

For example:

dependencies {
	testCompile "typescript:mocha:1.17.1"
}
com.prezi.typescript

prezi.com

Versions

Version
5.0
4.1
4.0
3.0
2.6
2.5
2.4.1
2.4
2.3
2.2.5
2.2.4
2.2.3
2.2.2
2.2.1
2.2
2.1
2.0.1
2.0
1.2-rc1
1.1.2
1.1.1
1.1