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

Using latest version with Android, results in broken build #24

Closed
smarek opened this issue Mar 11, 2018 · 2 comments
Closed

Using latest version with Android, results in broken build #24

smarek opened this issue Mar 11, 2018 · 2 comments

Comments

@smarek
Copy link

smarek commented Mar 11, 2018

# gradle clean assemble -S --scan
Exception in thread "main" java.lang.IllegalArgumentException: Type without superclass: module-info
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:191)
        at com.google.devtools.build.android.desugar.DefaultMethodClassFixer.visit(DefaultMethodClassFixer.java:80)
        at org.objectweb.asm.ClassVisitor.visit(ClassVisitor.java:113)
        at com.google.devtools.build.android.desugar.InterfaceDesugaring.visit(InterfaceDesugaring.java:90)
        at org.objectweb.asm.ClassReader.accept(ClassReader.java:621)
        at org.objectweb.asm.ClassReader.accept(ClassReader.java:500)
        at com.google.devtools.build.android.desugar.Desugar.desugarClassesInInput(Desugar.java:475)
        at com.google.devtools.build.android.desugar.Desugar.desugarOneInput(Desugar.java:362)
        at com.google.devtools.build.android.desugar.Desugar.desugar(Desugar.java:315)
        at com.google.devtools.build.android.desugar.Desugar.main(Desugar.java:681)

Diagnosed with task :lint

> Task :lint 
Error processing /home/user/.gradle/caches/modules-2/files-2.1/org.joda/joda-convert/2.0/a18cac1a17a926b60485d9f5bf0dfff000e2d079/joda-convert-2.0.jar:module-info.class: broken class file?
Error processing /home/user/.gradle/caches/modules-2/files-2.1/org.joda/joda-convert/2.0/a18cac1a17a926b60485d9f5bf0dfff000e2d079/joda-convert-2.0.jar:module-info.class: broken class file?
Error processing /home/user/.gradle/caches/modules-2/files-2.1/org.joda/joda-convert/2.0/a18cac1a17a926b60485d9f5bf0dfff000e2d079/joda-convert-2.0.jar:module-info.class: broken class file?
Error processing /home/user/.gradle/caches/modules-2/files-2.1/org.joda/joda-convert/2.0/a18cac1a17a926b60485d9f5bf0dfff000e2d079/joda-convert-2.0.jar:module-info.class: broken class file?
Error processing /home/user/.gradle/caches/modules-2/files-2.1/org.joda/joda-convert/2.0/a18cac1a17a926b60485d9f5bf0dfff000e2d079/joda-convert-2.0.jar:module-info.class: broken class file?
Error processing /home/user/.gradle/caches/modules-2/files-2.1/org.joda/joda-convert/2.0/a18cac1a17a926b60485d9f5bf0dfff000e2d079/joda-convert-2.0.jar:module-info.class: broken class file?

Removing the files does not fix the issue.
Using Gradle identification:

------------------------------------------------------------
Gradle 4.6
------------------------------------------------------------

Build time:   2018-02-28 13:36:36 UTC
Revision:     8fa6ce7945b640e6168488e4417f9bb96e4ab46c

Groovy:       2.4.12
Ant:          Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM:          1.8.0_151 (Oracle Corporation 25.151-b12)
OS:           Linux 4.15.0-1-amd64 amd64

Update: I filed issue with Google Android Gradle support, see here: https://issuetracker.google.com/issues/74428304

@jodastephen
Copy link
Member

Android should have solved this months ago. Anyway, you now have the option to use the "classic" variant of Joda-Convert v2.0.1:

<dependency>
  <groupId>org.joda</groupId>
  <artifactId>joda-convert</artifactId>
  <version>2.0.1</version>
  <classifier>classic</classifier>
</dependency>

@smarek
Copy link
Author

smarek commented Mar 13, 2018

Thank you! I've verified the fix, and it's working correctly, let's see what Google tracker will make of this.

For documentation, only way to include "classifier" in Gradle build dependencies specification is this

dependencies {
    implementation group: 'org.joda', name: 'joda-convert', version: '2.0.1', classifier: 'classic'
}

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

No branches or pull requests

2 participants