@@ -12,16 +12,18 @@ import javax.print.DocFlavor.STRING
1212public class CopyDependency {
1313
1414 def static copyDependencies (Dependency dependency , Project project , String repo ,Closure dontCopy ) {
15+ println (" CopyDependency,need copy${ dependency} " )
1516 def dependencyPath = project. gradle. getGradleUserHomeDir(). path + " /caches/modules-2/files-2.1/"
1617 dependencyPath + = dependency. group + " /" + dependency. name + " /" + dependency. version + " /"
17-
18+ println ( " the dependency path is: ${ dependencyPath } " )
1819 def libsPath = " $repo ${ File.separator} libs"
1920 project. fileTree(dependencyPath). getFiles(). each { file ->
2021 copyFile(file, project, libsPath,dontCopy)
2122 }
2223 }
2324
2425 def static copyDependencies (ResolvedDependency dependency , Project project , String repo ,Closure dontCopy ) {
26+ println (" CopyDependency,need copy:${ dependency} " )
2527 def libsPath = " $repo ${ File.separator} libs"
2628 dependency. getModuleArtifacts(). each { resolvedArtifact ->
2729 copyFile(resolvedArtifact. file, project, libsPath,dontCopy)
@@ -30,19 +32,23 @@ public class CopyDependency {
3032
3133 private static void copyFile (File file , Project project , String libsPath ,Closure dontCopy ) {
3234 if (file. name. contains(" sources" )|| dontCopy. call(file. name)) {
35+ println (" dontCopy worked" )
3336 return
3437 }
3538 if (file. name. endsWith(" .aar" )) {
39+ println (" copying----${ file.name} " )
3640 project. copy {
3741 from file. path
3842 into project. file(libsPath)
3943 }
4044 } else if (file. name. endsWith(" .jar" )) {
45+ println (" copying----${ file.name} " )
4146 project. copy {
4247 from file. path
4348 into project. file(libsPath)
4449 }
4550 } else if (file. name. endsWith(" .so" )) {
51+ println (" copying----${ file.name} " )
4652 project. copy {
4753 from file. path
4854 into project. file(" ${ libsPath} /armeabi-v7a" )
0 commit comments