• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

lgrignon/jsweet-gradle-plugin: Brings the power of JSweet to Gradle

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

lgrignon/jsweet-gradle-plugin

开源软件地址(OpenSource Url):

https://github.com/lgrignon/jsweet-gradle-plugin

开源编程语言(OpenSource Language):

Java 96.6%

开源软件介绍(OpenSource Introduction):

JSweet Gradle plugin

Brings the power of JSweet to Gradle

Usage

Add the JSweet's repositories and the Gradle plugin dependency to your project's build.gradle, in the buildScript section:

buildscript {
	repositories {
		mavenCentral()
		maven { url "https://repository.jsweet.org/artifactory/libs-release-local" }
		maven { url "https://repository.jsweet.org/artifactory/libs-snapshot-local" }
		maven { url "https://repository.jsweet.org/artifactory/plugins-release-local" }
		maven { url "https://repository.jsweet.org/artifactory/plugins-snapshot-local" }
		maven { url "https://google-diff-match-patch.googlecode.com/svn/trunk/maven" }
	}
	dependencies {
		classpath('org.jsweet:jsweet-gradle-plugin:3.1.0') {
			transitive = true 
		}
	}
}

Then apply the JSweet Gradle plugin, as usual:

apply plugin: 'org.jsweet.jsweet-gradle-plugin'

and optionally disable java compilation (JSweet sources may not be considered as standard java sources):

compileJava {
	enabled = false
}

Add your JSweet dependencies (candies):

dependencies {
	compile group: 'org.jsweet', name: 'jsweet-transpiler', version: "3.0.0"
	compile group: 'org.jsweet', name: 'jsweet-core', version: "6"
	compile group: 'org.jsweet.candies', name: 'angular', version: "1.4.0-20170726"
	compile group: 'org.jsweet.candies', name: 'angular-route', version: "1.2.0-20170726"
}

Configure the JSweet plugin:

jsweet {
	verbose = true
	encoding = 'UTF-8'
	sourceMap = true
	outDir = project.file('target/javascript')
	candiesJsOut = project.file('target/candies')
	targetVersion = 'ES6'
	includes = ['**/fr/test/my/**/*.java']
	
	// extraSystemPath = '/my/path/to/npm'
}

The configuration options are based on the JSweet maven plugin options, please refer to its README for a comprehensive documentation: https://github.com/lgrignon/jsweet-maven-plugin#basic-configuration

Then, just invoke one of the JSweet gradle task:

$ gradle jsweet
$ gradle jsweetClean

Development / Contribution / Deploy

Configure signing

Add those lines to your ~/.gradle/gradle.properties:

signing.keyId=01695460
signing.password=...
signing.secretKeyRingFile=path/to/secrets.gpg

To regenerate this file from the gpg DB, use the following command:

gpg --export-secret-keys > path/to/secrets.gpg

To show short key ID (8 chars):

gpg --list-keys --keyid-format short

Or you can skip signing with:

./gradlew ... -DskipSigning=true

Install

Install with:

./gradlew clean publishToMavenLocal

Deploy (needs credentials)

# on JSweet's repository
./gradlew clean publish

# on central Gradle plugins repository
./gradlew clean publishPlugins



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap