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

Allow to set minSdkVersion outside of android folder[Feature]: #7408

Closed
1 of 3 tasks
a-poliusov opened this issue Apr 16, 2024 · 3 comments
Closed
1 of 3 tasks

Allow to set minSdkVersion outside of android folder[Feature]: #7408

a-poliusov opened this issue Apr 16, 2024 · 3 comments
Labels

Comments

@a-poliusov
Copy link

Description

Allow to set minSdkVersion outside of android folder

Platforms

  • iOS
  • Android
  • Web

Request or proposed solution

My android folder is generated each time I deploy my app, I don't have the access to the android folder.
I need to change minSdkVersion somehow.

Alternatives

No response

Additional Information

No response

@jcesarmobile
Copy link
Member

In Capacitor projects you are supposed to commit the android folder, not recreate it every time.

You can use trapeze to edit the gradle file
https://trapeze.dev/docs/Operations/android#gradle

Or use a capacitor hook to edit the /android/variables.gradle file.

@jcesarmobile jcesarmobile closed this as not planned Won't fix, can't repro, duplicate, stale Apr 16, 2024
@a-poliusov
Copy link
Author

a-poliusov commented Apr 17, 2024

@jcesarmobile it would be great if you provide more info on that. What are the hooks and how to use em? Does it solve my problem of editing sdkVersion without android folder? I don't even have the folder inside my git repo.

Why do ionic generate the android folder if we have to edit it?
If something is generated, there should be methods to adjust it

@jcesarmobile
Copy link
Member

It's not "generated", it's added to your project when you run npx cap add, which you should run only once and you should commit the source code, and make any manual changes you want, capacitor will not make any changes into your project once you have added the platform to it.

hooks are just a way of executing code on certain capacitor commands https://capacitorjs.com/docs/cli/hooks
but they don't do anything by themselves, you have to create your scripts (node.js or bash or whatever) to be executed when the hook fires.

If you have questions you can ask on the discussions section
https://github.com/ionic-team/capacitor/discussions
Or on ionic forum
https://forum.ionicframework.com/c/capacitor/26

@ionic-team ionic-team locked as resolved and limited conversation to collaborators Apr 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants