Engine/docs/docs/getting-started/installing.mdx
JeremyStarTM 37ac235662
Some checks are pending
build-and-test / generate-javadoc (push) Waiting to run
build-and-test / test (push) Waiting to run
build-and-test / build (push) Successful in 1m12s
Update versions and links in documentation
2024-10-16 13:09:53 +02:00

148 lines
5.2 KiB
Text

---
sidebar_position: 0
title: Installing the engine
---
# Installing the engine
```mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
```
## Gradle
Add StarOpenSource's maven repository to your `build.gradle` file first:
<Tabs groupId="gradle-dsl">
<TabItem value="gradle-groovy-dsl" label="Groovy DSL">
```groovy
repositories {
mavenCentral()
// sos!engine maven repository
maven {
name "staropensource-engine"
url "https://mvn.staropensource.de/engine"
}
}
```
</TabItem>
<TabItem value="gradle-kotlin-dsl" label="Kotlin DSL">
```kotlin
repositories {
mavenCentral()
// sos!engine maven repository
maven {
name = "staropensource-engine"
url = uri("https://mvn.staropensource.de/engine")
}
}
```
</TabItem>
</Tabs>
After that declare the engine as a dependency to your project in the `build.gradle` file:
<Tabs groupId="gradle-dsl">
<TabItem value="gradle-groovy-dsl" label="Groovy DSL">
```groovy
dependencies {
// sos!engine base
implementation 'de.staropensource.engine:base:' + project.dependencyStarOpenSourceEngine
// sos!engine subsystems
//implementation 'de.staropensource.engine:ansi:' + project.dependencyStarOpenSourceEngine // nice logging and ANSI support in your application
//compileOnly 'de.staropensource.engine:ansi:' + project.dependencyStarOpenSourceEngine // nice logging only
//compileOnly 'de.staropensource.engine:slf4j-compat:' + project.dependencyStarOpenSourceEngine // SLF4J compatibility
//implementation 'de.staropensource.engine:windowing:' + project.dependencyStarOpenSourceEngine // creating and managing windows, requires a Windowing API implementation
//compileOnly 'de.staropensource.engine:glfw:' + project.dependencyStarOpenSourceEngine // Windowing API implementation using GLFW
//implementation 'de.staropensource.engine:notification:' + project.dependencyStarOpenSourceEngine // sending and receiving notifications inside your application
}
```
</TabItem>
<TabItem value="gradle-kotlin-dsl" label="Kotlin DSL">
```kotlin
dependencies {
// sos!engine base
implementation("de.staropensource.engine:base:" + project.dependencyStarOpenSourceEngine)
// sos!engine subsystems
//implementation ("de.staropensource.engine:ansi:" + project.dependencyStarOpenSourceEngine) // nice logging and ANSI support in your application
//compileOnly ("de.staropensource.engine:ansi:" + project.dependencyStarOpenSourceEngine) // nice logging only
//compileOnly ("de.staropensource.engine:slf4j-compat:" + project.dependencyStarOpenSourceEngine) // SLF4J compatibility
//implementation ("de.staropensource.engine:windowing:' + project.dependencyStarOpenSourceEngine) // creating and managing windows, requires a Windowing API implementation
//compileOnly ("de.staropensource.engine:glfw:' + project.dependencyStarOpenSourceEngine) // Windowing API implementation using GLFW
//implementation ("de.staropensource.engine:notification:' + project.dependencyStarOpenSourceEngine) // sending and receiving notifications inside your application
}
```
</TabItem>
</Tabs>
... and add this property to the `settings.gradle` file:
```properties
# Set this to the engine version you want to use
dependencyStarOpenSourceEngine=1-alpha7
```
## Maven
Add StarOpenSource's maven repository to your `pom.xml` file first:
```xml
<repositories>
<!-- sos!engine maven repository -->
<repository>
<id>staropensource-engine</id>
<name>staropensource-engine</name>
<url>https://mvn.staropensource.de/engine</url>
</repository>
</repositories>
```
After that declare the engine as a dependency in your project:
```xml
<dependencies>
<!-- sos!engine base -->
<dependency>
<groupId>de.staropensource.engine</groupId>
<artifactId>base</artifactId>
<version>1-alpha7</version>
</dependency>
<!-- sos!engine subsystems -->
<!-- nice logging and ANSI support in your application
<dependency>
<groupId>de.staropensource.engine</groupId>
<artifactId>ansi</artifactId>
<version>1-alpha7</version>
</dependency>
-->
<!-- SLF4J compatibility
<dependency>
<groupId>de.staropensource.engine</groupId>
<artifactId>slf4j-compat</artifactId>
<version>1-alpha7</version>
</dependency>
-->
<!-- creating and managing windows, requires a Windowing API implementation
<dependency>
<groupId>de.staropensource.engine</groupId>
<artifactId>windowing</artifactId>
<version>1-alpha7</version>
</dependency>
-->
<!-- Windowing API implementation using GLFW
<dependency>
<groupId>de.staropensource.engine</groupId>
<artifactId>glfw</artifactId>
<version>1-alpha7</version>
</dependency>
-->
<!-- sending and receiving notifications inside your application
<dependency>
<groupId>de.staropensource.engine</groupId>
<artifactId>notification</artifactId>
<version>1-alpha7</version>
</dependency>
-->
</dependencies>
```