Skip to content

Commit

Permalink
feat: 支持消费Shadow时使用Gradle 7.2与AGP 7.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
shifujun committed Feb 11, 2022
1 parent 77a29a4 commit 1caa475
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ abstract class ClassTransform(val project: Project) : Transform() {
* 获取输入文件对应的输出文件路径.即将文件this路径中的inputDir部分替换为outputDir.
*/
fun File.toOutputFile(inputDir: File, outputDir: File): File {
return File(outputDir, FileUtils.relativePossiblyNonExistingPath(this, inputDir))
return File(outputDir, this.toRelativeString(inputDir))
}

fun input(inputs: Collection<com.android.build.api.transform.TransformInput>,
Expand Down
2 changes: 2 additions & 0 deletions projects/test/gradle-plugin-agp-compat-test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ function testUnderAGPVersion() {

# 测试版本来源
# https://developer.android.com/studio/releases/gradle-plugin
setGradleVersion 7.2
testUnderAGPVersion 7.1.1
setGradleVersion 7.0.2
testUnderAGPVersion 7.0.0
testUnderAGPVersion 4.2.0
Expand Down

0 comments on commit 1caa475

Please sign in to comment.