I’m trying to migrate my project from ANT to Gradle, and i have stumbled upon a certain issue.
I need to access android @hidden field (without reflection), so far i have had a custom built java class (example: ConnectivityManager to get TYPE_WIFI_P2P). Note that this custom class was used only as a reference (excluded from actual apk).
The problem is that the Gradle is accessing the ‘unmodified’ ConnectivityManager class (provided by the android sdk) instead of the custom one. Is there a way to shadow it?
In Ant to do this i had the following:
<path id="project.javac.exclude.classpath">
<path refid="my.custom.android.sdk"/>
<path refid="the.original.android.sdk"/>
</path>
<javac ... bootclasspathref="project.javac.exclude.classpath" ...>
With this i was able to use ‘modified’ ConnectivityManager.
How do I reproduce this behaviour using Gradle?