I'm trying to add several libraries, such as fresco to a buck project. Here is the code that adds fresco:
maven/BUCK
### Package com.facebook.fresco:fresco
remote_file(
name = 'com_facebook_fresco__fresco-remote',
out = 'com_facebook_fresco__fresco-remote.aar',
sha1 = '86df1ab4b0074e1aeceb419593d2ea6d97cdc3b4',
url = 'http://repo1.maven.org/maven2/com/facebook/fresco/fresco/0.11.0/fresco-0.11.0.aar'
)
android_prebuilt_aar(
name = 'com_facebook_fresco__fresco',
aar = ':com_facebook_fresco__fresco-remote',
deps = [
'//maven:com_facebook_fresco__imagepipeline',
'//maven:com_facebook_fresco__drawee',
'//maven:com_facebook_fresco__imagepipeline-base',
'//maven:com_parse_bolts__bolts-tasks',
'//maven:com_android_support__support-v4',
'//maven:com_nineoldandroids__library',
'//maven:com_facebook_fresco__fbcore',
],
visibility = ['PUBLIC']
)
Here is for example a file generated by buck project --ide INTELLIJ
:
.idea/libraries/library_maven_com_facebook_fresco__fresco.xml
<component name="libraryTable">
<library name="library_maven_com_facebook_fresco__fresco">
<CLASSES>
<root url="jar://$PROJECT_DIR$/buck-out/gen/maven/com_facebook_fresco__fresco-remote/com_facebook_fresco__fresco-remote.aar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
The aar file exists in said dir.
But I get invalid classes root
Full project https://github.com/vinz243/snappy
I'm pretty sure this is a bug in Buck with the new Android project generation. You can get the old one by passing --deprecated-ij-generation
when you invoke buck project
.
You should probably file an issue for this, however :)