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

Android Studio Warning!: Space-assignment syntax in Groovy DSL has been deprecated! #1173

Open
1 of 5 tasks
kaangrbz opened this issue Jan 14, 2025 · 0 comments
Open
1 of 5 tasks
Labels
bug Something isn't working

Comments

@kaangrbz
Copy link

What happened?

Problem

Problem occured while syncing gradle at Android Studio Ladybug version.

Version

Android gradle plugin: 8.7.0
Gradle: 8.12

Description

Android Studio gives me warning about updating the gradle file because usage at line 98 is deprecated and used like below
project_root/node_modules/@react-native-async-storage/async-storage/android/build.gradle

old usage

...
        url "${project.ext.resolveModulePath("react-native")}/android" // line 98
...

new usage

...
        url = "${project.ext.resolveModulePath("react-native")}/android" // line 98
...

Why?

Because 'these generated methods are now deprecated and will be removed in Gradle 10.0, and both propertyName value and propertyName(value) will stop working unless the explicit method propertyName is defined. Use explicit assignment propertyName = value instead.'

Read more at this link: Upgrading your build gradle from Gradle 8.x to latest

Version

2.1.0

What platforms are you seeing this issue on?

  • Android
  • iOS
  • macOS
  • Windows
  • web

System Information

System:
  OS: macOS 13.7.2
  CPU: (4) x64 Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
  Memory: 44.95 MB / 8.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.20.3
    path: ~/.nvm/versions/node/v18.20.3/bin/node
  Yarn:
    version: 4.6.0
    path: ~/.nvm/versions/node/v18.20.3/bin/yarn
  npm:
    version: 10.8.1
    path: ~/.nvm/versions/node/v18.20.3/bin/npm
  Watchman:
    version: 2024.12.02.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23339.11.2421.12700392
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: javac 17
    path: /Users/user/.sdkman/candidates/java/current/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.5
    wanted: 0.76.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Steps to Reproduce

Updated the build.gradle file as below:

old usage

...
        url "${project.ext.resolveModulePath("react-native")}/android" // line 98
...

new usage

...
        url = "${project.ext.resolveModulePath("react-native")}/android" // line 98
...
@kaangrbz kaangrbz added the bug Something isn't working label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant