Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

混淆类名无法混淆不同包里面所xml或txt包含的类名,只能混淆同一目录下xml或txt里面包含的类名。 #50

Open
Tom-xdf opened this issue Aug 2, 2023 · 6 comments

Comments

@Tom-xdf
Copy link

Tom-xdf commented Aug 2, 2023

不同目录但是同样依赖被替换的类名,替换不成功,例如我在txt里面加入了要被混淆的类名,最后执行混淆操作,依然执行不能够把txt里面的混淆了
image
image
image
image

@liujingxing
Copy link
Owner

liujingxing commented Aug 2, 2023

只会替换.java.kt文件

@Tom-xdf
Copy link
Author

Tom-xdf commented Aug 2, 2023

在java目录里面添加xml或者txt,里面填写被混淆的类名,执行混淆之后,同一个目录下面xml文件里面填写的将被混淆的类名,也会被混淆掉

@liujingxing
Copy link
Owner

liujingxing commented Aug 2, 2023

只会替换.java.kt文件

这里说的有误,应该说只会替换src/main/java目录下的文件,其它目录想要替换,需要你手动添加到srcDirs变量中,如

sourceSets {
    main.java.srcDirs += 'arange'
}

@liujingxing
Copy link
Owner

1、请在android标签下添加
2、文件路径分隔符用/,而不是.
3、填写相对路径即可,不需要写app
4、不能依赖成功问题,自己找原因

@Tom-xdf
Copy link
Author

Tom-xdf commented Aug 3, 2023

混淆前
image
image
image
image
混淆之后只混淆了其它包里面的Text4
image

@liujingxing
Copy link
Owner

替换前,会有个逻辑判断,即text.txt文件是否有导入某个类,如果有,才会替换

所以,test.txt文件,写上包的全路径就会替换

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants