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

Having to flutter build apk to get gradle dependencies is problematic #628

Open
Tracked by #1172
HosseinYousefi opened this issue Jun 1, 2023 · 3 comments
Open
Tracked by #1172

Comments

@HosseinYousefi
Copy link
Member

After updating the version of package:jni, some of the previously written generated code naturally became incorrect. Regenerating the code using JNIgen prompts you to run flutter build apk but flutter build apk needs all Dart code to be valid to succeed.

One could technically first build the apk and only then update the package:jni version but in general it's annoying to be fully building an app just to get the gradle dependencies.

Instead we can use an isolated command that only fetches the dependencies and mention that in our documentation intead of flutter build apk.

cc/ @mahesh-hegde

@mahesh-hegde
Copy link
Contributor

The problem is that, to do all this we need some knowledge of gradle which takes a week of study.

Further complicating matters AGP (android gradle plugin) is a different kind of beast than standard java gradle project.

In case of maven, it was 1 command, haha.

I won't be getting sufficient time to focus on coding anytime soon. You might want to check with someone at Google who already knows AGP pretty well.

@HosseinYousefi
Copy link
Member Author

No worries, was just letting you know because you worked on the gradle stuff.

It's not a pressing issue, but still useful to solve. Will ask around!

@mahesh-hegde
Copy link
Contributor

Gradle plugins will usually require you to add a line like this in build.gradle

apply "myplugin"

If that's fine, we can probably implement a plugin, which is more reliable than editing build scripts in place..

@HosseinYousefi HosseinYousefi transferred this issue from dart-archive/jnigen Nov 17, 2023
parlough pushed a commit to parlough/native that referenced this issue Apr 8, 2024
…ng#628)

Bumps [coverallsapp/github-action](https://github.com/coverallsapp/github-action) from 2.2.1 to 2.2.3.
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/coverallsapp/github-action/commit/3dfc5567390f6fa9267c0ee9c251e4c8c3f18949"><code>3dfc556</code></a> fix: don't fail if bin directory exists on windows (<a href="https://redirect.github.com/coverallsapp/github-action/issues/189">#189</a>)</li>
<li><a href="https://github.com/coverallsapp/github-action/commit/3b7078ee895f74fc267b7b267c88211df59fa816"><code>3b7078e</code></a> feat: use pwsh for windows runner (<a href="https://redirect.github.com/coverallsapp/github-action/issues/188">#188</a>)</li>
<li>See full diff in <a href="https://github.com/coverallsapp/github-action/compare/95b1a2355bd0e526ad2fd62da9fd386ad4c98474...3dfc5567390f6fa9267c0ee9c251e4c8c3f18949">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=coverallsapp/github-action&package-manager=github_actions&previous-version=2.2.1&new-version=2.2.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>
@HosseinYousefi HosseinYousefi self-assigned this May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

2 participants