OP-Engineering / op-sqlite

Fastest SQLite library for react-native by @ospfranco
MIT License
598 stars 41 forks source link

Android compilation error due to missing kotlinVersion (with fix) #56

Closed christophemarois closed 9 months ago

christophemarois commented 9 months ago

Describe the bug

After upgrading op-sqlcipher from 1.0.8 to 1.0.18, compilation suddenly fails with:

A problem occurred configuring project ':op-engineering_op-sqlcipher'.
> Could not determine the dependencies of null.
   > Could not resolve all task dependencies for configuration ':op-engineering_op-sqlcipher:classpath'.
      > Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:null.
        Searched in the following locations:
          - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/null/kotlin-gradle-plugin-null.pom
          - https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-gradle-plugin/null/kotlin-gradle-plugin-null.pom
        Required by:
            project :op-engineering_op-sqlcipher

Manually specifying a kotlinVersion in ./android/build.gradle fixes it.

buildscript {
    ext {
        kotlinVersion="1.8.10"
    }
}

It looks like this line (which didn't change between .8 and .18 from what I'm seeing) used to work, but now returns null.

https://github.com/OP-Engineering/op-sqlite/blob/c5f492b025e13e8c381cf3bb3fc784ffb99b5adb/android/build.gradle#L9

I understand that this kind of gradle error can be a wack-a-mole, but putting this out here in case you have an idea what this is (or if it can help others).

Thank you for your time!

Versions:

ospfranco commented 9 months ago

Thanks for noticing, turns out I made a mistake and ignored the gradle.properties file at some point. Will be fixed on the next version.