Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed proguard handling of custom gradle files #1401

Merged
merged 5 commits into from
Jul 27, 2023

Conversation

bitsandfoxes
Copy link
Contributor

Looks like there are plugins out there that modify the gradle template to list the proguard files like this

buildTypes {
        debug {
            minifyEnabled true

            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt', 'proguard-user.txt'
            jniDebuggable true
        }
        release {
            minifyEnabled true

            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt', 'proguard-user.txt'
            signingConfig signingConfigs.release
        }
    }

instead of consumerProguardFiles.

@bitsandfoxes bitsandfoxes requested a review from vaind July 17, 2023 13:47
CHANGELOG.md Show resolved Hide resolved
}
else
{
throw new Exception($"Failed to find 'proguard rule section' in gradle file at: {_gradleScriptPath} - no `consumerProguardFiles` or `proguardFiles` found.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this breaking the build for the user? Should we gracefully degrade instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build doesn't break. The exception bubbles up and we catch and log it as an error.

@bitsandfoxes bitsandfoxes merged commit 17252ce into main Jul 27, 2023
121 checks passed
@bitsandfoxes bitsandfoxes deleted the fix/android-proguard branch July 27, 2023 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants