I'm trying to add proguard rules. Even if I don't add these rules, some things break in my project the moment I set minifyEnabled to true. For example, the socket structure is broken, while trying to communicate with another device over socket, it receives requests but cannot send a response. Another example is not printing some values while writing xml. All of this happens the moment I set minifyEnabled to true. The project is huge and I'm not sure what caused it.
Can you suggest an idea or alternative tool to find the source of the problem and solve it?
As I said, even if the rules file is empty, even if I just set the minifyEnabled value to true, these problems occur and I have no idea how to prevent these problems by adding them to the rules file.
build.gradle
release {
shrinkResources false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField("String", 'BUNDLE_DATE', '"17.06.2021 09:08"')
buildConfigField("String", 'BUNDLE_ID', '"13"')
}
debug {
minifyEnabled true
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
ext.enableCrashlytics = false
ext.alwaysUpdateBuildId = false
aaptOptions {
cruncherEnabled false
}
implementations
implementation 'org.bouncycastle:bcprov-jdk15to18:1.68'
implementation 'org.owasp.encoder:encoder:1.2.3'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':logfilemanager')
compile files('libs/ormlite-android-4.48.jar')
compile files('libs/ormlite-core-4.48.jar')
compile files('libs/zxing.jar')
compile files('libs/calimero-2.0.4.jar')
implementation 'com.android.volley:volley:1.2.1'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'cat.ereza:customactivityoncrash:2.4.0'
compile group: 'cz.msebera.android', name: 'httpclient', version: '4.5.8'
implementation 'com.google.android.gms:play-services-location:20.0.0'
implementation 'org.kie.modules:org-apache-commons-net:6.5.0.Final'
implementation 'com.github.bumptech.glide:glide:4.13.2'
implementation 'com.github.justzak:dilatingdotsprogressbar:1.0.1'
implementation 'com.google.code.gson:gson:2.9.1'
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation 'org.java-websocket:Java-WebSocket:1.5.3'
implementation("com.squareup.okhttp3:okhttp:4.10.0")
implementation group: 'commons-fileupload', name: 'commons-fileupload', version: '1.4'
implementation 'javax.servlet:javax.servlet-api:4.0.1'