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

Android Sample App: compilation fails with latest Kotlin and Gradle version #16

Open
cee-dee opened this issue Oct 30, 2020 · 4 comments

Comments

@cee-dee
Copy link

cee-dee commented Oct 30, 2020

When updating the included sample app to the latest Kotlin and Gradle version, one gets compilation errors:

...\autodsl\samples\android-autodsl\app\build\tmp\kapt3\stubs\debug\com\autodsl\sample\AnimSequence.java:7: error: There was an error while processing your annotated classes. error = 
public final class AnimSequence implements com.autodsl.sample.Anim {
             ^...\autodsl\samples\android-autodsl\app\build\tmp\kapt3\stubs\debug\com\autodsl\sample\AnimTogether.java:7: error: There was an error while processing your annotated classes. error = 
public final class AnimTogether implements com.autodsl.sample.Anim {
             ^...\autodsl\samples\android-autodsl\app\build\tmp\kapt3\stubs\debug\com\autodsl\sample\TranslateX.java:7: error: There was an error while processing your annotated classes. error = 
public final class TranslateX extends com.autodsl.sample.TranslateAnim {
             ^

Changed files are

gradle-wrapper.properties

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip\
  zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

build.gradle

buildscript {
    ext.kotlin_version = '1.4.10'
    ext.autodsl_version = '0.0.11'
    ...
    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'
        ...
    }
}

Is this already known? Is there a fix or workaround?

@juanchosaravia
Copy link
Owner

Thanks for filling an issue! I'll take a look

@ckmcd
Copy link

ckmcd commented Dec 12, 2020

Eeeks. I am seeing the same. Any updates? I am using maven and not gradle if that helps eliminate that. I am also using Kotlin 1.4.10 but with autodsl 0.0.10.

@juanchosaravia
Copy link
Owner

juanchosaravia commented Dec 13, 2020

I found the issue. The problem is with the library that I use to parse Kotlin Metadata:
me.eugeniomarletti.kotlin.metadata:kotlin-metadata:1.4.0

It doesn't support the new metadata format in Kotlin 1.4.x and there is no new available release version. Probably because a new kotlinx-metadata parsing lib is being developed by JetBrains:
https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-metadata-jvm/0.2.0/jar

So the workaround would be go to back to Kotlin 1.3.72 and you can use the latest gradle version.

I'm going to work in a proper solution for this. I'll have to review the new jetbrain kotlinx-metadata lib to see if I can do the same for 1.4.x Kotlin version or update eugeniomarletti lib.

@juanchosaravia
Copy link
Owner

juanchosaravia commented Dec 14, 2020

Reviewing kotlinx-metadata-jvm version 0.2.0, it's far from bringing all the required data to replace eugenio's lib.
And in Eugenio's github repo there is already an issue reported about this:
Takhion/kotlin-metadata#15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants