etebase-java icon indicating copy to clipboard operation
etebase-java copied to clipboard

Library does not work in non-Android Java/Kotlin environments

Open 1fexd opened this issue 4 years ago • 1 comments

Hi,

when I add the library to my Kotlin/Java project, and try to run it, the following exception is thrown:

Execution failed for task ':compileKotlin'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not resolve com.etebase:client:2.3.2.
     Required by:
         project :
      > No matching variant of com.etebase:client:2.3.2 was found. The consumer was configured to find an API of a library compatible with Java 15, preferably in the form of class files, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but:
          - Variant 'releaseApiPublication' capability com.etebase:client:2.3.2 declares an API of a library, and its dependencies declared externally:
              - Incompatible because this component declares a component, with the library elements 'aar' and the consumer needed a component, preferably in the form of class files
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 15)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')
          - Variant 'releaseRuntimePublication' capability com.etebase:client:2.3.2 declares a runtime of a library, and its dependencies declared externally:
              - Incompatible because this component declares a component, with the library elements 'aar' and the consumer needed a component, preferably in the form of class files
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 15)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')

* 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.

1fexd avatar May 12 '21 10:05 1fexd

Yeah, it's a known issue. It's Android only at the moment. I was trying to get help with making it jvm friendly, but we have no idea how. The problem is that we use jni and it's done differently on the jvm.

tasn avatar May 13 '21 12:05 tasn