Open talentedbrute opened 3 years ago
The obfuscation mapping that is generated when ATAK is built in release mode must be fed as an input into the plugin's build so that the plugin properly refers to the obfuscated API.
For local builds, this will require placing the mapping file in a specific location relative to your plugin project. Please see https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/blob/master/atak-gradle-takdev/src/main/groovy/com/atakmap/gradle/takdev/TakDevPlugin.groovy#L123 to get insight into the locations where the mapping file is being searched for.
Thanks for the insight. I moved my plugin code into the ATAK source folders so the paths line up but I still get the same error above. I have rebuilt and reinstalled ATAK and the plugin.
@tareed I would suggest building the atak-gradle-takdev
plugin locally and adding some debugging statements to determine if the mapping file is properly being discovered. Assuming everything is good, the proguard mapping from the ATAK release build should get copied to <plugin-root>/app/build/proguard-<variant>-release-mapping.txt
. It should be ~8MB in size. The path to this file gets set on the system property, atak.proguard.mapping
, which should be getting applied via the plugin's proguard configuration (see https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/blob/master/plugin-examples/plugintemplate/app/proguard-gradle.txt#L10).
Unfortunately, without seeing the project or how the development environment is configured, I can't provide much guidance outside of suggesting that it sounds like the proguard mapping from the ATAK release build is not properly being consumed by the plugin release build.
While I look at your other suggestions here is how the dev environment is configured. I am building this on Ubuntu 18.04, I have the latest 4.2.0 baseline pulled and I have moved my plugins folder inside of the root atak source folder (see screenshot). This way the paths lines up with what you suggested.
Solved it. Here is what I had to do to solve this.
The missing piece for me was the keystore, once I created a softlink to my real keystore it worked just fine. The atak-gradle-taskdev plugin is checking the location of main.jar, mapping.txt and android_keystore to determine what type of build this is going to be (online or offline). To do what I needed I needed it to be an online build.
@tareed We'll look to resolve this in the atak-gradle-takdev
plugin in one of the upcoming releases.
Have successfully built and deployed a 4.2 release version of TAK onto a Samsung Tab A. Unable to install a release version of the HelloWorld plugin. Using a debug version of TAK and a debug version of the plugin works. The same signing keys are used for TAK and the plugins.
Attempting the same thing with our home gown plugin. Release version fails to install but debug version works.