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

[Android][Volley] Build fixes #18899

Merged
merged 6 commits into from
Jun 16, 2024
Merged

Conversation

valpackett
Copy link
Contributor

These changes were required to make generated Volley code build with current Android SDK.

@jaz-ah

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh ./bin/configs/*.yaml
    ./bin/utils/export_docs_generators.sh
    
    (For Windows users, please run the script in Git BASH)
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • File the PR against the correct branch: master (upcoming 7.6.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@wing328
Copy link
Member

wing328 commented Jun 13, 2024

thanks for the PR

can you please run the following to update the samples?

 ./bin/generate-samples.sh ./bin/configs/unmaintained/android-*

(you may need to run it twice if there are new files)

@valpackett
Copy link
Contributor Author

Done

@wing328
Copy link
Member

wing328 commented Jun 14, 2024

looks good.

if you run gradle build under samples/client/petstore/android/volley/ and samples/client/petstore/android/httpclient/, do the build pass without issue?

As it is incompatible with Android
This fixes building with current Android Studio.

Android Gradle plugin version 8.0.0 was chosen for wider compatibility
with Android Studio versions (as far back as 2022.2.1).

The Maven plugin has been abandoned since the functionality is now
built in, and manual jar tasks are not necessary with it.
@valpackett
Copy link
Contributor Author

Well.. it didn't without modifications as there was the compileSdkVersion is not specified nonsense caused by the android-maven-gradle-plugin not being compatible with the new… version of Gradle itself I assume? and that option was enabled in the samples. That plugin was abandoned because the functionality is now part of the standard Android plugin itself.

I was a bit afraid to break backwards compatibility or whatever but since we're in unmaintained/ territory apparently anyway (…as if the outdated versions of everything weren't a hint, heh) I went ahead and updated all the Gradle stuff, replacing that plugin and the manual source jar task with the current standard way of configuring publishing. Now the samples just build out of the box with current Android Studio.

@wing328 wing328 merged commit 989a798 into OpenAPITools:master Jun 16, 2024
15 checks passed
@wing328
Copy link
Member

wing328 commented Jun 16, 2024

That plugin was abandoned because the functionality is now part of the standard Android plugin itself.

thanks for the PR, which has been merged.

would appreciate if you can file another PR to remove it as it's been abandoned.

@valpackett
Copy link
Contributor Author

would appreciate if you can file another PR to remove it as it's been abandoned.

That's what was already included in the latest revision! :)

replacing that plugin and the manual source jar task with the current standard way of configuring publishing

publishing {
publications {
release(MavenPublication) {
groupId = '{{groupId}}'
artifactId = '{{artifactId}}'
version = '{{artifactVersion}}'
afterEvaluate {
from components.release
}
}
}
}

@valpackett valpackett deleted the android-fixes branch June 16, 2024 18:58
@wing328
Copy link
Member

wing328 commented Jun 17, 2024

I see 👍

@wing328
Copy link
Member

wing328 commented Jun 17, 2024

when you've time, can you please PM me via Slack?

@wing328
Copy link
Member

wing328 commented Jun 17, 2024

btw, it would be nice to have Github workflow to test the Android petstore clients similar to https://github.com/OpenAPITools/openapi-generator/blob/master/.github/workflows/samples-java-client-jdk11.yaml for Java Petstore clients.

@valpackett
Copy link
Contributor Author

yeah. Sorry, I'm not really personally interested in picking this up, just fixing all the issues a company that hired me has encountered with their generated client libraries..

@wing328
Copy link
Member

wing328 commented Jun 18, 2024

no need to sorry

let's say if someone else have time to contribute the workflow

thanks again for the PR

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

Successfully merging this pull request may close these issues.

None yet

2 participants