Android开发-多渠道处理修改aar输出目录和名称


   libraryVariants.all { variant ->
          if (variant.buildType.name == "debug") {
              variant.getPackageLibrary().destinationDir = new File(project.rootDir.absolutePath + "/xxx")
          }

          if (variant.buildType.name == 'debug') {
              variant.outputs.all { output ->
                  def outputFile = output.outputFile
                  if (outputFile != null && outputFile.name.endsWith('debug.aar')) {
                     outputFileName = "${project.name}-${variant.flavorName}-${variant.buildType.name}.aar"
                  }
              }
          }
      }

相关阅读

posted on 2019-09-24 09:05  cnblog仔仔  阅读(1246)  评论(0编辑  收藏  举报