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

Don't use local.properties file as the default properties file #60

Open
arriolac opened this issue Oct 21, 2022 · 1 comment
Open

Don't use local.properties file as the default properties file #60

arriolac opened this issue Oct 21, 2022 · 1 comment
Assignees
Labels
semver: major Hint for users that this is an API breaking change. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@arriolac
Copy link
Collaborator

local.properties is an internal AGP file and is not meant as a mechanism for storing application secrets. The plugin should instead be modified to read for a different file (e.g. secrets.properties)

@arriolac arriolac added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. semver: major Hint for users that this is an API breaking change. labels Oct 21, 2022
@arriolac arriolac self-assigned this Oct 21, 2022
@jamesncl
Copy link

jamesncl commented Feb 14, 2023

Including local.properties by default also causes a problem with Flutter projects, which by default include a property for the flutter SDK path in the template local.properties (for example flutter.sdk=C\:\\Users\\me\\mycode\\MyProject\\.fvm\\flutter_sdk), which in turn causes a build error illegal escape character when building the BuildConfig.java file when using this secrets gradle plugin.

So I tried to work around this by using debug.properties and release.properties files to include just the secrets I need to in BuildConfig.java, but it still also automatically includes local.properties. It would be nice if you could tell the plugin to ignore local.properties in the plugin configuration somehow, for example something like:

secrets {
   ignoreFiles.add("local.properties")
}

As a workaround I'm having to ignore keys like this, which feels wrong - every time I add another thing to local.properties I will have to remember to also exclude it from the secrets:

secrets {
    ignoreList.add("flutter*")
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: major Hint for users that this is an API breaking change. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants