Giter VIP home page Giter VIP logo

mobile-dependencies_whitelist's Introduction

Allowlist dependencies

NOTE: This repo isnt versioned. master branch is consumed by default, so every time master branch changes, all repositories will immediatly start consuming the new changes

If you need to add or update a library ,visit Wiki.

Android

Android allowlist dependencies consist of a set of dependencies that are available for front-ends and high-level repositories to consume from the Mercadolibre-mobile group.

This set of dependencies is parsed in the form of a JSON text. The root level property should be called whitelist.

Each of the dependencies is a JSON Object that will be matched against each of the unresolved dependencies of the repository. The repository dependencies will be a string formed as group:name:version. The allowlist fields SUPPORTS regex expressions, so you can form match cases for groups in single strings.

NOTE1: Remember that this are regexes, so if you want to declare com.example it should be com\\.example NOTE2: The repository will validate against unresolved dependencies. Thus, if declaring as version 4\\.\\+ it ** will** match against a dependency 4.+ (it wont be for example the string 4.2.3) NOTE3: You can have expirable dependencies by adding the expires field. If no field is added, the dependency is considered as non-expirable NOTE4: If no group / name / version is provided, they will default to .* (any string)

JSON Schema:

{
  "whitelist": [
    {
      "description": "(optional) description",
      "expires": "yyyy-MM-dd",
      "group": "group_regex",
      "name": "name_regex",
      "version": "version_regex"
    },
    ...
  ]
}

NOTE5: If you want to try if its working correctly from your fork, just add this line to the /build.gradle:

ext["allowlistURL"] = "https://raw.githubusercontent.com/YOUR_GITHUB_USER/mobile-dependencies_whitelist/YOUR_GIT_BRANCH/android-whitelist.json"

iOS

iOS allowlist dependencies consist of a set of dependencies that are available for front-ends and high-level repositories to consume from the Mercadolibre-mobile group.

This set of dependencies is parsed in the form of a JSON text. The root level property should be called whitelist.

Each of the dependencies is an object with the following properties:

  • name: Dependency Podname
  • source: keyword that indicates the source where the dependency spec should be downloaded. (public || private)
  • target: Indicates if it is a test or productive dependency. (test || productive)
  • version: Which will be matched against each of the dependencies in the podspec. The version string SUPPORTS regex expression.

Optional

  • expires: You can have expirable dependencies by adding the expires field. If no field is added, the dependency is considered as non-expirable
  • description: (optional) some relevant description

Example:

{
	"whitelist": [
   # This will match with 'MeliSDK' and version '~>5.+' (version must have ~>5.x)
    {
		"name": "MeliSDK",
		"version": "^~>5.[0-9]+$"
	}, 
   # This will match with 'MLRecommendations' for any version
    {
		"name": "MLRecommendations",
		"version": null
	}]
}

Support for Granular Dependencies:

This functionality provides a more precise management of the scope of dependencies, giving us the ability to select specific consumers for each of them.

To activate the granularity feature, it is necessary to introduce a new block within the dependency definition, specifying which Mercado Libre projects will have access to it. This should be done as follows:

Android Platform

{
  "whitelist": [
    {
      "allows_granular_projects": [ 
            "group_meli_project",
            "com.mercadolibre.android.commons"  # Example of a Mercado Libre Dependency Group.
      ]
      "description": "(optional) description",
      "expires": "yyyy-MM-dd",
      "group": "group_regex",
      "name": "name_regex",
      "version": "version_regex"
    },
    ...
  ]
}

iOS Platform

{
  "whitelist": [
    {
      "name": "MeliSDK",
      "version": "^~>5.[0-9]+$"
      "allows_granular_projects": [ 
            "name_meli_lib",
            "MLRecommendations"  # Example of a Mercado Libre Dependency Lib Name .
      ]
    },
    ...
  ]
}

Support for Transitive Dependencies (ONLY ANDROID):

This functionality provides a more precise control over how it is possible to exclude transitive dependencies from our projects.

This functionality provides a more precise management of the scope of dependencies, giving us the ability to select specific consumers for each of them.

To activate the transitivity feature, it is necessary to introduce a new block within the dependency definition, specifying two new keys:

  1. By default, all dependencies are enabled as transitive. To specify otherwise, it should be configured as false as follows: "transitivity" = false
  2. All dependencies that are not transitive should indicate the namespace of the dependency. This can be done as follows: "namespace": "com.name.path.path"

