MegatronKing / StringFog

一款自动对字节码中的字符串进行加密Android插件工具
Apache License 2.0
1.71k stars 343 forks source link

升级一下支持agp7.0+吧 #58

Closed ucxl closed 2 years ago

ucxl commented 2 years ago

gradle:4.2.2都还可以,升级到 gradle:7.0.4就编译通不过了 求升级一下支持agp7.0+吧,多谢

MegatronKing commented 2 years ago

支持gradle:7.0.4,实测是可以的。检查下是否是其他插件有冲突。

Task :app:preBuild UP-TO-DATE Task :app:preReleaseBuild UP-TO-DATE Task :app:compileReleaseAidl NO-SOURCE Task :app:compileReleaseRenderscript NO-SOURCE Task :app:generateReleaseBuildConfig Task :app:generateReleaseResValues Task :app:generateReleaseResources Task :app:checkReleaseAarMetadata Task :app:createReleaseCompatibleScreenManifests Task :app:extractDeepLinksRelease Task :app:processReleaseMainManifest Task :app:processReleaseManifest Task :app:generateReleasStringFog Task :app:javaPreCompileRelease Task :app:extractProguardFiles Task :app:mergeReleaseJniLibFolders Task :app:mergeReleaseNativeLibs NO-SOURCE Task :app:stripReleaseDebugSymbols NO-SOURCE Task :app:extractReleaseNativeSymbolTables NO-SOURCE Task :app:mergeReleaseNativeDebugMetadata NO-SOURCE Task :app:mergeReleaseResources Task :app:mergeReleaseArtProfile UP-TO-DATE Task :app:processReleaseJavaRes NO-SOURCE Task :app:mergeReleaseShaders Task :app:compileReleaseShaders NO-SOURCE Task :app:generateReleaseAssets UP-TO-DATE Task :app:mergeReleaseAssets Task :app:checkReleaseDuplicateClasses Task :app:compressReleaseAssets Task :app:collectReleaseDependencies Task :app:sdkReleaseDependencyData Task :app:validateSigningRelease Task :app:writeReleaseAppMetadata Task :app:writeReleaseSigningConfigVersions Task :app:processReleaseManifestForPackage Task :app:processReleaseResources Task :app:compileReleaseKotlin Task :app:compileReleaseJavaWithJavac Task :app:compileReleaseSources Task :app:mergeReleaseGeneratedProguardFiles Task :app:bundleReleaseClasses Task :app:mergeReleaseJavaResource > Task :app:transformClassesWithStringFogForRelease Task :app:minifyReleaseWithR8 Task :app:compileReleaseArtProfile Task :app:optimizeReleaseResources Task :app:lintVitalAnalyzeRelease

ucxl commented 2 years ago

好的感谢

ucxl commented 2 years ago

还是不行,找出原因了,是不能用JavaVersion.VERSION_11,改成JavaVersion.VERSION_1_8 就可以 一开始就搞错方向,抱歉

这是错误提示

Caused by: java.lang.NullPointerException at com.github.megatronking.stringfog.plugin.StringFogMappingPrinter.ouputInfo(StringFogMappingPrinter.java:62) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at com.github.megatronking.stringfog.plugin.StringFogTransform.transform(StringFogTransform.groovy:143) at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:284) at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:69) ... 226 more

MegatronKing commented 2 years ago

Java11确实没测试过,改一下issue标题,后面我看一下