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

Depend on AGP API artifact only #94

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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`.
@@ -157,14 +156,18 @@ class SecretsPluginTest {

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