amalChandran/trail-android

R8 removes the code

mihodihasan opened this issue · 1 comments

Enabling R8 clears out the code and it doesn't work. I think this happens due to the following line since that line doesn't have a strong reference.

    Route normalOverlayPolyline = new Route.Builder(mRouteOverlayView)
        .setRouteType(RouteType.PATH)
        .setCameraPosition(mMap.getCameraPosition())
        .setProjection(mMap.getProjection())
        .setLatLngs(mRoute)
        .setBottomLayerColor(Color.YELLOW)
        .setTopLayerColor(Color.RED)
        .create();

adding the following rule solves the problem
-keep class com.amalbit.trail.AnimationRouteHelper { *;}