ehn-dcc-development / hcert-kotlin

Kotlin multiplatform implementation of the HCERT/DCC specification
Apache License 2.0
25 stars 25 forks source link

Debugging Issue with v.1.3.0 #53

Closed visualroam closed 3 years ago

visualroam commented 3 years ago

Good Morning,

at the moment im trying to add the hcert-kotlin as a dependencie to my app. I've tried a lot way to add, server versions and it always its the same.

Current way to add it:

implementation 'com.github.ehn-dcc-development.hcert-kotlin:hcert-kotlin:1.3.0' This comes from jitpack.io

Kotlin Version 1.3.21 Build Variant: Debug

But its failing with the following error message (Trying to build with android studio)

Execution failed for task ':flave:checkDebugDuplicateClasses'. Could not resolve all files for configuration ':flave:debugRuntimeClasspath'. Could not resolve com.github.ehn-dcc-development.hcert-kotlin:hcert-kotlin:1.3.0. Required by: project :flave Cannot choose between the following variants of com.github.ehn-dcc-development.hcert-kotlin:hcert-kotlin:1.3.0:

  • jvmDataGenRuntimeElements-published
  • jvmRuntimeElements-published All of them match the consumer attributes:
  • Variant 'jvmDataGenRuntimeElements-published' capability com.github.ehn-dcc-development.hcert-kotlin:hcert-kotlin:1.3.0:
  • Unmatched attributes:
  • Required com.android.build.api.attributes.BuildTypeAttr 'debug' but no value provided.
  • Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' but no value provided.
  • Found ehn.techiop.hcert.faults 'true' but wasn't required.
  • Found org.gradle.libraryelements 'jar' but wasn't required.
  • Found org.gradle.status 'release' but wasn't required.
  • Compatible attributes:
  • Required org.gradle.usage 'java-runtime' and found compatible value 'java-runtime'.
  • Required org.jetbrains.kotlin.platform.type 'androidJvm' and found compatible value 'jvm'.
  • Variant 'jvmRuntimeElements-published' capability com.github.ehn-dcc-development.hcert-kotlin:hcert-kotlin:1.3.0:
  • Unmatched attributes:
  • Required com.android.build.api.attributes.BuildTypeAttr 'debug' but no value provided.
  • Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' but no value provided.
  • Found ehn.techiop.hcert.faults 'false' but wasn't required.
  • Found org.gradle.libraryelements 'jar' but wasn't required.
  • Found org.gradle.status 'release' but wasn't required.
  • Compatible attributes:
  • Required org.gradle.usage 'java-runtime' and found compatible value 'java-runtime'.
  • Required org.jetbrains.kotlin.platform.type 'androidJvm' and found compatible value 'jvm'.

Maybe there is something i'm missing. But this wont go away, even if i change the version. Thanks for the help in advance.

nodh commented 3 years ago

Have you tried to use the dependency ehn.techiop.hcert:hcert-kotlin-jvm:1.3.0 like we do in our sample project? https://github.com/ehn-dcc-development/hcert-app-kotlin/blob/master/app/build.gradle#L68

visualroam commented 3 years ago

But this is not a jitpack Dependency if im correct. Its a Maven Github Package. So at the moment it doesnt find the package.

Execution failed for task ':flave:checkDebugDuplicateClasses'. Could not resolve all files for configuration ':flave:debugRuntimeClasspath'. Could not find ehn.techiop.hcert:hcert-kotlin-jvm:1.3.0-SNAPSHOT. Searched in the following locations:

So then I tried to open it directly under "https://maven.pkg.github.com/ehn/techiop/hcert/hcert-kotlin-jvm/1.3.0-SNAPSHOT/hcert-kotlin-jvm-1.3.0-SNAPSHOT.pom" and I get following error maven package "hcert.hcert-kotlin-jvm" does not exist under owner "ehn" (I already logged in with github name & token)

So this doesnt work either.

nodh commented 3 years ago

It works for me with this commit: https://github.com/ehn-dcc-development/hcert-app-kotlin/commit/4628972b5264ae920cc930bb235b43c4a3abebf1 -- could you please try this?

visualroam commented 3 years ago

Hey, and thanks it builded now, but i needed to increase my kotlin version which went ok