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

[Authenticator] The library should declare the needed consumer proguard rules #2797

Open
2 tasks done
pmellaaho opened this issue Apr 29, 2024 · 3 comments
Open
2 tasks done
Labels
auth Related to the Auth category/plugins bug Something isn't working

Comments

@pmellaaho
Copy link

pmellaaho commented Apr 29, 2024

Before creating a new issue, please confirm:

Which UI component?

Authenticator

Gradle script dependencies

// Put output below this line
authenticatorVersion = "1.1.0"

Environment information

# Put output below this line
Gradle 8.5

Please include any relevant guides or documentation you're referencing

No response

Describe the bug

When I'm doing a release build of my App that uses Amplify UI I get the following:

> Task :app:minifyReleaseWithR8 AGPBI: {"kind":"warning","text":"Missing class kotlinx.parcelize.Parcelize (referenced from: com.amplifyframework.notifications.pushnotifications.NotificationContentProvider$FCM and 2 other contexts)","sources":[{}],"tool":"R8"}

I can get around this by including the following in my proguardrules.pro
-dontwarn kotlinx.parcelize.Parcelize*

But the needed rules should really come with the library

Reproduction steps (if applicable)

No response

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line
AGPBI: {"kind":"warning","text":"Missing class kotlinx.parcelize.Parcelize (referenced from: com.amplifyframework.notifications.pushnotifications.NotificationContentProvider$FCM and 2 other contexts)","sources":[{}],"tool":"R8"}

amplifyconfiguration.json

No response

Additional information and screenshots

No response

@github-actions github-actions bot added the pending-triage Issue is pending triage label Apr 29, 2024
@joon-won joon-won added the bug Something isn't working label Apr 29, 2024
@github-actions github-actions bot removed the pending-triage Issue is pending triage label Apr 29, 2024
@mattcreaser
Copy link
Contributor

This appears to be coming from the underlying Amplify library, not from Authenticator. Authenticator does not use push notifications. Transferring the issue there.

@mattcreaser mattcreaser transferred this issue from aws-amplify/amplify-ui-android Apr 29, 2024
@github-actions github-actions bot added the pending-triage Issue is pending triage label Apr 29, 2024
@joon-won joon-won added auth Related to the Auth category/plugins and removed pending-triage Issue is pending triage labels Apr 30, 2024
@vincetran
Copy link
Contributor

Hi @pmellaaho, I've looked at this report and have been unable to reproduce this issue. In my sample app, I have the following Amplify dependencies:

    val amplify = "2.17.0"
    implementation("com.amplifyframework:core:$amplify")
    implementation("com.amplifyframework:aws-api:$amplify")
    implementation("com.amplifyframework:aws-datastore:$amplify")
    implementation("com.amplifyframework:aws-auth-cognito:$amplify")
    implementation("com.amplifyframework:aws-push-notifications-pinpoint:$amplify")

I have minify enabled and have the default empty proguard rules:

debug {
    isMinifyEnabled = true
    proguardFiles(
        getDefaultProguardFile("proguard-android-optimize.txt"),
        "proguard-rules.pro"
    )
}

Yet I'm able to build and minify without issue. Can you provide any more details that would suggest the library is at fault?

@vincetran vincetran added the pending-response Issue is pending response from the issue requestor label May 21, 2024
@pmellaaho
Copy link
Author

Hello, thanks for looking into this.
I have the following dependencies:

authenticator = { module = "com.amplifyframework.ui:authenticator", version.ref = "authenticatorVersion" } aws-auth-cognito = { module = "com.amplifyframework:aws-auth-cognito", version.ref = "awsAuthCognitoVersion" } core-kotlin = { module = "com.amplifyframework:core-kotlin", version.ref = "coreKotlinVersion" }

I'm not sure which changes in my code has made the build warning to go away but I'm not seeing it anymore either. I have to return to this subject if the problem appears later again.

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue requestor label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Related to the Auth category/plugins bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants