Here is the full buildscript section along with the custom tasks I am running
buildscript {
apply plugin: 'idea'
repositories {
mavenCentral()
}
dependencies {
classpath group: 'commons-codec', name: 'commons-codec', version:
'1.2'
// FIXME: Need to find out how to get global
${project.versions.yuicompressor}
//classpath
"com.yahoo.platform.yui:yuicompressor:${project.versions.yuicompressor}"
classpath group: 'com.yahoo.platform.yui', name: 'yuicompressor',
version: '2.4.6'
classpath group: 'org.mozilla', name: 'rhino', version: '1.7R3'
classpath files('../libs/yguard.jar')
classpath fileTree(dir: 'libs', include: '*.jar')
}
}
allprojects {...}
subprojects {...}
import com.yahoo.platform.yui.compressor.*
import org.mozilla.javascript.*
class SystemOutErrorReporter implements ErrorReporter {
private String format(String arg0, String arg1, int arg2, String arg3,
int arg4) {
return String.format("%s%s at line %d, column %d:\n%s",
arg0,
arg1 == null ? "" : ":" + arg1,
arg2,
arg4,
arg3);
}
@Override
public void warning(String arg0, String arg1, int arg2, String arg3, int
arg4) {
System.out.println("WARNING: " + format(arg0, arg1, arg2, arg3,
arg4));
}
@Override
public void error(String arg0, String arg1, int arg2, String arg3, int
arg4) {
System.out.println("ERROR: " + format(arg0, arg1, arg2, arg3,
arg4));
}
@Override
public EvaluatorException runtimeError(String arg0, String arg1, int
arg2, String arg3, int arg4) {
System.out.println("RUNTIME ERROR: " + format(arg0, arg1, arg2,
arg3, arg4));
return new EvaluatorException(arg0);
}
}
class CatPack extends DefaultTask {
@InputDirectory
File inputFolder;
@OutputFile
File outputFile;
@TaskAction
public void doCatPack() {
def fw = new FileWriter(outputFile)
inputFolder.eachFileMatch(~/.*\.js/) { File file ->
def c = new JavaScriptCompressor(file.newReader(), new
SystemOutErrorReporter())
// 0 = line breaks after each rule, -1 = no line breaks
c.compress(fw, -1, false, false, false, false)
}
fw.flush()
fw.close()
}
}
/**
* Chapter 01: POJO\'s and Utilities
*/
project('ch01') {
description = 'Chapter 01: POJO\'s and Utilities'
dependencies {}
}
So all the submodules are fine, but not the root level so intellij does not
recognize
import com.yahoo.platform.yui.compressor.*
import org.mozilla.javascript.*
Nor does it undertstand DefaultTask from gradle.
-----
---
Thank You…
Mick Knutson, President, Certified Spring Instructor
BASE Logic, Inc.
Enterprise Architecture, Design, Training & Agile Consulting
Company: http://baselogic.com/blog/services/
---
--
View this message in context:
http://gradle.1045684.n5.nabble.com/IDEA-plugin-to-add-top-level-dependencies-for-multi-module-build-tp5515615p5515921.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email