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

Could not get unknown property 'closure' for task of type MinifyJsTask #155

Open
avirtual opened this issue Dec 20, 2017 · 3 comments
Open

Comments

@avirtual
Copy link

avirtual commented Dec 20, 2017

I'm in a world of pain, trying to get some js files to get minified.

import com.eriwen.gradle.js.tasks.MinifyJsTask
buildscript {
    dependencies {
        classpath "com.eriwen:gradle-js-plugin:2.14.1"
        classpath group: 'com.google.javascript', name: 'closure-compiler', version: 'v20160208'
    }
}

task minJs(type: com.eriwen.gradle.js.tasks.MinifyJsTask) {
    source = "d:/projects/prototype.js"
    dest = "d:/prototype-min.js"
}

If i used GZipTask, it works, on MinifyJsTask it complains about closure.
Caused by: groovy.lang.MissingPropertyException: Could not get unknown property 'closure' for task ':appframework:minJs' of type com.eriwen.gradle.js.tasks.MinifyJsTask.

I would appreciate any suggestions.

@okrasz
Copy link

okrasz commented Nov 29, 2018

I have the same issue. The code looks like this:

        tasks.create(name: "minify$extension$index", type: MinifyJsTask) {
            source = srcFile
            dest = targetFile
        }.execute()

and I get:

Could not get unknown property 'closure' for task ':idp.frontend:minifyjs0' of type com.eriwen.gradle.js.tasks.MinifyJsTask

Similar work works with no issue for MinifyCssTask.

@okrasz
Copy link

okrasz commented Nov 29, 2018

When I downgraded to 1.12.0 it works.

@QuentinPin
Copy link

I have the same isssue, somebody have find how to fix it ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants