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

Circular task dependency with createORMLiteConfigFileRelease #23

Open
TheKeeperOfPie opened this issue Jan 12, 2018 · 11 comments
Open

Circular task dependency with createORMLiteConfigFileRelease #23

TheKeeperOfPie opened this issue Jan 12, 2018 · 11 comments

Comments

@TheKeeperOfPie
Copy link

We were previously on 1.0.13 and upgraded to 3.0.3 along side an AGP 3.0 upgrade.

Not sure what's causing this though.

FAILURE: Build failed with an exception.

* What went wrong:
Circular dependency between the following tasks:
:android:compileReleaseJavaWithJavac
+--- :android:compileReleaseKotlin
|    +--- :android:kaptReleaseKotlin
|    |    \--- :android:kaptGenerateStubsReleaseKotlin
|    |         \--- :android:processReleaseResources
|    |              \--- :android:mergeReleaseResources
|    |                   \--- :android:fabricGenerateResourcesRelease
|    |                        \--- :android:mergeReleaseAssets
|    |                             \--- :android:createORMLiteConfigFileRelease
|    |                                  +--- :android:compileReleaseJavaWithJavac (*)
|    |                                  \--- :android:compileReleaseKotlin (*)
|    \--- :android:processReleaseResources (*)
+--- :android:generateReleaseSources
|    \--- :android:processReleaseResources (*)
+--- :android:javaPreCompileRelease
|    \--- :android:compileReleaseKotlin (*)
+--- :android:kaptReleaseKotlin (*)
\--- :android:processReleaseResources (*)

@TheKeeperOfPie TheKeeperOfPie changed the title Circular task dependency with createORMLiteConfigFileForRelease Circular task dependency with createORMLiteConfigFileRelease Jan 12, 2018
@stephanenicolas
Copy link
Owner

stephanenicolas commented Jan 13, 2018 via email

@TheKeeperOfPie
Copy link
Author

Yes, I can reproduce in a sample.

It seems this is actually a conflict with the Fabric plugin.

If you create a new project in AS with all the defaults and replace the top of app's build.gradle with this, it'll occur:

buildscript {
    repositories {
        jcenter()
        google()
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath "io.fabric.tools:gradle:1.25.1"
        classpath "com.github.stephanenicolas.ormgap:ormgap-plugin:3.0.3"
    }
}

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

apply plugin: 'ormgap'

apply plugin: 'io.fabric'

@TheKeeperOfPie
Copy link
Author

Also, semi-related, but I noticed the plugin has a explicit dependency on 3.0.0-beta7. That actually makes the default project not resolve given your snippet in the README. You actually need the jcenter() and google() repositories in the block.

@karmil32
Copy link

karmil32 commented May 3, 2018

Got same issue. Have you found a solution?

@stephanenicolas
Copy link
Owner

One simple work around could be to separate the code that uses fabric in a new module. That's what we currently do at Groupon.

As the fabrics plugin always triggers a change in the resources on every build, by isolating it in a small module we make our builds more cacheable, especially on CI.

You can have a module architecture like this:

  • app: your application class and the code setting it up. This module will use the fabrics plugin.
  • lib: the rest of your android code. This module will use the ORM GAP plugin.

@stephanenicolas
Copy link
Owner

I would gladly merge a PR that would update the GAP version.

@yoav-yanuka
Copy link

Is there another solution to this Issue?

@vyguera
Copy link

vyguera commented Aug 2, 2018

The 9th September 2018 Google Firebase is planing to stop maintaining its current Crash Reporting Library and is beginning to use Crashlytics for it. As Crashlytics uses Fabric, this issue will happen more an more frequently.

I cant wait more to be solved and I'm planning to migrate to Kripton Orm which first doesn't use Fabric, and second doesn't use a gradle plugin but annotationProcessor. Besides Kripton strengths makes it a better choice given my app arquitecture.

@Vlad-M-1
Copy link

Vlad-M-1 commented Jan 15, 2019

I confirm, I can't use 3.0.4 because of this circular dependency problem either.

@alonver
Copy link

alonver commented Apr 21, 2019

Hey, is there a plan to fix this?

@stephanenicolas
Copy link
Owner

stephanenicolas commented Apr 22, 2019 via email

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

7 participants