Quelea is built on Java 1.11 and Gradle; you will need those tools installed locally to compile the application.
If you're not familiar with working on Java desktop applications, you can follow these steps to get started contributing to Quelea using IntelliJ IDEA. IntelliJ IDEA is not required to work on Quelea; these are just steps for getting started if you're not already familiar with Java IDEs.
The instructions below use IntelliJ version 2022.2.2.
- Download and install IntelliJ IDEA Community version for free. Gradle is bundled with it. A Java JDK 11 might be downloaded from within IntelliJ as well - see step 11.
- Fork the Quelea repository and git clone it locally.
- Open IntelliJ IDEA.
- Choose Get from VCS from the top right of the welcome window.
- In the URL box paste the URL to your Quelea Github fork
- In the Directory box either type the path you want to store the files (
/home/user/development/Quelea
in the screenshot) or click the folder icon on the right to use the file browser - Click Clone and IntelliJ will copy down the relevant files. This will take a few minutes
- Once IntelliJ has copied the files it will open and present you with the readme file.
- In the bottom right you should see a pop-up message stating that Gradle script files have been found. Click Load to import these.
- IntelliJ will ask if you want to trust this Gradle project. If you do, click Trust Project. Note the import will not continue if you choose to stay in safe mode.
- Open Project Structure settings (File -> Project Structure... -> Project) and make sure that you have a Java JDK 11 selected as SDK and that language level is set to 11.
If you have no java JDK 11 installed yet, you can download one (e.g. amazon corretto 11) in the same window
- Open IntelliJ's Gradle JVM settings (File > Settings > Build, Execution, Deployment > Gradle) and ensure that Gradle JVM has the downloaded Java JDK 11 selected. OK this window.
- Search for IntelliJ's Gradle tab and unfold Quelea -> Tasks -> application. Right-click on 'run' and select Debug 'Quelea [run]'
If everything went smoothly, you should see Quelea launch. You're now ready to make and test changes!
While looking at your GitHub fork there is a green Code button. Click this and you will be offered several options to checkout your fork (SSH is shown).
Click the copy icon to the right of the text box. This is what you'll paste into IntelliJ.
Alternatively you can use Visual Studio Code to develop Quelea. Further instructions worked for vscode 1.74. Adapt for your situation and skip steps you've already done. Use common sense.
- Open Github and log in to your Github account. Fork the Quelea repository and note the new repository URL -
https://github.com/yourusername/Quelea.git
. - Download, install and start vscode.
- In 'Extensions' (Ctrl+Shift+X) search and install 'Extension Pack for Java'. This will install several packages to work with Java programming language.
- Soon the page 'Get started with Java Development' opens, click 'Install JDK'. Tab 'Others' has a link to Amazon Corretto. Open that link and download Amazon Corretto 11 for your platform.
- Install Amazon Corretto 11 to your system. Note the target folder for next step.
- In vscode open 'Settings' (Ctrl+,) and search 'java.configuration.runtimes' then select 'Edit in settings.json'. Add your new JDK settings:
{
"name": "JavaSE-11",
"path": "C:\\Program Files\\Amazon Corretto\\jdk11.0.17_8"
}
On Windows the backslashes in 'path' must be doubled.
- In 'Extensions' (Ctrl+Shift+X) search and install 'Gradle for Java'.
- In 'Extensions' (Ctrl+Shift+X) search and install 'GitLens' - will help with Git management later.
- In 'Source Control' (Ctrl+Shift+G) select 'Clone Repository'.
- Enter your repository URL from step 1 -
https://github.com/yourusername/Quelea.git
.
- Select a folder for local copy of Quelea source code. Wait for the sync. It may take some time here. VSCode can ask for your Github credentials. It will use these later when you push your commits back to Github.
- 'Open Folder' (Ctrl+K Ctrl+O) with the local source code (vscode may offer to 'View Projects' or 'Open Folder' just after git-clonning).
- Select 'Yes, I trust the authors' to start gradle processing the new repo.
-
Wait some minutes before gradle downloads all required packages.
-
As soon as gradle finishes, 'Open Folder' (Ctrl+K Ctrl+O) and select subfolder 'Quelea' in the new repository (not the main Quelea folder).
-
Now you are ready to make changes to source files, preferably create a new git branch for every bug you fix or a new feature you develop. Git and vscode have good documentation on that.
-
Debugging is possible - 'Run and Debug' (Ctrl+Shift+D), select the Class you want to start (MainStub starts Quelea app, the others are auxiliary utilities you will probably not ever touch). Set your breakpoints, hit F5 and soon Quelea starts in debug mode.