Skip to content

Kotlin v2 #1157

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

Closed
1 of 5 tasks
mrondra opened this issue Nov 6, 2024 · 7 comments
Closed
1 of 5 tasks

Kotlin v2 #1157

mrondra opened this issue Nov 6, 2024 · 7 comments
Labels
bug Something isn't working Stale

Comments

@mrondra
Copy link

mrondra commented Nov 6, 2024

What happened?

Hi,

can you please make this library compatible with kotlin v2? Right now it I get this message

ksp-1.9.24-1.0.20 is too old for kotlin-2.0.21. Please upgrade ksp or downgrade kotlin-gradle-plugin to 1.9.24.

Version

2.0.0

What platforms are you seeing this issue on?

  • Android
  • iOS
  • macOS
  • Windows
  • web

System Information

System:
  OS: macOS 15.1
  CPU: (8) arm64 Apple M1 Pro
  Memory: 115.25 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.15.1
    path: ~/.nvm/versions/node/v20.15.1/bin/node
  Yarn:
    version: 4.5.1
    path: ~/.nvm/versions/node/v20.15.1/bin/yarn
  npm:
    version: 10.7.0
    path: ~/.nvm/versions/node/v20.15.1/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/opt/cocoapods/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.1
      - iOS 18.1
      - macOS 15.1
      - tvOS 18.1
      - visionOS 2.1
      - watchOS 11.1
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23339.11.2421.12550806
  Xcode:
    version: 16.1/16B40
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.9
    path: /usr/bin/javac
  Ruby:
    version: 3.3.5
    path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Steps to Reproduce

just use kotlin-2.0.21

@mrondra mrondra added the bug Something isn't working label Nov 6, 2024
Copy link

github-actions bot commented Jan 6, 2025

This issue has been marked as stale due to inactivity. Please respond or otherwise resolve the issue within 7 days or it will be closed.

@github-actions github-actions bot added the Stale label Jan 6, 2025
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 13, 2025
@VMBindraban
Copy link

Kotlin V2 is required for react-native 0.77.

> Task :react-native-async-storage_async-storage:kspDebugKotlin FAILED

@shubhamdeol
Copy link

why this got closed?

@VMBindraban
Copy link

@krizzu

@krizzu
Copy link
Member

krizzu commented Jan 28, 2025

You can specify your Kotlin, Room and KSP versions
https://react-native-async-storage.github.io/async-storage/docs/advanced/next#configuration

@Samykills
Copy link

Samykills commented Feb 14, 2025

@krizzu can you help here, i am trying this but having some hard time mix matching the right versions -

RN version - 0.75.4

my gradle.properties

AsyncStorage_next_roomVersion=2.6.1
AsyncStorage_next_kspVersion=1.9.25-1.0.20

android/build.gradle

Image

warning i get on clean build -

Configure project :react-native-async-storage_async-storage
ksp-1.9.25-1.0.20 is too old for kotlin-2.0.21. Please upgrade ksp or downgrade kotlin-gradle-plugin to 1.9.25.
ksp-1.9.25-1.0.20 is too old for kotlin-2.0.21. Please upgrade ksp or downgrade kotlin-gradle-plugin to 1.9.25.
ksp-1.9.25-1.0.20 is too old for kotlin-2.0.21. Please upgrade ksp or downgrade kotlin-gradle-plugin to 1.9.25.
ksp-1.9.25-1.0.20 is too old for kotlin-2.0.21. Please upgrade ksp or downgrade kotlin-gradle-plugin to 1.9.25.
ksp-1.9.25-1.0.20 is too old for kotlin-2.0.21. Please upgrade ksp or downgrade kotlin-gradle-plugin to 1.9.25.
ksp-1.9.25-1.0.20 is too old for kotlin-2.0.21. Please upgrade ksp or downgrade kotlin-gradle-plugin to 1.9.25.
ksp-1.9.25-1.0.20 is too old for kotlin-2.0.21. Please upgrade ksp or downgrade kotlin-gradle-plugin to 1.9.25.
ksp-1.9.25-1.0.20 is too old for kotlin-2.0.21. Please upgrade ksp or downgrade kotlin-gradle-plugin to 1.9.25.
ksp-1.9.25-1.0.20 is too old for kotlin-2.0.21. Please upgrade ksp or downgrade kotlin-gradle-plugin to 1.9.25.
ksp-1.9.25-1.0.20 is too old for kotlin-2.0.21. Please upgrade ksp or downgrade kotlin-gradle-plugin to 1.9.25.

Error on building -

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-async-storage_async-storage:kspDebugKotlin'.
> 'org.jetbrains.kotlin.incremental.ChangedFiles com.google.devtools.ksp.gradle.KspTaskJvm.getChangedFiles(org.gradle.work.InputChanges, java.util.List)'

@LeonDvlpmnt
Copy link

If you are using Expo you can use this config plugin to specify the kotlin/ksp version:

const {
  createRunOncePlugin,
  withGradleProperties,
} = require("@expo/config-plugins");

const withAndroidAsyncStorage = (config) => {
  return withGradleProperties(config, (config) => {
    // Add Kotlin version
    config.modResults.push({
      type: "property",
      key: "AsyncStorage_kotlinVersion",
      value: "2.0.21",
    });

    // Add KSP version
    config.modResults.push({
      type: "property",
      key: "AsyncStorage_next_kspVersion",
      value: "2.0.21-1.0.28",
    });

    return config;
  });
};

module.exports = createRunOncePlugin(
  withAndroidAsyncStorage,
  "with-android-async-storage"
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

6 participants