Not able to copy configurations dependencies after upgrading Gradle plugin for Android Studio to 3.0.1 and Gradle to 4.1

前端 未结 6 2034
野的像风
野的像风 2020-12-08 19:16

I used to copy \'compile\' dependencies to a specific folder using this simple gradle task :

task copyLibs(type: Copy) {
    from configurations.compile
             


        
6条回答
  •  一生所求
    2020-12-08 20:18

    Another suggestion.

    I created my custom config and then used it as configurations.customConfig:

    configurations {
      customConfig.extendsFrom implementation
    }
    

    The copy task must be correspondingly edited:

    task copyLibs(type: Copy) {
        from configurations.customConfig
        into "$project.rootDir/reports/libs/"
    }
    

提交回复
热议问题