Open schaferyan opened 9 months ago
thanks for the detailed report.
1- environment variable are always capitalized (common naming convention in *unix world). API_KEY. did you see a reference where it's not the case?
2- yeah, make all
is always recommended at first. gradle has weird behavior.
3- make dep
shouldn't have run the test. I modified the make file target to run skip running the tests.
4- I switched the demo to download the jar file from jitpack instead of local build, and fix the dependency.
com.github.serpapi:serpapi:1.0.0 : incorrect
'com.github.serpapi:serpapi-java:1.0.0' : correct
Good news. no new release required. only documentation fixes those issues. I have already pushed a change. can you double check if it resolved your concerns ?
tests are now all passing. https://github.com/serpapi/serpapi-java/actions/runs/7372604777
The documentation was updated to reflect best pratice. Let's me know if I can close this ?
Excellent, thank you @jvmvik! It works now!
My only further recommendation is to revise the Usage section of the Readme to reflect a few of the points addressed above.
1- environment variable are always capitalized (common naming convention in *unix world). API_KEY. did you see a reference where it's not the case? 2- yeah, make all is always recommended at first. gradle has weird behavior.
The current documentation reads:
To get started with this project in Java. We provided a fully working example.
git clone https://github.com/serpapi/serpapi-java.git
cd serpapi-java/demo
make run api_key=<your private key>
My suggestion is just to capitalize API_KEY and use make all
:
To get started with this project in Java. We provided a fully working example.
git clone https://github.com/serpapi/serpapi-java.git
cd serpapi-java/demo
make all API_KEY=<your private key>
Currently, the Demo can't be run by following the directions in the README. Hopefully we can either update the readme to reflect the necessary process, or make any fixes needed.
I ran into the following issues, some of which also occurred with the older google-search-results-java:
make
, "API_KEY" needs to be capitalized or it will return an errorWe need to run
make all
ormake init
to initialize the gradle wrapper in the demo folder.make dep
:This occurs regardless of whether the local .jar file or downloading from Jitpack is indicated in
build.gradle
. It seems to only occur in this library, not in the old google-search-results-java library.make build
, I run into one of two issues depending on how the dependency is declared inbuild.gradle
.If
implementation fileTree(dir: "./libs", includes: ['*.jar'])
is uncommented, I run into a similar issue to the one reported here.Also, there are some deprecation warnings from Gradle:
If
implementation 'com.github.serpapi:serpapi:1.0.0'
is uncommented I get the following error: