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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AndroidComponents API support #3

Merged
merged 17 commits into from Jun 3, 2022
Merged

AndroidComponents API support #3

merged 17 commits into from Jun 3, 2022

Conversation

dkostyrev
Copy link
Contributor

  • Refactored ParanoidPlugin so it can be applied to java modules as well as android modules.
  • Introduced support for Android Components Variant API for projects using AGP >= 7.2.0. In this case paranoid plugin should be applied to every module that declares @Obfuscate annotation.
  • Classes transformed by paranoid plugin now marked with special attribute (see WatermarkClassVisitor), so ParanoidProcessor can validate paranoid plugin usage by checking whether this attribute is present in should-be-transformed classes available in classpath.
  • Deprecated some paranoid extension properties, since they are no longer applicable for projects transformed by ParanoidTransformTask.

@dkostyrev dkostyrev requested review from a team and satween and removed request for a team June 2, 2022 14:16
private val isDirtyByDefault: Boolean = false,
) : ClassVisitor(asmApi, classVisitor) {

var isDirty: Boolean = false
Copy link

Choose a reason for hiding this comment

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

точно ли должно тут это проперти в public торчать?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

копипастил из colonist, вроде нет причины наружу торчать

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

private const val IS_ENABLED_DEPRECATION_WARNING = "paranoid.enabled is deprecated. Use paranoid.applyToBuildTypes"
Copy link

Choose a reason for hiding this comment

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

тут можно через ReplaceWith прописать, чтобы в студии автозамену можно было сделать

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

)

try {
processor.process()
Copy link

Choose a reason for hiding this comment

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

может validate() и cleanOutPut() тоже под try-catch затянуть, чтобы в случае всяких IOException-ов было понятно что за таска?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Мне кажется оно и так понятно будет какая таска упала, но обернул

}
var isCacheable: Boolean = false
var includeSubprojects: Boolean = false
var isEnabled: Boolean by deprecatedProperty(true, IS_ENABLED_DEPRECATION_WARNING)
Copy link

Choose a reason for hiding this comment

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

может тут кастомный getter-setter сделать, чтобы оно applyToBuildTypes выставляло, тогда можно будет в новом коде уже не использовать isEnabled и избавиться от @Suppress("DEPRECATION")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -9,6 +9,7 @@ allprojects {
buildscript {
repositories {
google()
mavenLocal()
Copy link

Choose a reason for hiding this comment

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

В комментарии к коммиту говориться "Add mavenCentral to repositories..." скорее всего опечатка, и имелось в виду все-таки mavenLocal, но решил обратить внимание на всякий пожарный

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@dkostyrev dkostyrev merged commit ee88733 into develop Jun 3, 2022
@dkostyrev dkostyrev deleted the android-components branch June 3, 2022 09:42
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