Both keys will be found within the "transitive_configuration" enclosure. Here's an example to visualize it more clearly:

Android Platform

{
  "whitelist": [
    {
      "group": "com\\.squareup\\.retrofit2",
      "name": "adapter-rxjava2",
      "version": "2\\.6\\.4",
      "transitive_configuration":
      {
          "transitivity": false,
          "namespace": "retrofit2"
      }
    },
    ...
  ]
}

It's important to mention that if non-transitive dependency imports are found within classes, they will generate a blocker through the Gradle plugin, preventing the lintAndroid() task executed in CI or locally from completing successfully.

Contexts Allowlist [DEPRECATED]

For more information consult the new context allowlist

mobile-dependencies_whitelist's People

Contributors

abruno- avatar agustinn1233 avatar barriosnahuel avatar caiomatosmeli avatar eduflores72 avatar eferrin avatar eportasml avatar ferrariagustin avatar gmacedomeli avatar gtchantouria avatar gussrivero avatar henrikemota avatar ingrichardavid avatar juanimoli avatar juaquinones avatar lcarboneti avatar lfuryk avatar mafunes avatar manubla4 avatar maoherd avatar matiasmanzanzani avatar matiasrlucero avatar mbeltrame avatar pigounet-meli avatar rodrip avatar roliveiravictor avatar saantiaguilera avatar thaysemoreira avatar victorgonzalezmeli avatar vmagnani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mobile-dependencies_whitelist's Issues

Repo publico

Holas, el repo este está público, me fui de meli hace como 1 año y puedo verlo jajajaja, no sé si está ok o no. Solo aviso por las dudas.

.

.

Bump Room version for v2.3.0

Motivation

Room v2.2.x has a bug that won't allow the app to use the @Query annotation with this query: @Query("DELETE FROM entity") to delete all rows from an entity.

Basically, the bytecode Java generated for this query returns the type Object, and Room runtime don't understand this.

@Override
  public Object deleteAll(final Continuation<? super Unit> continuation) {
    __db.assertNotSuspendingTransaction();
}

And the error in build time:

error: Not sure how to handle query method's return type (java.lang.Object). DELETE query methods must either return void or int (the number of deleted rows).

In the 2.3.0 version, the Google team fixes the issue and the new bytecode generated is:

@Override
  public Object deleteAll(final Continuation<? super Unit> continuation) {
    return CoroutinesRoom.execute(__db, true, new Callable<Unit>() {
      @Override
      public Unit call() throws Exception {
        final SupportSQLiteStatement _stmt = __preparedStmtOfDeleteAll.acquire();
        __db.beginTransaction();
        try {
          _stmt.executeUpdateDelete();
          __db.setTransactionSuccessful();
          return Unit.INSTANCE;
        } finally {
          __db.endTransaction();
          __preparedStmtOfDeleteAll.release(_stmt);
        }
      }
    }, continuation);
  }

References

Discussion Error when use suspend function with room dao methods

Discussion Room integration by Elizarov

Commit link fix the issue that prevented Coroutine Flow queries created by Room to be consumed in a suspending

Link to release notes

Snippet Suggestion

 {
      "group": "androidx\\.room",
      "name": "room-runtime",
      "version": "2\\.3\\.0"
    },
    {
      "group": "androidx\\.room",
      "name": "room-compiler",
      "version": "2\\.3\\.0"
    },
    {
      "group": "androidx\\.room",
      "name": "room-ktx",
      "version": "2\\.3\\.0"
    },

Bug for Bill of Material

By the time I was trying to implement constraintlayout-compose and material3 specific versions as a library, I noticed that material3 does not get to be properly validated.

According to the CI, correctly, only andesui-compose and constraintlayout-compose are not valid to be implemented in my project.

Screenshot 2024-05-15 at 22 18 53

CI Link Reference

Still, at the same time, I was adding a new specific version (1.1.0) for material3, which is beyond the version for the BoM

Screenshot 2024-05-15 at 22 33 31

PR Link Reference

This likely means that once a library gets to be validated against the BoM, it doesn't matter which version the project applies, especially when it overwrites the current version of the BoM.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.