Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

Commit

Permalink
Update to the latest google closure compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
mampcs authored and gamma committed Oct 10, 2024
1 parent 2653fcb commit bd1fca6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Wrangling your JS in a [Gradle](https://gradle.org) build is easy! Just add this
### Gradle 2.1+
```groovy
plugins {
id "com.cloudzilla.gradle.js" version "2.16.1"
id "com.cloudzilla.gradle.js" version "2.16.2"
}
```

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ targetCompatibility = 1.6

defaultTasks 'clean', 'build'

version = '2.16.1'
version = '2.16.2'
group = 'com.cloudzilla.gradle'
ext.archivesBaseName = 'gradle-js-plugin'
ext.isSnapshot = version.endsWith("-SNAPSHOT")
Expand All @@ -38,7 +38,7 @@ task createClasspathManifest {

dependencies {
compile gradleApi()
compile('com.google.javascript:closure-compiler:v20160208') {
compile('com.google.javascript:closure-compiler:v20200830') {
exclude module: 'junit'
}
compile('io.jdev.html2js:html2js:0.1') {
Expand Down
6 changes: 3 additions & 3 deletions src/main/groovy/com/eriwen/gradle/js/JsMinifier.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ class JsMinifier {
CompilationLevel.valueOf(compilationLevel).setOptionsForCompilationLevel(options)
WarningLevel level = WarningLevel.valueOf(warningLevel)
level.setOptionsForWarningLevel(options)
List<SourceFile> externs = CommandLineRunner.getBuiltinExterns(new CompilerOptions());
List<SourceFile> externs = CommandLineRunner.getBuiltinExterns(options.environment);
if (externsFiles.size()) {
externs.addAll(externsFiles.collect() { SourceFile.fromFile(it) })
externs.addAll(externsFiles.collect() { SourceFile.fromFile(it.absolutePath) })
}
List<SourceFile> inputs = new ArrayList<SourceFile>()
inputFiles.each { inputFile ->
inputs.add(SourceFile.fromFile(inputFile))
inputs.add(SourceFile.fromFile(inputFile.absolutePath))
}
Result result = compiler.compile(externs, inputs, options)
if (result.success) {
Expand Down

0 comments on commit bd1fca6

Please sign in to comment.