File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -217,6 +217,7 @@ task generateJdiffReport(type: Javadoc) {
217217}
218218
219219def R_CLASS_PATH = " build/generated/not_namespaced_r_class_sources/releaseUnitTest/processReleaseUnitTestResources/r/com/google/android/material/R.java"
220+ Attribute<String > ARTIFACT_TYPE = Attribute . of(" artifactType" , String . class)
220221afterEvaluate {
221222 [generateJavadocs, generateApiXml]. forEach { task ->
222223 task. dependsOn(' :lib:processReleaseUnitTestResources' )
@@ -226,6 +227,13 @@ afterEvaluate {
226227 if (releaseVariant == null ) {
227228 return
228229 }
230+
231+ // Add transitive runtime dependencies to classpath
232+ task. classpath + = releaseVariant. runtimeConfiguration. incoming. artifactView { aView ->
233+ aView. attributes. attribute(ARTIFACT_TYPE , " android-classes" )
234+ }. files
235+
236+ // Add project and compile dependencies to classpath
229237 releaseVariant. javaCompileProvider. configure { javaCompileProvider ->
230238 task. classpath + = releaseVariant. getCompileClasspath(null )
231239 task. classpath + = task. project. files(javaCompileProvider. destinationDir)
You can’t perform that action at this time.
0 commit comments