Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculates path to mapping file on non-dexguarded builds #1

Conversation

ubiratansoares
Copy link

Hi 馃憢馃徏

What

Rising this PR as per suggestion given in this thread from Guardsquare community

How

This PR enables the upload of mapping.txt file for non Dexguarded builds by calculating the conventional path

<buildDir>/outputs/mapping/<variant>/mapping.txt

when registering the appsweep tasks for project's variants.

Tested locally and it seems the upload is working fine.

@titze
Copy link
Contributor

titze commented Aug 9, 2021

Hi @ubiratansoares,

thanks for the PR, but unfortunately I think it does not work reliably this way.

Before, we depended on the Dexguard-task, which meant that we would run after the Dexguard-task which created the mapping.txt file (if it existed).

Lets assume a Proguard-task creates this mapping-file, then we do not specify that we want to run after this task, and the execution order could be:

  1. AppSweep-Task
  2. Proguard-Task

then 1) would either not see any mapping-file or (maybe worse), take a stale mapping-file from a previous execution.

The way to solve this would be the @InputFile annotation, but we would first need to check if all other Gradle plugins mark the mappingfile.txt as @OutputFile. (This is true for Proguard and Dexguard, but I am not sure about others)

I can also create a task for us to look into it, if you prefer that we take this up?

@ubiratansoares
Copy link
Author

ubiratansoares commented Aug 9, 2021

Hi @titze, thanks for the reply.

I do see the issue now!

Jooc I had some look on AGP sources but could not confirm if it will mark mapping.txt as an output file at all 馃槩

Maybe I missed something ... In any case, maybe it is a better idea Guardsquare taking this task as you've suggested, most likely you folks will have more time and resources to tackle it.

I tried the quick win; when it works it is great, when it doesnt, it is OK too 馃檪

Thanks for taking some time for reviewing my PR! Looking forward for the upcoming releases!

@ubiratansoares ubiratansoares deleted the ufs/upload-mappings-for-all-builds branch August 9, 2021 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants