BestBurning / platform_device_id

flutter plugin to get device id
https://pub.dev/packages?q=platform_device_id
BSD 3-Clause "New" or "Revised" License
81 stars 203 forks source link

Remove Build Script Constraint #47

Open timothyao opened 10 months ago

timothyao commented 10 months ago

Remove buildscript constraint to allow the plugin work with future version

moazelsawaf commented 6 months ago

The removal of the Kotlin Version will not help bypassing the build constraints, the build will fail trying to find the Kotlin Version like the following:

Launching lib/main.dart on sdk gphone64 arm64 in debug mode...

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file '/Users/moazelsawaf/.pub-cache/git/platform_device_id-b3f425e079ee735b06fb826e5735c0025e4ba8c1/platform_device_id/android/build.gradle' line: 12

* What went wrong:
A problem occurred evaluating project ':platform_device_id'.
> Could not get unknown property 'kotlin_version' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':platform_device_id'.
> Failed to notify project evaluation listener.
   > Could not get unknown property 'android' for project ':platform_device_id' of type org.gradle.api.Project.
   > Could not find method implementation() for arguments [project ':device_info'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
   > Could not get unknown property 'android' for project ':platform_device_id' of type org.gradle.api.Project.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
Error: Gradle task assembleDebug failed with exit code 1

Exited (1).
timothyao commented 6 months ago

@moazelsawaf We all know this is not the ideal solution. It is a temporary solution that worked for me and allowed me to complete my project with minimal changes to the codebase, while we wait for the author.

If you are able to resolve the problem, using a more elegant approach, please share with the community.

Best Reagrds