Skip to content

Conversation

@marandaneto
Copy link
Member

@marandaneto marandaneto commented Nov 5, 2025

💡 Motivation and Context

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

Comment on lines +100 to +102
# Uncomment this to preserve the line number information for
# debugging stack traces.
-keepattributes SourceFile,LineNumberTable
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by default this is stripped out from the apk

@marandaneto marandaneto marked this pull request as ready for review December 1, 2025 10:17
@marandaneto marandaneto requested a review from a team as a code owner December 1, 2025 10:17
@marandaneto marandaneto changed the title chore: initial proguard support chore: proguard support Dec 1, 2025
}

// TODO: CLI path config
args.add("posthog-cli")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will fail if posthog-cli is not installed. Is there a way to run a 'which posthog-cli' here and grab the path?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which posthog-cli will only return a path if its within the $PATH anyway, and in this case, the command above wont fail.
this will require posthog-cli to be installed, the dif from Xcode is that this has access to the full $PATH env. var. differently than Xcode that is very limited

dependencies {
compileOnly(gradleApi())
// pinned to 8.0.x so we compile against the min. supported version.
compileOnly("com.android.tools.build:gradle:8.0.2")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking, this means that users can use any AGP 8.x.x right, not only 8.0.x?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as the 8.x isnt breaking any public APIs we depend on.

return field
}

if (!field.get().asFile.name.equals(name)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I completely get what this is doing exactly, but can't we do this in taskAction() proactively instead of the getter?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is called twice

outputDir = InjectPostHogMetaPropertiesIntoAssetsTask::outputDir,

so i'd have to duplicate or extract to a method, and then if we need a 3rd time i'd need to remember that i have to call a method before, this ensures that whenever we need to read this property, the getter does the job.
its not pretty but it means we dont have to remember this workaround nor duplicate code

Copy link
Collaborator

@ioannisj ioannisj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I can do more in-depth technical review here. LG to me, plus most of this is tested code already so 👍

@marandaneto marandaneto merged commit 35c1449 into main Dec 1, 2025
17 checks passed
@marandaneto marandaneto deleted the chore/progaurd-support branch December 1, 2025 16:11
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.

3 participants