CopyPastor

Detecting plagiarism made easy.

Score: 1.8046677112579346; Reported for: String similarity, Exact paragraph match Open both answers

Possible Plagiarism

Reposted on 2025-12-10
by Hoang Nguyen Huu

Original Post

Original - Posted on 2025-12-10
by Hoang Nguyen Huu



            
Present in both answers; Present only in the new answer; Present only in the old answer;

In my case, **testProguardFile("your-file.pro")** does not work at all (Don't know why!!!)
So I use below (Groovy) configuration for Stage build type, to ignore obfuscation of the automation test APK. Original answered by https://stackoverflow.com/a/72187366/1377819
``` javastage { initWith buildTypes.release signingConfig signingConfigs.dev // Disable minification ONLY when building the Test APK minifyEnabled !gradle.startParameter.taskNames.any { it.contains("AndroidTest") } // Disable shrinkResources ONLY when building the Test APK shrinkResources !gradle.startParameter.taskNames.any { it.contains("AndroidTest") } proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } ```
Don't know how to format code in the comment section, so I post it as an answer here (thank to Vin Normal solution) In my case, **testProguardFile("your-file.pro")** does not work at all. So I use below (Groovy) configuration for Stage build type, to ignore obfuscation for AndoidTest APK build.
``` stage { initWith buildTypes.release signingConfig signingConfigs.dev // Disable minification ONLY when building the Test APK minifyEnabled !gradle.startParameter.taskNames.any { it.contains("AndroidTest") } // Disable shrinkResources ONLY when building the Test APK shrinkResources !gradle.startParameter.taskNames.any { it.contains("AndroidTest") } proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } ```

        
Present in both answers; Present only in the new answer; Present only in the old answer;