Skip to content

Commit

Permalink
Eliminate the need for import re in a BUCK file.
Browse files Browse the repository at this point in the history
Reviewed By: mzlee

Differential Revision: D4550304

fbshipit-source-id: 59a101a35ea33aa8043046f64b675fab0f6f889a
  • Loading branch information
bolinfest authored and dudeinthemirror committed Mar 1, 2017
1 parent 9c2f571 commit a7152eb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions local-cli/templates/HelloWorld/android/app/BUCK
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import re

# To learn about Buck see [Docs](https://buckbuild.com/).
# To run your application with Buck:
# - install Buck
Expand All @@ -12,15 +10,15 @@ import re

lib_deps = []
for jarfile in glob(['libs/*.jar']):
name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
lib_deps.append(':' + name)
prebuilt_jar(
name = name,
binary_jar = jarfile,
)

for aarfile in glob(['libs/*.aar']):
name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
name = 'aars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.aar')]
lib_deps.append(':' + name)
android_prebuilt_aar(
name = name,
Expand Down

0 comments on commit a7152eb

Please sign in to comment.