Skip to content

Conversation

@Goooler
Copy link

@Goooler Goooler commented Sep 5, 2024

Avoid using AGP internal APIs in this plugin, we have fully migrated to AndroidComponentsExtension.

Avoid using AGP internal APIs in this plugin, we have fully migrated to `AndroidComponentsExtension`.
private fun check(vararg keyValues: Pair<String, String>) {
keyValues.forEach { (key, value) ->
Assert.assertEquals(value, placeholders[key])
verify(variant).buildConfigField("String", key, value.addParenthesisIfNeeded())
Copy link
Author

Choose a reason for hiding this comment

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

This assertion step looks wrong. I guess you want to assert that the key-paired buildConfigField exists?

private fun checkKeysNotIn(vararg keys: String) {
keys.forEach {
Assert.assertFalse(placeholders.containsKey(it))
assertTrue(variant.manifestPlaceholders.getting(it).orNull == null)
Copy link
Author

Choose a reason for hiding this comment

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

We can use assertFalse or assertNull here if you want.

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.

1 participant