Closed willis7 closed 9 years ago
Despite the error, I can see a css directory with compiled css inside but I have no way of testing if everything is there. This is the Bootstrap Less code.
Thank you for reporting this! I confirmed the issue. I'll look into it later.
@willis7
In this case, bootstrap/less/**/*.less
should be excluded (should not be compiled), but bootstrap/less/bootstrap.less
should be included.
(bootstrap.less imports other files)
But we can't specify this pattern with the current version.
To handle this, I added a new configuration option filters
to 1.1.0-SNAPSHOT.
Could you try this version?
This is a snapshot, so you can use it with this dependency setting:
//plugins {
// id "com.github.ksoichiro.web.resource" version "1.0.5"
//}
buildscript {
repositories {
jcenter()
maven {
url uri('https://oss.sonatype.org/content/repositories/snapshots/')
}
}
dependencies {
classpath 'com.github.ksoichiro:gradle-web-resource-plugin:1.1.0-SNAPSHOT'
}
}
apply plugin: 'com.github.ksoichiro.web.resource'
And the configuration will be like this:
webResource {
...
less {
...
// Add this 'filters' to include bootstrap.less
filters {
exclude '**/bootstrap/less/**/*.less'
include '**/bootstrap/less/bootstrap.less'
}
}
...
}
Then only bootstrap/less/bootstrap.less
will be compiled.
I had a play with this also and found the following worked:
plugins {
id "com.github.ksoichiro.web.resource" version "1.0.5"
}
webResource {
base {
// Change base directories for src/dest
src = '.'
dest = '.'
}
coffeeScript.enabled = false
less {
// Set false if you don't use LESS related features
enabled = true
// Change LESS src/dest directories and filter setting
src = 'less'
dest = 'css'
filters.include 'bootstrap.less'
// Default: true
minify = false
}
}
Thank you for checking!
No problem, great plugin :+1:
build.gradle
⇒ gradle --version
Stacktrace: