cuplv / biggroum

Top-level project for the graph extraction
Apache License 2.0
8 stars 2 forks source link

API finalize should be robust to a build that generates multiple targets #70

Open ftc opened 4 years ago

ftc commented 4 years ago

Some builds will generate multiple versions of an app creating several classes.

e.g.

root@5db2c9353c41:/fpp# find ./ -name "MainActivity.class"
./analyzing-3354dff4a11388be/MapboxAndroidWearDemo/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/mapbox/mapboxandroiddemo/MainActivity.class
./analyzing-3354dff4a11388be/MapboxAndroidDemo/build/intermediates/javac/globalDebug/compileGlobalDebugJavaWithJavac/classes/com/mapbox/mapboxandroiddemo/MainActivity.class
./analyzing-3354dff4a11388be/MapboxAndroidDemo/build/intermediates/javac/chinaDebug/compileChinaDebugJavaWithJavac/classes/com/mapbox/mapboxandroiddemo/MainActivity.class

The finalize command currently searches for any class file:

https://github.com/cuplv/biggroum/blob/fix_docker/python/fixrgraph/extraction/extract_single.py#L31

This should be updated to intelligently choose one version of the app.

Current workaround is to build with a command for only one release:

e.g. for mapbox:

./gradlew compileGlobalDebugSources