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

Task :app:objectboxTransformDebugUnitTest fail on Kotlin 1.7 #1085

Closed
chakflying opened this issue Jul 5, 2022 · 3 comments
Closed

Task :app:objectboxTransformDebugUnitTest fail on Kotlin 1.7 #1085

chakflying opened this issue Jul 5, 2022 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@chakflying
Copy link

chakflying commented Jul 5, 2022

Describe the bug
Looks like Kotlin 1.7 has some gradle changes which broke the task. The app builds fine otherwise.
Link to relevant (?) Kotlin compatibility guide entry here.

Error shown on build:

java.lang.NoSuchMethodError: 'java.io.File org.jetbrains.kotlin.gradle.tasks.KotlinCompile.getDestinationDir()'
	at io.objectbox.gradle.transform.ObjectBoxAndroidTransform$Registration$addDestinationDirOfKotlinCompile$1.transform(ObjectBoxAndroidTransform.kt:164)

Basic info (please complete the following information):

  • ObjectBox version (are you using the latest version?): 3.2.0
  • Reproducibility: always

To Reproduce
Steps to reproduce the behavior:

  1. Upgrade app to Kotlin 1.7
  2. Run Unit Test
  3. See error

Dependencies

    debugImplementation "io.objectbox:objectbox-android-objectbrowser:$objectboxVersion"
    releaseImplementation "io.objectbox:objectbox-android:$objectboxVersion"
    kapt("io.objectbox:objectbox-processor:$objectboxVersion")
    implementation("io.objectbox:objectbox-kotlin:$objectboxVersion")
@chakflying chakflying added the bug Something isn't working label Jul 5, 2022
@greenrobot-team
Copy link
Member

greenrobot-team commented Jul 5, 2022

Thanks! We already have an internal issue for that and can reproduce this.

Until we release an updated Gradle plugin the workaround is to stick with Kotlin 1.6.

@greenrobot-team greenrobot-team added this to the 3.2.1 milestone Jul 6, 2022
@greenrobot-team
Copy link
Member

Release 3.2.1 which fixes this issue is now available.

@alonzim
Copy link

alonzim commented Jul 6, 2022

3.2.1 fixes the issue for me

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

3 participants