I have this task
@CacheableTask
class WebjarTask extends Jar {
public static final String WEBJAR_RESOURCES_FOLDER = "META-INF/resources"
JsExtension ext
@InputDirectory
def jsDistDir
WebjarTask() {
WebjarTask() {
ext = project.getExtensions().findByType(JsExtension)
this.jsDistDir = ext.jsDistDir
}
/**
* Basically, we’re making a jar file and putting all the resources
* into the META-INF/resources directory.
* @return
*/
@TaskAction
def webjarMethod() {
into WEBJAR_RESOURCES_FOLDER
from(jsDistDir)
}
}
}
problem is im getting a compiler error “inter methods aren’t supported” on the method “webjarMethod”. This exact model works when i extend a Copy, why doesn’t it work when i extend Jar?