# Copy Gradle dependency res to another Gradle dependency

**URL:** <https://discuss.gradle.org/t/copy-gradle-dependency-res-to-another-gradle-dependency/15310>\
**Category:** Help/Discuss\
**Created:** [March 21, 2016, 9:14am UTC](https://discuss.gradle.org/t/copy-gradle-dependency-res-to-another-gradle-dependency/15310 "2016-03-21T09:14:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raymonddlc](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@Raymonddlc](https://discuss.gradle.org/u/Raymonddlc)\
**Post date:** [March 21, 2016, 9:14am UTC](https://discuss.gradle.org/t/copy-gradle-dependency-res-to-another-gradle-dependency/15310/1 "2016-03-21T09:14:06Z")

</div>

I’m currently developing a few plugin for Android, in Android studio, and have encountered an issue with resources not being found in the end project which implements all the plugins. To deploy a plugin I use **gradlew install** which generates a **.aar** , this .aar contains the .jar and a **res** folder containing the resource files form that project.

Overview of the problem:

> **Plugin A** uses the google **com.android.support:cardview-v7:23.2.0** dependency.

> **Plugin A** now has an external library added to the project and can access the cardview **res** folder.

> While compiling **Plugin B** it uses a resource from **Plugin A** , which is an instance of the **cardview**.

> This **cardview** uses a resource file from the **res** folder in **Plugin A**.

> **Plugin B** now adds **Plugin A** as dependency.

> **Plugin B** now has the **res** folder from **Plugin A** but still **misses** resource items from the **res** folder from the **cardview** dependency.

The error thrown at this point is:

`Error:(8) No resource identifier found for attribute 'cardCornerRadius' in package...`

This is because **Plugin B** uses the **cardview** as so:

```
   <android.support.v7.widget.CardView
        android:id="@+id/card_view"
        android:layout_gravity="center"
        android:layout_width="200dp"
        android:layout_height="200dp"
        card_view:cardCornerRadius="4dp">

        <TextView
            android:id="@+id/info_text"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>
    </android.support.v7.widget.CardView>

```

The missing **card\_view:cardCornerRadius** isn’t found in my project, because it is never copied over from **Plugin A** to **Plugin B**.

My question is as follows:

Is there a way to have my **Plugin B** understand what **card\_view:cardCornerRadius** is without adding the **com.android.support:cardview-v7:23.2.0** dependency to **Plugin B** , but instead copy it over from **Plugin A**?
