gradle-mdicons
gradle-mdicons copied to clipboard
(Android Studio) build yields no images in `res/`
Following the doc, I added
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.tmiyamon:gradle-mdicons:0.2.3'
}
}
repositories {
jcenter()
}
apply plugin: 'com.android.application'
apply plugin: 'com.tmiyamon.mdicons'
mdicons {
pattern '(refresh|search)_white_24dp'
}
to my build.grade
.
When I build, I observe the directory ~/.material_design_icons
being created and deleted shortly after.
The .mdicons
file is created just fine.
I tried other patterns, too. No images. Hmmm. I even tried to chmod
my src/main/res
, to no avail.
I cannot find an error message. I am using Android Studio 1.1.0 to build my project.
$ uname -a
Linux geek 3.13.0-45-generic #74-Ubuntu SMP Tue Jan 13 19:36:28 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Here's the full build.gradle
:
apply plugin: 'com.android.application'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.tmiyamon:gradle-mdicons:0.2.3'
}
}
repositories {
jcenter()
}
apply plugin: 'com.android.application'
apply plugin: 'com.tmiyamon.mdicons'
mdicons {
pattern '.+'
}
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "org.give2peer.give2peer"
minSdkVersion 16
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
// This solves (stale?) httpclient packaged with Android creating conflicts
// I still have a warning that one of the two is ignored, and jarjar blinks
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// TIMEWARDS COMPATIBILITY
compile 'com.android.support:appcompat-v7:22.0.0'
// HTTP
compile 'org.apache.httpcomponents:httpmime:4.3'
compile 'org.apache.httpcomponents:httpclient-android:4.3.5'
// ORM
compile 'com.github.satyan:sugar:1.3'
// Nope, changed nothing, but I tried :3
//compile 'com.tmiyamon:gradle-mdicons:0.2.3'
}
I figured out that git failed its clone because it asked me for my RSA key password.
I cloned the repository myself $ git clone [email protected]:google/material-design-icons.git /home/antoine/.material_design_icons
, and now I have the following :
18:16:49.783 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.internal.MissingMethodException: Could not find method eachIconFiles() for arguments [/home/antoine/.material_design_icons, [action, alert, av, communication, content, device, editor, file, hardware, image, maps, navigation, notification, social, toggle], (report_black_24dp), com.tmiyamon.MaterialDesignIconsPlugin$_apply_closure3_closure8_closure16@31d748c1] on task ':app:mdiconsCopyIconsByPatterns'.
I can see that the method exists, though.
I really like that lib and I don't want to have to code my own support for the material design icons. What am I doing wrong ?
I installed groovy (you never know), but the same error crops up.
I tried using groups :
mdicons {
group name: "user|camera", color: 'red', size: '18dp'
}
There's no error, but no images are copied.
:disappointed:
If anyone bumps into the same errors and cannot solve them, there's a nice python script that does the job. It's not as sexy as hooking gradle, but it works !
I'm throwing the towel on this issue.
Thank you for your trying my plugin. I set up linux environment and confirmed the reproducing. Now I'm investigating its cause but it seems to need a while to find it.
I can confirm this as well in 0.2.3 0.2.2 works fine though