dansiegel / Mobile.BuildTools

The Mobile.BuildTools makes it easier to develop code bases in a clean, consistent, secure, and configurable way. Determine at Build which environment your app needs to run on, and what Client Secrets it should have. Plus many more amazing features!
http://mobilebuildtools.com
MIT License
228 stars 29 forks source link

[Breaking] Change Secrets to AppSettings #258

Closed dansiegel closed 3 years ago

dansiegel commented 3 years ago

SUMMARY

Over the years the use of the Secrets API has changed significantly. While some legitimate secrets are included, more often this is really App Settings. In order to better reflect this the API should be updated to reflected it's intent. Additionally the functionality should be expanded to allow you to add multiple generated classes.

DETAILS

First we will need to update the buildtools.json

{
  "appSettings: {
    "projectName": [
      {
        "accessibility": "public",
        "className": "FooBar1",
        "namespace": "Helpers",
        "properties": [
          {
            "name": "Foo",
            "type": "String"
          }
        ]
      }
    ]
  }
}

For those still using projectSecrets this will result in a build warning that projectSecrets are deprecated and will copy it over to the appSettings.

Second while secrets.json will still be supported (with a warning)... we will shift this to instead use appsettings.json. It will continue to be advisable to add this json file to your .gitignore.

PLATFORMS

n/a

dansiegel commented 3 years ago

closed by #262