Giter Club home page Giter Club logo

Comments (11)

mikehardy avatar mikehardy commented on May 22, 2024 2

jetifier does not modify gradle files, they library will have to include backwards-compatible support as mentioned in the module maintainers section - here's an example react-native-device-info/react-native-device-info@d448d87

from jetifier.

mikehardy avatar mikehardy commented on May 22, 2024

(you can do something like this and use patch-package to get your build working, FWIW - that's how I usually operate while waiting for a PR to be merged upstream)

from jetifier.

SaeedZhiany avatar SaeedZhiany commented on May 22, 2024

Just one more question. Jetifier does not modify gradle files at all? or just in reverse mode?

from jetifier.

mikehardy avatar mikehardy commented on May 22, 2024

Not at all, Google hasn't provided a mapping as it is different for different use cases

from jetifier.

andywall66 avatar andywall66 commented on May 22, 2024

@mikehardy I guess I don't understand:

  • When you run the Refactor -> Migrate to AndroidX in Android Studio, it's doing file rewrites (in that case, you can review the refactor. But the default refactor seems to work for me usually without edits).
  • And, you say in the Jetifier NPM doc "That is what this tool does - it can rewrite the source in node_modules every time you call it."
  • But above you are saying it does not modify files. So... what DOES it do?

Edit: I missed that you are supposed to use the Studio tool first. So I'm guessing Jetifier is just kindof like patch-package, where it stores those updates and re-applies them?

from jetifier.

mikehardy avatar mikehardy commented on May 22, 2024

No, jetifier literally scans the whole tree every time you run it, and applies "the standard transform" (literally the file from google of what transforms to what - you can check the SHA256 of the file) plus a couple extras that are necessary. Every time, in node_modules tree.

from jetifier.

mikehardy avatar mikehardy commented on May 22, 2024

https://github.com/mikehardy/jetifier/blob/master/mapping/androidx-class-mapping.csv

from jetifier.

realesh avatar realesh commented on May 22, 2024

@mikehardy sorry but something's not clear to me
So if you don't want to migrate to AndroidX yet, and you choose to reverse jetify some package (in my case: react-native-camera)
Should you skip the 1st step (Refactor -> Migrate to AndroidX in Android Studio), or you still need it?

from jetifier.

mikehardy avatar mikehardy commented on May 22, 2024

Hi @realesh ! AndroidX conversion is a binary thing, all one way or all the other way. If you want to stay on support libraries (not AndroidX) then you will use jetify -r and you will not migrate to androidx in android studio

from jetifier.

mikehardy avatar mikehardy commented on May 22, 2024

I just re-read that section and it was confusing, I changed it a bit, is it more clear now @realesh ?

from jetifier.

realesh avatar realesh commented on May 22, 2024

@mikehardy Yes it's more clearer now indeed!
Thx a lot 👍

from jetifier.

Related Issues (20)

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.