Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation notice #2

Open
fkirc opened this issue Jul 2, 2019 · 9 comments
Open

Deprecation notice #2

fkirc opened this issue Jul 2, 2019 · 9 comments

Comments

@fkirc
Copy link

fkirc commented Jul 2, 2019

To make it easier for the newcomers:

This version of Zip4j is outdated.
If you are looking for an easy way to integrate Zip4j into Android, then you can copy the Zip4j module of https://github.com/fkirc/secure-zip-notes into your Android Studio project and add a local gradle dependency.

Alternatively, you can just grab the most recent Zip4j source and write your own gradle file/module.

@joielechong
Copy link
Owner

Thanks for your notice! Can you make a standalone library for that? so I can make a pointer to your project and make this library deprecated.

@fkirc
Copy link
Author

fkirc commented Jul 3, 2019

I believe that it is not worth to create a standalone library.
I only created the following two files, everything else is just a copy of the zip4j source code:

https://github.com/fkirc/secure-zip-notes/blob/master/zip4j/build.gradle
https://github.com/fkirc/secure-zip-notes/blob/master/zip4j/src/main/AndroidManifest.xml

I use Gradle instead of Maven and I compile it as an "Android library", which is somewhat suboptimal.

@fkirc
Copy link
Author

fkirc commented Jul 3, 2019

Ironically, this repo is not as outdated as you might think.
There exists a Zip4J version 2.0.X, but I consider the 2.0.X version as not ready for production usage until my recent issues are resolved:
https://github.com/srikanth-lingala/zip4j/issues/

@johnml1135
Copy link

There have been quite a few updates to Zip4j recently (https://github.com/srikanth-lingala/zip4j/releases/tag/v2.1.4) I am very interested in using it, but I need it to work with streams as I am unzipping android data that is on the SD card (and need to use DocumentContract...urgh). Can you update to the most recent version?

@johnml1135
Copy link

I just realized a better way to use zip4j in my android project: reference it as an implementation (duh).

implementation 'net.lingala.zip4j:zip4j:2.1.4'

Make sure you also have mavenCentral added as a repo:

repositories {
    mavenCentral()
    ...
}

@joielechong
Copy link
Owner

@johnml1135: Thanks for the notice! I'll mark this project as deprecated and point to the https://github.com/srikanth-lingala/zip4j project in the README.

@johnml1135
Copy link

Actually, I tried it in my project and it is crashing before it opens up even through it builds and loads fine... I will be investigating more this next week.

@johnml1135
Copy link

johnml1135 commented Sep 20, 2019

Someone created a basic android project: https://github.com/nicolabeghin/zip4jtest - found on zip4j issue 34. It may be the solution we need.

@johnml1135
Copy link

From https://github.com/srikanth-lingala/zip4j:

"And also, Zip4j now supports a minimum of JRE 8, as compared to JRE 5 with 1.x, which obviously will bring some nice features that I can make use of."

Android's support for Java 8 is spotty (https://developer.android.com/studio/write/java8-support) and more work would have to be done to see how they could work together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants