michalchudziak / react-native-geolocation

Geolocation APIs for React Native
MIT License
1.27k stars 219 forks source link

build: update legacy codegen config #319

Closed MrRefactor closed 13 hours ago

MrRefactor commented 3 weeks ago

Overview

Current implementation of codegen config contains legacy libraries syntax, I have update it to new version removing the codegen warning:

[Codegen] Found @react-native-community/geolocation
[Codegen] CodegenConfig Deprecated Setup for @react-native-community/geolocation.
    The configuration file still contains the codegen in the libraries array.
    If possible, replace it with a single object.

BEFORE:
    {
      // ...
      "codegenConfig": {
        "libraries": [
          {
            "name": "libName1",
            "type": "all|components|modules",
            "jsSrcsRoot": "libName1/js"
          },
          {
            "name": "libName2",
            "type": "all|components|modules",
            "jsSrcsRoot": "libName2/src"
          }
        ]
      }
    }
    AFTER:
    {
      "codegenConfig": {
        "name": "libraries",
        "type": "all",
        "jsSrcsRoot": "."
      }
    }

Test Plan

Run example app using newArch and validate if builds are passing.

Outcome: Both iOS and Android builds are passing while using newArch.