将Gradle缓存的jar包转移到maven本地仓库
·
task cacheToLocalMavenRepository(type: Copy) {
from new File('C:/Users/admin/.gradle/caches/modules-2/files-2.1')
into 'C:/Users/admin/.gradle/caches/modules-2/files-2.1/aaaa'
eachFile {
List<String> parts = it.path.split('/')
it.path = (parts[0]+ '/' + parts[1]).replace('.','/') + '/' + parts[2] + '/' + parts[4]
}
includeEmptyDirs false
}
在build.gradle里加入任务
更多推荐




所有评论(0)