Skip to content

Commit 1caa475

Browse files
committed
feat: 支持消费Shadow时使用Gradle 7.2与AGP 7.1.1
#799
1 parent 77a29a4 commit 1caa475

File tree

2 files changed

+3
-1
lines changed
  • projects
    • sdk/core/transform-kit/src/main/kotlin/com/tencent/shadow/core/transform_kit
    • test/gradle-plugin-agp-compat-test

2 files changed

+3
-1
lines changed

projects/sdk/core/transform-kit/src/main/kotlin/com/tencent/shadow/core/transform_kit/ClassTransform.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ abstract class ClassTransform(val project: Project) : Transform() {
4747
* 获取输入文件对应的输出文件路径.即将文件this路径中的inputDir部分替换为outputDir.
4848
*/
4949
fun File.toOutputFile(inputDir: File, outputDir: File): File {
50-
return File(outputDir, FileUtils.relativePossiblyNonExistingPath(this, inputDir))
50+
return File(outputDir, this.toRelativeString(inputDir))
5151
}
5252

5353
fun input(inputs: Collection<com.android.build.api.transform.TransformInput>,

projects/test/gradle-plugin-agp-compat-test/test.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ function testUnderAGPVersion() {
2929

3030
# 测试版本来源
3131
# https://developer.android.com/studio/releases/gradle-plugin
32+
setGradleVersion 7.2
33+
testUnderAGPVersion 7.1.1
3234
setGradleVersion 7.0.2
3335
testUnderAGPVersion 7.0.0
3436
testUnderAGPVersion 4.2.0

0 commit comments

Comments
 (0)