-
Notifications
You must be signed in to change notification settings - Fork 111
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
Cannot add task as a task with that name already exists. #16
Comments
Hi @xgouchet,
do you use in your project? Am I right that this is more or less the content of your flavorDimensions 'package', 'target'
productFlavors {
beta {
dimension 'package'
}
pro {
dimension 'package'
}
googlePlayStore {
dimension 'target'
}
amazon {
dimension 'target'
}
} ? |
Hi, yes this is how my flavors are configured. I'm using gradle wrapper 2.9, and Android Gradle plugin 1.5.0 |
@xgouchet I couldn't reproduce your problem with this setup: Can you post a little project or modify my example so it fails for you with this error? |
@xgouchet I'm closing this issue for now. If you still have issues with the plugin please provide additional information. |
Fix improper test task searching Fixes #16
Hi,
I've got a project with multiple flavor dimensions, meaning that I have a lot of different combination.
I have a dimension for the package name (beta / pro / ...) and a dimension for the target play store (Google, amazon, ...)
When I add
apply plugin: 'jacoco-android'
in my build.gradle, any gradle task gives this exception :org.gradle.api.InvalidUserDataException: Cannot add task ':app:jacocoTestBetaGooglePlayStoreDebugUnitTestReport' as a task with that name already exists.
at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:74)
at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:97)
at com.dicedmelon.gradle.jacoco.android.JacocoAndroidPlugin.createReportTask(JacocoAndroidPlugin.groovy:67)
at com.dicedmelon.gradle.jacoco.android.JacocoAndroidPlugin$_apply_closure1.doCall(JacocoAndroidPlugin.groovy:32)
at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:67)
at org.gradle.listener.ActionBroadcast.execute(ActionBroadcast.java:39)
at org.gradle.api.internal.DefaultDomainObjectCollection.doAdd(DefaultDomainObjectCollection.java:165)
at org.gradle.api.internal.DefaultDomainObjectCollection.add(DefaultDomainObjectCollection.java:159)
at com.android.build.gradle.AppExtension.addVariant(AppExtension.java:47)
at com.android.build.gradle.internal.ApiObjectFactory.create(ApiObjectFactory.java:113)
at com.android.build.gradle.BasePlugin$12.call(BasePlugin.java:654)
at com.android.build.gradle.BasePlugin$12.call(BasePlugin.java:647)
at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:55)
at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:47)
at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:646)
at com.android.build.gradle.BasePlugin$10$1.call(BasePlugin.java:566)
at com.android.build.gradle.BasePlugin$10$1.call(BasePlugin.java:563)
at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:55)
at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:47)
at com.android.build.gradle.BasePlugin$10.execute(BasePlugin.java:562)
at com.android.build.gradle.BasePlugin$10.execute(BasePlugin.java:559)
at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:93)
at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:82)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:44)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:79)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:30)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy10.afterEvaluate(Unknown Source)
at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:67)
... 52 more
The text was updated successfully, but these errors were encountered: