GoogleCloudPlatform / gradle-appengine-templates

Freemarker based templates that build with the gradle-appengine-plugin
438 stars 205 forks source link

Error:Circular dependency between the following tasks: #82

Closed PN1019 closed 7 years ago

PN1019 commented 7 years ago

This error is coming while gradle build tasks: Error:Circular dependency between the following tasks: :app:collectReleaseMultiDexComponents --- :app:processReleaseManifest --- :app:prepareReleaseDependencies +--- :app:prepareComAndroidSupportAnimatedVectorDrawable2501Library | --- :backend:_appengineEndpointsAndroidArtifact | --- :backend:endpointsSrcClasses | --- :backend:compileEndpointsSrcJava | --- :backend:appengineEndpointsExpandClientLibs | --- :backend:appengineEndpointsGetClientLibs | --- :backend:classes | --- :backend:compileJava | +--- :app:packageRelease | | +--- :app:compileReleaseJavaWithJavac | | | +--- :app:generateReleaseSources | | | | +--- :app:compileReleaseAidl | | | | | --- :app:prepareReleaseDependencies () | | | | +--- :app:compileReleaseRenderscript | | | | | --- :app:prepareReleaseDependencies () | | | | --- :app:processReleaseResources | | | | +--- :app:mergeReleaseAssets | | | | | --- :app:prepareReleaseDependencies () | | | | +--- :app:mergeReleaseResources | | | | | +--- :app:generateReleaseResources | | | | | | --- :app:compileReleaseRenderscript () | | | | | --- :app:prepareReleaseDependencies () | | | | --- :app:processReleaseManifest () | | | +--- :app:prepareReleaseDependencies () | | | --- :backend:_appengineEndpointsAndroidArtifact () | | +--- :app:processReleaseResources () | | +--- :app:transformClassesWithDexForRelease | | | +--- :app:transformClassesWithJarMergingForRelease | | | | +--- :app:compileReleaseJavaWithJavac () | | | | +--- :app:prepareReleaseDependencies () | | | | --- :backend:_appengineEndpointsAndroidArtifact () | | | --- :app:transformClassesWithMultidexlistForRelease | | | +--- :app:collectReleaseMultiDexComponents () | | | --- :app:transformClassesWithJarMergingForRelease () | | +--- :app:transformNative_libsWithMergeJniLibsForRelease | | | +--- :app:mergeReleaseJniLibFolders | | | | --- :app:prepareReleaseDependencies () | | | +--- :app:prepareReleaseDependencies () | | | --- :backend:_appengineEndpointsAndroidArtifact () | | --- :app:transformResourcesWithMergeJavaResForRelease | | +--- :app:prepareReleaseDependencies () | | --- :backend:_appengineEndpointsAndroidArtifact () | +--- :backend:jar | | --- :backend:classes () | --- :jjokeslibrary:jar | --- :jjokeslibrary:classes | --- :jjokeslibrary:compileJava | +--- :app:packageRelease () | +--- :backend:jar () | --- :jjokeslibrary:jar () +--- :app:prepareComAndroidSupportAppcompatV72501Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComAndroidSupportDesign2501Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComAndroidSupportMediarouterV72300Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComAndroidSupportMultidex101Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComAndroidSupportRecyclerviewV72501Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComAndroidSupportSupportCompat2501Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComAndroidSupportSupportCoreUi2501Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComAndroidSupportSupportCoreUtils2501Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComAndroidSupportSupportFragment2501Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComAndroidSupportSupportMediaCompat2501Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComAndroidSupportSupportV42501Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComAndroidSupportSupportVectorDrawable2501Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComAndroidSupportTransition2501Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServices840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesAds840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesAnalytics840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesAppindexing840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesAppinvite840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesAppstate840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesAuth840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesBase840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesBasement840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesCast840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesDrive840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesFitness840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesGames840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesGcm840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesIdentity840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesLocation840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesMaps840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesNearby840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesPanorama840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesPlus840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesSafetynet840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesVision840Library | --- :backend:_appengineEndpointsAndroidArtifact () +--- :app:prepareComGoogleAndroidGmsPlayServicesWallet840Library | --- :backend:_appengineEndpointsAndroidArtifact () --- :app:prepareComGoogleAndroidGmsPlayServicesWearable840Library --- :backend:_appengineEndpointsAndroidArtifact () () - details omitted (listed previously)`// Top-level build file where you can add configuration options common to all sub-projects/modules. build.gradle(project Level)

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'
        classpath 'com.google.gms:google-services:3.0.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
`

build.gradle(module level)

`apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.example.abhi.builditbigger"
        multiDexEnabled true
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 3
        versionName "3.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    buildTypes.each {
        it.buildConfigField 'String', 'Url', "\"https://build-it-bigger-cc679.appspot.com/_ah/api/\""
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile project(path: ':backend', configuration: 'android-endpoints')
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:design:23.0.1'
    compile 'com.google.android.gms:play-services-ads:8.4.0'
    compile 'com.google.android.gms:play-services:8.4.0'
    compile 'com.google.android.gms:play-services-auth:8.4.0'
    compile 'com.google.android.gms:play-services-gcm:8.4.0'
    compile 'com.google.android.gms:play-services-identity:8.4.0'
}
'

well what i m doing wrong which cause Circular dependency??

loosebazooka commented 7 years ago

What does your backend build file look like?

PN1019 commented 7 years ago

Thanks, Well got it sorted out ...@loosebazooka I looked into Project structure.(Ctrl+Shift+Alt+S)->Modules->jjokesLibrary->remove compile dependency on :app and :backend ..->sync gradle file and the error was gone..since my jjokesLibrary is java library it already have compile dependency on : backend module and :app cannot have dependency on java library either way..

loosebazooka commented 7 years ago

Cool. I'm going to close this then.