Skip to content

Gradle 5.0 - push() api behaviour changed #519

@OleksandrKucherenko

Description

@OleksandrKucherenko

https://github.com/getsentry/react-native-sentry/blob/96f09af56c6a85e1548acf6fea45be6ef3d44a07/sentry.gradle#L123-L149

What is wrong:
args.push("line") add line in front of the array, but expected add into end.

Details:

Gradle v4.10.2 Exec.arguments: 
[/Users/oleksandr.kucherenko/projects/klarna-app/clients/node_modules/@sentry/cli/bin/sentry-cli, react-native, gradle, --bundle, /Users/oleksandr.kucherenko/projects/klarna-app/clients/android/app/build/generated/assets/react/yellow/release/index.android.bundle, --sourcemap, /Users/oleksandr.kucherenko/projects/klarna-app/clients/android/app/build/generated/assets/react/yellow/release/index.android.bundle.map, --release, net.klarna.app.yellow.int-1.0.0A, --dist, 1]

How arguments array looks in Gradle v5.0:

Gradle v5.0 Exec.arguments: 
[net.klarna.app.yellow.int-1.0.0A, --release, /Users/oleksandr.kucherenko/projects/klarna-app/clients/android/app/build/generated/assets/react/yellow/release/index.android.bundle.map, --sourcemap, /Users/oleksandr.kucherenko/projects/klarna-app/clients/android/app/build/generated/assets/react/yellow/release/index.android.bundle, --bundle, gradle, react-native, /Users/oleksandr.kucherenko/projects/klarna-app/clients/node_modules/@sentry/cli/bin/sentry-cli, --dist, 1]

Solution:

  • replace all push() calls by add() or insert()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions