andkulikov / Transitions-Everywhere

Set of extra Transitions on top of Jetpack Transitions Library
Apache License 2.0
4.82k stars 487 forks source link

Animation not working only when release build #100

Closed softmarshmallow closed 4 years ago

softmarshmallow commented 4 years ago

As you can see, there is nothing special to block animation-related actions on my proguard file. Interestingly, the transition wont work on product-release mode.

I know there is lack of information, but when i enable debugging, then animation will work fine again. (sadly cannot provide any helpful debugging information/log/ect..)

# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}
-keepclassmembers enum * { *; }
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

app.gradle


    buildTypes {
        release {
            manifestPlaceholders = [enableCrashReporting: "true"]
            shrinkResources true
            zipAlignEnabled true
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }
        debug {
//            applicationIdSuffix '.debug'
            versionNameSuffix '-DEBUG'
            manifestPlaceholders = [enableCrashReporting: "false"]
            minifyEnabled false
            zipAlignEnabled true
            debuggable true
            signingConfig signingConfigs.debug
        }
    }

    flavorDimensions "version"
    productFlavors {
        dev {
            dimension "version"
            buildConfigField "String", "APP_FLAVOR", "\"dev\""
            manifestPlaceholders = [appLabel: "β SWING"]
        }
        product {
            dimension "version"
            buildConfigField "String", "APP_FLAVOR", "\"product\""
            manifestPlaceholders = [appLabel: "SWING"]
        }
    }

-> turns out to be only works when debuggable true -> which is not recommanded for release flavor

andkulikov commented 4 years ago

Hello. could you please verify that if you specify minifyEnabled true for debug build this stops working for the debug builds as well. this will mean proguard is removing something important. I will not be able to help you figure out the reason without sharing the code using transitions which stops working for you

softmarshmallow commented 4 years ago

Hi, thanks for the reply.

        release {
            manifestPlaceholders = [enableCrashReporting: "true"]
/*            shrinkResources true
            zipAlignEnabled true
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'*/
            signingConfig signingConfigs.release
        }

Works for release if proguard related lines are muted Also doesnt work for debug when minify is enabled.

andkulikov commented 4 years ago

this library works with proguard, I tested it, and there were no other issues created for this issue during all the years library exists. so probably the issue is not directly in the library. and I will not be able to help you without seeing the code you have for not working animation