Skip to content

[Bug]: I cant get to compile with the last commit on main branch ? #1930

@tmijieux

Description

@tmijieux

What happened?

I checkout the last commit on main 08b951c by 2 december 2023
And it does not compile.

The delegated property seems to have wrong syntax ? 896ec50

Compilation just failed with the following error message:
e: C:\...\OneSignal-Android-SDK\OneSignalSDK\onesignal\src\main\java\com\onesignal\NotificationPermissionController.kt: (45, 42): Function invocation 'lazy(...)' expected

Also when fixing by removing the equals assignment sign , there is another error that says the attribute is not applicable on delegated properties.

I believe the correct version is:

    val supportsNativePrompt: Boolean by lazy {
        Build.VERSION.SDK_INT > 32 &&
            OSUtils.getTargetSdkVersion(OneSignal.appContext) > 32
    }

Steps to reproduce?

just checkout 08b951c99243188c8616d8de10d04e5bfcb0b01b and build in Android Studio

What did you expect to happen?

it should compile just fine.

OneSignal Android SDK version

main 08b951c

Android version

13

Specific Android models

No response

Relevant log output

`  e: C:\...\OneSignal-Android-SDK\OneSignalSDK\onesignal\src\main\java\com\onesignal\NotificationPermissionController.kt: (45, 42): Function invocation 'lazy(...)' expected`

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions