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

unable configure source folder structure and unable minify JS #153

Open
Prabh2k7 opened this issue Nov 8, 2017 · 0 comments
Open

unable configure source folder structure and unable minify JS #153

Prabh2k7 opened this issue Nov 8, 2017 · 0 comments

Comments

@Prabh2k7
Copy link

Prabh2k7 commented Nov 8, 2017

when I try to include js plugin into existing gradle script, I am facing below issue.
I am manage to create war through gradle-4.2.1 without Js plugin.

script:

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'war'
archivesBaseName = "idcapture"
version = '1.0'	
webAppDirName = 'WebContent'
buildDir = 'gradle_Build'

buildscript {
  repositories {
    jcenter()
  }
  dependencies {
    classpath "com.eriwen:gradle-js-plugin:1.12.1"
  }
}
apply plugin: "com.eriwen.gradle.js"
javascript.source {
    dev {
        js {
            srcDir ''WebContent/js''
            include "*.js"
            exclude "*.min.js"
        }
    }
}
 sourceSets {
  main {
     java {
	      srcDir 'src'
     }
     resources {
       srcDir 'conf'
     }
  } 
}
dependencies {
  compile fileTree(dir: "WebContent/WEB-INF/lib", include: '*.jar')
   } 

Error I am getting while creating war 👍
**What went wrong:
problem occurred evaluating root project 'mywebapp'.
Could not create an instance of type com.eriwen.gradle.js.source.internal.DefaultJavaScriptSourceSet_Decorated.

Could not find matching constructor for: org.gradle.api.internal.file.DefaultSourceDirectorySet(java.lang.String, java.lan**

PFA, my project folder structure.

capture1
jsfolders

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

1 participant