Comments (8)
I am sure this is possible - probably a trivial change to the script if you have time to try it? I'm pretty busy today on a bunch of repositories today with big userbases just doing user education and don't have time for enhancements at the moment - the changes are easy but to test it and make sure takes a little more time (not much but...)
from jetifier.
Hey, absolutely I'll gladly take a look. Unfortunately bash isn't exactly my speciality, but I'll try to do a little reading around it and see if I can come up with something.
Thanks again!
from jetifier.
Thanks for this great tool @mikehardy!
Just to add to this, I wonder if it would be possible to avoid processing any file contents which like under app/build/
directories, since these intermediate results could just be re-populated after making a new build. Might be a quick gain.
from jetifier.
It'll generally only be a relatively minor improvement, but could use find's -prune option for .git directories. This would avoid scanning all the files in these directories.
from jetifier.
sed's -i option takes a ''
value, which would prevent creation of backup files, wouldn't need to delete them. Could then use find -exec sed -i '' -f "${MAPPING_SED}" '{}' '+'
. That might be a little quicker, and would work better for paths with spaces etc.
from jetifier.
I got decent speed here by only applying the large list of replacements to a line if it includes the substring "android.support". sed is probably quicker than most scripting languages, but not if it has to loop through many patterns for every line. Apologies for not posting the script, I'd have to jump through some hoops with our legal department to do that.
from jetifier.
@jgreen210 I think it already discards the .git directories but maybe prune is a more efficient way. The -i pointer sounds interesting but I had a lot of compatibility issues with BSD sed on macOS and went back and forth on it. Going to stay with how it is now. Maybe you could just post the bit that is the improvement? take + give :-)
from jetifier.
Resolved with #5 but if someone posted the sed-kung-fu (or a pointer to it) to skip replacement checking if android.support wasn't on a line, that would be awesome
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
- npx jetify -r does not working HOT 11
- 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.