xpipe-mirror/DEVELOPMENT.md

59 lines
3.5 KiB
Markdown
Raw Normal View History

2023-04-16 23:06:59 +00:00
# Development
Any contribution is welcomed!
There are no real formal contribution guidelines right now, they will maybe come later.
## Repository Structure
2023-05-20 14:23:36 +00:00
- [core](core) - Shared core classes of the XPipe Java API, XPipe extensions, and the XPipe daemon implementation
- [beacon](beacon) - The XPipe beacon component is responsible for handling all communications between the XPipe
2023-04-16 23:06:59 +00:00
daemon
and the client applications, for example the various programming language APIs and the CLI
2023-05-20 14:23:36 +00:00
- [app](app) - Contains the XPipe daemon implementation, the XPipe desktop application, and an
API to create all different kinds of extensions for the XPipe platform
- [dist](dist) - Tools to create a distributable package of XPipe
- [ext](ext) - Available XPipe extensions. Essentially every feature is implemented as an extension
2023-04-16 23:06:59 +00:00
### Open source model
2023-05-20 14:23:36 +00:00
XPipe utilizes an open core model, which essentially means that
2023-04-16 23:06:59 +00:00
the main application is open source while certain other components are not.
Select parts are not open source yet, but may be added to this repository in the future.
Some tests and especially test environments and that run on private servers
are also not included in this repository (Don't want to leak server information).
Finally, scripts and workflows to create and publish installers and packages
2023-05-20 14:23:36 +00:00
are also not included to prevent attackers from easily impersonating the XPipe application.
2023-04-16 23:06:59 +00:00
## Modularity
2023-06-02 08:42:34 +00:00
All XPipe components target [Java 19](https://openjdk.java.net/projects/jdk/19/) and make full use of the Java Module System (JPMS).
2023-04-16 23:06:59 +00:00
All components are modularized, including all their dependencies.
In case a dependency is (sadly) not modularized yet, module information is manually added using [moditect](https://github.com/moditect/moditect-gradle-plugin).
Further, note that as this is a pretty complicated Java project that fully utilizes modularity,
many IDEs still have problems building this project properly.
For example, you can't build this project in eclipse or vscode as it will complain about missing modules.
The tested and recommended IDE is IntelliJ.
## Setup
2023-05-20 14:23:36 +00:00
You need to have an up-to-date version of XPipe installed on your local system in order to properly
run XPipe in a development environment.
2023-04-16 23:06:59 +00:00
This is due to the fact that some components are only included in the release version and not in this repository.
2023-05-20 14:23:36 +00:00
XPipe is able to automatically detect your local installation and fetch the required
2023-04-16 23:06:59 +00:00
components from it when it is run in a development environment.
## Building and Running
You can use the gradle wrapper to build and run the project:
- `gradlew app:run` will run the desktop application. You can set various useful properties in `app/build.gradle`
- `gradlew dist` will create a distributable production version in `dist/build/dist/base`.
- `gradlew <project>:test` will run the tests of the specified project.
You are also able to properly debug the built production application through two different methods:
- The `app/scripts/xpiped_debug` script will launch the application in debug mode and with a console attached to it
- The `app/scripts/xpiped_debug_attach` script attaches a debugger with the help of [AttachMe](https://plugins.jetbrains.com/plugin/13263-attachme).
Just make sure that the attachme process is running within IntelliJ, and the debugger should launch automatically once you start up the application.
2023-05-20 14:23:36 +00:00
Note that when any unit test is run using a debugger, the XPipe daemon process that is started will also attempt
2023-04-16 23:06:59 +00:00
to connect to that debugger through [AttachMe](https://plugins.jetbrains.com/plugin/13263-attachme) as well.