Skip to content

Commit e914f4e

Browse files
committed
Update README with new plugin information and JSHint changes
- Remove 'no longer maintained' notice - Add fork information and migration guide - Update plugin ID to de.inetsoftware.gradle.js - Update version to 2.18.0 - Document JSHint replacement with Closure Compiler - Add requirements and compatibility information - Update contributors list
1 parent a0e4c38 commit e914f4e

File tree

1 file changed

+82
-13
lines changed

1 file changed

+82
-13
lines changed

README.md

Lines changed: 82 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,44 @@
1-
# This plugin is no longer maintained! Please consider the [Gradle Node Plugin](https://github.com/node-gradle/gradle-node-plugin).
1+
# Gradle JavaScript Plugin
2+
3+
> **Note:** This is a maintained fork of the original [gradle-js-plugin](https://github.com/eriwen/gradle-js-plugin), updated for **Gradle 8/9 compatibility** and published under the `de.inetsoftware` group ID.
4+
5+
> **Disclaimer:** Most of the changes in this fork, including Gradle 8/9 compatibility fixes, Ant removal, and CI/CD pipeline improvements, were created with the assistance of Cursor AI. While the code has been tested and verified, please review changes carefully before using in production environments.
6+
7+
## Fork Information
8+
9+
This fork maintains **forward compatibility** with the original plugin while providing:
10+
- **Gradle 8/9 compatibility** - Fixed deprecated API usage and compatibility issues
11+
- **Updated group ID** - Published as `de.inetsoftware.gradle:gradle-js-plugin`
12+
- **Updated plugin IDs** - Use `de.inetsoftware.gradle.js` instead of `com.cloudzilla.gradle.js`
13+
- **Modern CI/CD pipeline** - GitHub Actions workflows replacing Travis CI
14+
- **Removed Ant dependencies** - All Ant usage replaced with Java/Gradle APIs for better compatibility
15+
- **All original functionality preserved** - Drop-in replacement for the original plugin
16+
17+
### Migration from Original Plugin
18+
19+
If you're using the original `com.cloudzilla.gradle.js` plugin, you can migrate to this fork by:
20+
21+
1. **Update your plugin declaration:**
22+
```groovy
23+
plugins {
24+
id "de.inetsoftware.gradle.js" version "2.18.0"
25+
}
26+
```
27+
28+
2. **Or update buildscript dependency:**
29+
```groovy
30+
buildscript {
31+
dependencies {
32+
classpath 'de.inetsoftware.gradle:gradle-js-plugin:2.18.0'
33+
}
34+
}
35+
apply plugin: 'de.inetsoftware.gradle.js'
36+
```
37+
38+
All task names and configuration remain the same - only the plugin ID and group ID have changed.
39+
40+
---
241

3-
# Gradle Javascript Plugin!
442
Aiming to be the *simplest* way to manage your JavaScript in a build.
543

644
# Quick Start
@@ -9,7 +47,7 @@ Wrangling your JS in a [Gradle](https://gradle.org) build is easy! Just add this
947
### Gradle 2.1+
1048
```groovy
1149
plugins {
12-
id "com.cloudzilla.gradle.js" version "2.16.2"
50+
id "de.inetsoftware.gradle.js" version "2.18.0"
1351
}
1452
```
1553

@@ -74,16 +112,28 @@ gzipJs {
74112
}
75113
```
76114

77-
### [JSHint](http://jshint.com) support ([options](#jshint))
115+
### JavaScript Linting with Closure Compiler ([options](#jshint))
116+
> **Note:** This plugin now uses Google Closure Compiler for JavaScript linting instead of JSHint. The task is still named `jshint` for backward compatibility, but it uses Closure Compiler's static analysis capabilities.
117+
78118
```groovy
79119
jshint {
80120
source = javascript.source.dev.js.files
81121
dest = file("${buildDir}/jshint.out")
82-
reporter = 'checkstyle'
83-
jshint.options = [expr: "true", unused: "true"]
122+
reporter = 'checkstyle' // Supports 'checkstyle' XML format or plain text
123+
ignoreExitCode = true // Set to false to fail build on warnings/errors
124+
outputToStdOut = false // Set to true to output to STDOUT instead of file
84125
}
85126
```
86127

128+
The Closure Compiler will analyze your JavaScript code and report:
129+
- Syntax errors
130+
- Type mismatches
131+
- Undefined variables
132+
- Unused code
133+
- And other static analysis warnings
134+
135+
**Migration Note:** If you were using JSHint-specific options like `jshint.options` or `jshint.predef`, these are no longer available as the plugin now uses Closure Compiler's analysis engine. The output format and basic configuration options remain compatible.
136+
87137
### [JSDoc 3](https://github.com/jsdoc3/jsdoc) support ([options](#jsdoc))
88138
```groovy
89139
jsdoc {
@@ -131,14 +181,16 @@ requireJs {
131181
- source = File to compress
132182
- dest = File for compressed output
133183

134-
### jshint
135-
- source = Files to assess with JSHint
136-
- dest = File for JSHint output
137-
- *(Optional)* reporter = Only 'checkstyle' supported right now. Defaults to plain JSHint output.
138-
- *(Optional)* ignoreExitCode = Fail build if `false` and jshint finds problems. Default is `true`.
184+
### jshint (JavaScript Linting with Closure Compiler)
185+
> **Note:** This task now uses Google Closure Compiler for static analysis instead of JSHint. The task name remains `jshint` for backward compatibility.
186+
187+
- source = Files to analyze with Closure Compiler
188+
- dest = File for linting output
189+
- *(Optional)* reporter = Output format: `'checkstyle'` for XML format, or omit for plain text. Defaults to plain text.
190+
- *(Optional)* ignoreExitCode = Fail build if `false` and linting finds problems. Default is `true`.
139191
- *(Optional)* outputToStdOut = `true` will output to STDOUT instead of file. Default is `false`.
140-
- *(Optional)* jshint.options = Map of options (e.g. `[expr: "true", unused: "true"]`)
141-
- *(Optional)* jshint.predef = Map of predefined globals so JSHint doesn't complain about them
192+
193+
**Important:** JSHint-specific options (`jshint.options`, `jshint.predef`) are no longer available as this plugin now uses Closure Compiler's static analysis engine. Closure Compiler provides more comprehensive type checking and error detection than JSHint.
142194

143195

144196
### jsdoc
@@ -177,6 +229,18 @@ JSDoc 3 options:
177229

178230
What, you want more? [Tell me!](https://github.com/eriwen/gradle-js-plugin/issues)
179231

232+
## Requirements
233+
234+
- **Gradle 8.14+ or 9.2.1+** - This fork requires Gradle 8.14 or later, with full support for Gradle 9.2.1
235+
- **Java 11+** - Required for compilation
236+
237+
## Compatibility
238+
239+
This fork has been tested and verified with:
240+
- Gradle 8.14, 8.14.3, 9.2.1
241+
- Java 17, 21
242+
- All original plugin functionality preserved
243+
180244
## Contributors
181245
This project is made possible due to the efforts of these fine people:
182246

@@ -189,6 +253,11 @@ This project is made possible due to the efforts of these fine people:
189253
* [Martin Snyder](https://github.com/MartinSnyder) - requireJs impl option
190254
* [Aaron Arnett](https://github.com/a3rnett) - Remove explicit MavenCentral dependency
191255
* [sv99](https://github.com/sv99) - Improve Gradle version compatibility
256+
* i-net software GmbH - Gradle 8/9 compatibility, Ant removal, and ongoing maintenance
192257

193258
## See Also
194259
The [Gradle CSS Plugin](https://github.com/eriwen/gradle-css-plugin)!
260+
261+
## License
262+
263+
This plugin is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) with no warranty (expressed or implied) for any purpose.

0 commit comments

Comments
 (0)