Comments (11)
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.
(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.
Just one more question. Jetifier does not modify gradle files at all? or just in reverse mode?
from jetifier.
Not at all, Google hasn't provided a mapping as it is different for different use cases
from jetifier.
@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.
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.
https://github.com/mikehardy/jetifier/blob/master/mapping/androidx-class-mapping.csv
from jetifier.
@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.
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.
I just re-read that section and it was confusing, I changed it a bit, is it more clear now @realesh ?
from jetifier.
@mikehardy Yes it's more clearer now indeed!
Thx a lot 👍
from jetifier.
Related Issues (20)
- How to handle build.gradle files with outdated references? HOT 3
- Not working on CircleCI HOT 2
- Handle AndroidManifest.xml <provider> android.support.v4.content.FileProvider => androidx.core.content.FileProvide HOT 1
- androidx.core.util.pair isn't reversed HOT 4
- npx jetifier not giving any reslut HOT 1
- Is this included by default with a certain React Native version? HOT 3
- cannot create app shortcut HOT 3
- readDir Infinite loop HOT 3
- Jetifier and react-native-file-viewer HOT 1
- npx jetify - npm registry fails HOT 6
- Update of kotlin-stdlib 1.3.0 to 1.3.30 or higher HOT 2
- Getting duplicated class errors, how to avoid it? HOT 5
- [Feature Request] Ability to specify custom folder where to run jetify HOT 1
- Bash wrote one or more lines to the standard error stream. HOT 3
- console.warn(...) breaking the AppCenter build HOT 11
- No mapping for: androidx/viewbinding/ViewBinding HOT 1
- Yarn 2 (berry) pnp support HOT 2
- Vulnerability issue from jdom2-2.0.6.jar (CVE-2021-33813) HOT 3
- Can't run npx jetify on React Native 0.70.5 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jetifier.