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

Add build instructions for simple prebuilt apps #982

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

TanguyP
Copy link

@TanguyP TanguyP commented Jul 20, 2024

As suggested in this PDF Viewer issue, it could be useful to document on the website the build process for apps such as PDF Viewer. Though the process is quite simple, having it documented lowers the barrier for contributions.

Therefore, this PR proposes a first version of such documentation, which I've tried to keep high-level and mostly OS-agnostic. Once we have this, we can modify the READMEs of repositories which comply with this build process (PDF Viewer, Apps, etc.) to point to this documentation.

@thestinger
Copy link
Member

@TanguyP Can you rebase this and change it to OpenJDK 17 instead of 21? We actually use 21 for Gradle and 17 for compilation.

We rebased the history to deter people responding to older wording than what we published on the site for an article. I know it's annoying.

@TanguyP TanguyP force-pushed the docs/how-to-build-apps branch from 517d657 to 1fc2b0f Compare July 21, 2024 09:16
@TanguyP
Copy link
Author

TanguyP commented Jul 21, 2024

@TanguyP Can you rebase this and change it to OpenJDK 17 instead of 21?

Presumably you meant the other way around :) it's done. Do let me know if there are any other concerns with the PR.

@thestinger
Copy link
Member

Yes, I meant the other way around.

standard <code>gradle</code> Android plugin build system. You can also build those apps from the source code by following these steps:
</p>
<ul>
<li>Install Gradle, OpenJDK 21 for developers (which should be called <code>java-21-openjdk-devel</code> on Linux), Android Studio, and npm.</li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only the name of the package on Debian distributions and isn't the name on Arch Linux or elsewhere. On Arch Linux, the package name is jdk21-openjdk by comparison with jre21-openjdk as the subset without all the development tools. Debian has a standard devel split they use but it's not clear exactly what they did in this case. Arch Linux normally doesn't split headers, etc. into a separate package but the JDK is a special case.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, thanks. Would this be ok?

Suggested change
<li>Install Gradle, OpenJDK 21 for developers (which should be called <code>java-21-openjdk-devel</code> on Linux), Android Studio, and npm.</li>
<li>Install Gradle, Android Studio, npm, and OpenJDK 21 (<code>java-21-openjdk-devel</code> package on Debian distributions, <code>jdk21-openjdk</code> on Arch Linux distributions...).</li>

</p>
<ul>
<li>Install Gradle, OpenJDK 21 for developers (which should be called <code>java-21-openjdk-devel</code> on Linux), Android Studio, and npm.</li>
<li>In the project you want to build, create a <code>local.properties</code> file and inside it, set the path to your JDK e.g. <code>sdk.dir=/home/jane.doe/Android/Sdk</code></li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a lot easier to export ANDROID_HOME in your environment so that Gradle creates local.properties itself for each project.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<li>In the project you want to build, create a <code>local.properties</code> file and inside it, set the path to your JDK e.g. <code>sdk.dir=/home/jane.doe/Android/Sdk</code></li>
<li>Export the <code>ANDROID_HOME</code> environment variable and make it point to your JDK folder</li>

@thestinger thestinger force-pushed the main branch 3 times, most recently from 36d60a6 to ebdb522 Compare November 28, 2024 02:07
@thestinger thestinger force-pushed the main branch 13 times, most recently from 6df6261 to 9ff9ebe Compare December 9, 2024 22:49
@thestinger thestinger force-pushed the main branch 7 times, most recently from 344eae9 to 8889812 Compare December 20, 2024 22:09
@thestinger thestinger force-pushed the main branch 2 times, most recently from fde2131 to df7ee49 Compare December 29, 2024 21:13
@thestinger thestinger force-pushed the main branch 5 times, most recently from 5e4c313 to 811e79d Compare January 18, 2025 08:18
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

Successfully merging this pull request may close these issues.

2 participants