在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):lgrignon/jsweet-gradle-plugin开源软件地址(OpenSource Url):https://github.com/lgrignon/jsweet-gradle-plugin开源编程语言(OpenSource Language):Java 96.6%开源软件介绍(OpenSource Introduction):JSweet Gradle pluginBrings the power of JSweet to Gradle UsageAdd 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:
Development / Contribution / DeployConfigure signingAdd those lines to your 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 InstallInstall with: ./gradlew clean publishToMavenLocal Deploy (needs credentials)# on JSweet's repository
./gradlew clean publish
# on central Gradle plugins repository
./gradlew clean publishPlugins |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论