trello-archive / victor

Use SVGs as resources in Android
Apache License 2.0
1.01k stars 49 forks source link

Gradle 2.12 #37

Closed IgorGanapolsky closed 8 years ago

IgorGanapolsky commented 8 years ago

I switched to gradle 2.12, and now I am getting an error:

Failed to apply plugin [id 'com.trello.victor'] Could not create an instance of type org.gradle.api.internal.file.DefaultSourceDirectorySet_Decorated.

Please advise, Igor

dlew commented 8 years ago

I'll look into it soon, but for now my advice is to not upgrade to 2.12.

We use DefaultSourceDirectorySet but may need to switch to something else...

dlew commented 8 years ago

For reference, a thread I started on the Gradle forums about it: https://discuss.gradle.org/t/defaultsourcedirectoryset-alternative/15193/

Apparently we need to implement our own SourceDirectorySet since there's no stable one provided by Gradle. Fun times.

dlew commented 8 years ago

There's still no easy way to go straight from SVG -> Android besides Victor. I don't want to run an SVG -> Android drawable wizard every time. So this will remain supported until then. (Maybe someday it'll even do SVG -> Android drawable, if we get time.)

IgorGanapolsky commented 8 years ago

On the gradle forum, one guy suggested to do this: project.android.sourceSets.all { sourceSet -> sourceSet.extensions.add('svg', factory.create('svg')) }

Do you think this is a reasonable solution? I am not familiar enough with Groovy to make a determination...

dlew commented 8 years ago

I think that's probably also fine, either solution works. I just went with what the Kotlin plugin chose to do.

IgorGanapolsky commented 8 years ago

@dlew Thanks for the hard work! Will this be part of 0.1.5 release? @changetip $1

changetip commented 8 years ago

Hi @dlew, I've delivered a tip worth 2,379 bits ($1.00) from @IgorGanapolsky.

Learn about ChangeTip

dlew commented 8 years ago

Thanks! This will be in 0.1.6, though at some point I ought to just call it 1.0. :P

Droidcon SF will probably delay the release (since I'm going to be quite busy for the next couple days), but it'll be out sometime in the next week.