Closed aftabIDE closed 1 year ago
If you open up the plugin code, you won't find anything about wireguard. The source code of the tunnel itself has not been added yet.
If the author is just starting to write a project, the working version should not be expected before six months.
Hello, in ./app/build.gradle
in buildtypes release
, try adding
shrinkResources false
minifyEnabled false
It seems to work for me. Your suggestion regarding pro-guard might be close :)
Update: I got it working by excluding the relevant classes from being minified by creating the file proguard-rules.pro
in your project in android/app
, and adding the following two lines:
-keep class app.wachu.wireguard_vpn.** {*;}
-keep class com.beust.klaxon.** {*;}
build.gradle does not need to be modified in that case. Tested with flutter v3.10.5, kt 1.7.10, gradle 7.5 (?)
Hello, in
./app/build.gradle
inbuildtypes release
, try addingshrinkResources false minifyEnabled false
It seems to work for me. Your suggestion regarding pro-guard might be close :)
Update: I got it working by excluding the relevant classes from being minified by creating the file
proguard-rules.pro
in your project inandroid/app
, and adding the following two lines:-keep class app.wachu.wireguard_vpn.** {*;} -keep class com.beust.klaxon.** {*;}
build.gradle does not need to be modified in that case. Tested with flutter v3.10.5, kt 1.7.10, gradle 7.5 (?)
Thank you for the input. I've updated the README.md to include your solution and properly acknowledged your contribution. I believe I can close this issue now.
Done
FYI, with Flutter 3.13.7 and Gradle 1.9.10, the proguard rules have stopped working. Disabling minify and shrink still works. I've tested around a bit, but didn't find a fix for the proguard-rules immediately. Soley based on the error message received by flutter, the issue seems to be that the parameters for SetStateParams are somehow lost, so it might be related to Klaxon. Since disabling minify and shrink solves the problem, there are not many options for what the problem could be.
@Wachu985
First of all Thanks for such an wonderful work. There is an issue arise in release mode the app is not working but it is working in debug mode.
Possible cause: Wireguard packages might be removed due to pro-guard while creating release apk.
Looking for your response. Thank you.