private void checkForApklibDependencies ( ) throws MojoExecutionException { final boolean isAarBuild = project . getPackaging ( ) . equals ( AAR ) ; final DependencyResolver dependencyResolver = getDependencyResolver ( ) ; final Set < Artifact > allArtifacts = project . getArtifacts ( ) ; Set < Artifact > dependencyArtifacts = getArtifactResolverHelper ( ) . getFilteredArtifacts ( allArtifacts ) ; boolean foundApklib = false ; for ( Artifact artifact : dependencyArtifacts ) { final String type = artifact . getType ( ) ; if ( type . equals ( APKLIB ) && isAarBuild ) { getLog ( ) . warn ( "Detected APKLIB transitive dependency: " + artifact . getId ( ) ) ; foundApklib = true ; } else if ( type . equals ( AAR ) ) { final Set < Artifact > dependencies = dependencyResolver . getLibraryDependenciesFor ( session , repositorySystem , artifact ) ; for ( Artifact dependency : dependencies ) { if ( dependency . getType ( ) . equals ( APKLIB ) ) { getLog ( ) . warn ( "Detected " + artifact . getId ( ) + " that depends on APKLIB: " + dependency . getId ( ) ) ; foundApklib = true ; } } } } if ( foundApklib ) { getLog ( ) . warn ( "AAR libraries should not depend or include APKLIB artifacts.\n" + "APKLIBs have been deprecated and the combination of the two may yield unexpected results.\n" + "Check the problematic AAR libraries for newer versions that use AAR packaging." ) ; } }
Traverses the list of project dependencies looking for &quot ; AAR depends on APKLIB&quot ; artifact combination that has been deprecated . For each occurrence of an AAR artifact with APKLIB direct or transitive dependency produces a warning message to inform the user . Future plugin versions may default to skipping or not handling unsupported artifacts during build lifecycle .