{"id":18831566,"url":"https://github.com/lgrignon/jsweet-gradle-plugin","last_synced_at":"2025-04-14T04:16:31.299Z","repository":{"id":47500095,"uuid":"48242177","full_name":"lgrignon/jsweet-gradle-plugin","owner":"lgrignon","description":"Brings the power of JSweet to Gradle","archived":false,"fork":false,"pushed_at":"2022-11-15T17:50:00.000Z","size":219,"stargazers_count":17,"open_issues_count":9,"forks_count":15,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-14T04:16:26.026Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lgrignon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-18T15:26:08.000Z","updated_at":"2023-04-11T20:06:30.000Z","dependencies_parsed_at":"2023-01-21T19:33:19.012Z","dependency_job_id":null,"html_url":"https://github.com/lgrignon/jsweet-gradle-plugin","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgrignon%2Fjsweet-gradle-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgrignon%2Fjsweet-gradle-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgrignon%2Fjsweet-gradle-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgrignon%2Fjsweet-gradle-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lgrignon","download_url":"https://codeload.github.com/lgrignon/jsweet-gradle-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248819410,"owners_count":21166477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T01:55:15.031Z","updated_at":"2025-04-14T04:16:31.264Z","avatar_url":"https://github.com/lgrignon.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSweet Gradle plugin\n\nBrings the power of JSweet to Gradle\n\n## Usage\nAdd the JSweet's repositories and the Gradle plugin dependency to your project's build.gradle, in the buildScript section:\n\n```groovy\nbuildscript {\n\trepositories {\n\t\tmavenCentral()\n\t\tmaven { url \"https://repository.jsweet.org/artifactory/libs-release-local\" }\n\t\tmaven { url \"https://repository.jsweet.org/artifactory/libs-snapshot-local\" }\n\t\tmaven { url \"https://repository.jsweet.org/artifactory/plugins-release-local\" }\n\t\tmaven { url \"https://repository.jsweet.org/artifactory/plugins-snapshot-local\" }\n\t\tmaven { url \"https://google-diff-match-patch.googlecode.com/svn/trunk/maven\" }\n\t}\n\tdependencies {\n\t\tclasspath('org.jsweet:jsweet-gradle-plugin:3.1.0') {\n\t\t\ttransitive = true \n\t\t}\n\t}\n}\n```\n\nThen apply the JSweet Gradle plugin, as usual:\n\n```groovy\napply plugin: 'org.jsweet.jsweet-gradle-plugin'\n```\n\nand optionally  disable java compilation (JSweet sources may not be considered as standard java sources):\n\n```groovy\ncompileJava {\n\tenabled = false\n}\n```\n\nAdd your JSweet dependencies (candies):\n\n```groovy\n\ndependencies {\n\tcompile group: 'org.jsweet', name: 'jsweet-transpiler', version: \"3.0.0\"\n\tcompile group: 'org.jsweet', name: 'jsweet-core', version: \"6\"\n\tcompile group: 'org.jsweet.candies', name: 'angular', version: \"1.4.0-20170726\"\n\tcompile group: 'org.jsweet.candies', name: 'angular-route', version: \"1.2.0-20170726\"\n}\n```\n\nConfigure the JSweet plugin:\n\n```groovy\njsweet {\n\tverbose = true\n\tencoding = 'UTF-8'\n\tsourceMap = true\n\toutDir = project.file('target/javascript')\n\tcandiesJsOut = project.file('target/candies')\n\ttargetVersion = 'ES6'\n\tincludes = ['**/fr/test/my/**/*.java']\n\t\n\t// extraSystemPath = '/my/path/to/npm'\n}\n\n```\n\nThe configuration options are based on the JSweet maven plugin options, please refer to its README for a comprehensive documentation:\nhttps://github.com/lgrignon/jsweet-maven-plugin#basic-configuration\n\n\nThen, just invoke one of the JSweet gradle task:\n\n```\n$ gradle jsweet\n```\n\n```\n$ gradle jsweetClean\n```\n\n## Development / Contribution / Deploy\n\nMake sure your `JAVA_HOME` points to a JDK 11 installation.\n\nCurrently, the `check` target seems to be failing, missing some JUnit dependencies.\n\nYou can build and assemble the plugin as follows:\n```\n./gradlew clean assemble\n```\nFor manual testing with other local Gradle projects using JSweet:\n```\n./gradlew publishToMavenLocal\n```\nYou may find you need to set `skipSigning` for this to succeed.\n\nIn the client project, add to `settings.gradle`:\n```\npluginManagement {\n    // includeBuild '../../../Projects/jsweet-gradle-plugin'\n    resolutionStrategy {\n        eachPlugin {\n            if (requested.id.namespace == 'org.jsweet') {\n                useModule('org.jsweet:jsweet-gradle-plugin:3.1.0')\n            }\n        }\n    }\n    repositories {\n      mavenLocal()\n      gradlePluginPortal()\n    }\n}\n```\nWithout the `resolutionStrategy`, Gradle may fail looking for an ID ending in `.gradle.plugin`.\n\nIn the client project `build.gradle`, add:\n```\nbuildscript {\n\trepositories {\n    mavenLocal()\n\t\tmavenCentral()\n\t\tmaven { url \"https://repository.jsweet.org/artifactory/libs-release-local\" }\n\t\tmaven { url \"https://repository.jsweet.org/artifactory/libs-snapshot-local\" }\n\t\tmaven { url \"https://repository.jsweet.org/artifactory/plugins-release-local\" }\n\t\tmaven { url \"https://repository.jsweet.org/artifactory/plugins-snapshot-local\" }\n\t\tmaven { url \"https://google-diff-match-patch.googlecode.com/svn/trunk/maven\" }\n\t}\n\tdependencies {\n\t\tclasspath('org.jsweet:jsweet-gradle-plugin:3.1.0') {\n\t\t\ttransitive = true \n\t\t}\n\t}\n}\n\nplugins {\n    id 'org.jsweet.jsweet-gradle-plugin' version '3.1.0'\n}\n```\n\n\n### Configure signing\nAdd those lines to your `~/.gradle/gradle.properties`:\n\n```properties\nsigning.keyId=01695460\nsigning.password=...\nsigning.secretKeyRingFile=path/to/secrets.gpg\n```\n\nTo regenerate this file from the gpg DB, use the following command:\n\n```bash\ngpg --export-secret-keys \u003e path/to/secrets.gpg\n```\n\nTo show short key ID (8 chars):\n\n```bash\ngpg --list-keys --keyid-format short\n```\n\nOr you can skip signing with:\n\n```bash\n./gradlew ... -DskipSigning=true\n```\n\n### Install\n\nInstall with:\n\n```bash\n./gradlew clean publishToMavenLocal\n```\n\n### Deploy (needs credentials)\n\n```bash\n# on JSweet's repository\n./gradlew clean publish\n\n# on central Gradle plugins repository\n./gradlew clean publishPlugins\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flgrignon%2Fjsweet-gradle-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flgrignon%2Fjsweet-gradle-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flgrignon%2Fjsweet-gradle-plugin/lists"}