ormlite-android-gradle-plugin icon indicating copy to clipboard operation
ormlite-android-gradle-plugin copied to clipboard

Circular task dependency with createORMLiteConfigFileRelease

Open TheKeeperOfPie opened this issue 7 years ago • 11 comments

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 avatar Jan 12 '18 21:01 TheKeeperOfPie

We don't have this issue. But we don't use kotlin. I am not sure we can help without more details. Can you reproduce the bug in a sample project ?

2018-01-12 13:16 GMT-08:00 Winson Chiu [email protected]:

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 (*)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/stephanenicolas/ormlite-android-gradle-plugin/issues/23, or mute the thread https://github.com/notifications/unsubscribe-auth/ABv33ctR8RlK_zf3FpaTbNbQm5KiLyYIks5tJ8uVgaJpZM4Rc3T4 .

stephanenicolas avatar Jan 13 '18 00:01 stephanenicolas

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 avatar Jan 16 '18 17:01 TheKeeperOfPie

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.

TheKeeperOfPie avatar Jan 16 '18 17:01 TheKeeperOfPie

Got same issue. Have you found a solution?

karmil32 avatar May 03 '18 18:05 karmil32

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 avatar May 04 '18 14:05 stephanenicolas

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

stephanenicolas avatar May 04 '18 14:05 stephanenicolas

Is there another solution to this Issue?

yoav-yanuka avatar Jun 21 '18 12:06 yoav-yanuka

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.

vyguera avatar Aug 02 '18 08:08 vyguera

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

Vlad-M-1 avatar Jan 15 '19 20:01 Vlad-M-1

Hey, is there a plan to fix this?

alonver avatar Apr 21 '19 14:04 alonver

Hi guys,

This plugin is not maintained. Feel free to submit PRs and a test /sample to show it works.

I don't have time to fix it myself.

S.

On Sun., Apr. 21, 2019, 07:02 Alon Vertzberger, [email protected] wrote:

Hey, is there a plan to fix this?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/stephanenicolas/ormlite-android-gradle-plugin/issues/23#issuecomment-485254180, or mute the thread https://github.com/notifications/unsubscribe-auth/AAN7PXMFFBA6VKKE2LLK5TLPRRXYXANCNFSM4ELTOT4A .

stephanenicolas avatar Apr 22 '19 13:04 stephanenicolas