Skip to content

Commit

Permalink
desktop build
Browse files Browse the repository at this point in the history
  • Loading branch information
msx80 committed Sep 19, 2024
1 parent 8a38ef0 commit bdd23a6
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ jobs:
with:
name: 'doorsofdoom.apk'
path: android-mvn/target/doorsofdoom.apk
- name: Build desktop
run: |
cd desktop-mvn
mvn --batch-mode -Dcartridge.artifactId=doorsofdoom -Dcartridge.groupId=com.github.msx80.omicron -Dcartridge.version=$GITHUB_DDVER clean package
- name: Deploy Desktop
uses: actions/upload-artifact@v4
with:
name: 'doorsofdoom-desktop.jar'
path: desktop-mvn/target/doorsofdoom-desktop.jar
- name: Deploy cartridge
uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion android-mvn/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<gdx.version>1.12.1</gdx.version>
<omicron.engine.version>0.0.7</omicron.engine.version>
<omicron.engine.version>0.0.8</omicron.engine.version>
</properties>

<pluginRepositories>
Expand Down
2 changes: 1 addition & 1 deletion android-mvn/src/main/AndroidManifest.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
android:label="Crash report" >
</activity>
</application>
<uses-sdk android:minSdkVersion="26" />
<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="26" />
</manifest>
17 changes: 17 additions & 0 deletions desktop-mvn/assembly.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.1 https://maven.apache.org/xsd/assembly-2.1.1.xsd">
<id>desktop</id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<dependencySet>
<outputDirectory>/</outputDirectory>
<useProjectArtifact>true</useProjectArtifact>
<unpack>true</unpack>
<scope>runtime</scope>
</dependencySet>
</dependencySets>
</assembly>
96 changes: 96 additions & 0 deletions desktop-mvn/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.github.msx80.omicron</groupId>
<artifactId>desktop-wrapper</artifactId>
<version>1.0.0</version>

<properties>

<!-- This is the omicron cartridge to be package as an Android app. You can pass the properties as arguments to mvn with -D -->
<!--
<cartridge.artifactId>helloworld</cartridge.artifactId>
<cartridge.groupId>com.github.msx80.omicron</cartridge.groupId>
<cartridge.version>0.0.3</cartridge.version> -->
<!-- ============================================================ -->

<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<gdx.version>1.12.1</gdx.version>
<omicron.engine.version>0.0.8</omicron.engine.version>
</properties>

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>

<dependency>
<artifactId>${cartridge.artifactId}</artifactId>
<groupId>${cartridge.groupId}</groupId>
<version>${cartridge.version}</version>
</dependency>

<dependency>
<groupId>com.github.msx80.omicron</groupId>
<artifactId>desktop-lib</artifactId>
<version>${omicron.engine.version}</version>
</dependency>
<!--
<dependency>
<groupId>com.github.msx80.omicron</groupId>
<artifactId>omicron-desktop</artifactId>
<version>${omicron.engine.version}</version>
</dependency>
-->
</dependencies>

<build>

<pluginManagement>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
</plugin>

</plugins>
</pluginManagement>

<plugins>


<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.github.msx80.omicron.MainLauncher</mainClass>
</manifest>
</archive>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
<finalName>${cartridge.artifactId}</finalName>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
4 changes: 2 additions & 2 deletions doorsofdoom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<omicron.engine.version>0.0.7</omicron.engine.version>
<omicron.engine.version>0.0.8</omicron.engine.version>
</properties>
<repositories>
<repository>
Expand All @@ -29,7 +29,7 @@
<dependency>
<groupId>com.github.msx80</groupId>
<artifactId>omicron-basics</artifactId>
<version>0.0.2</version>
<version>0.0.3</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
Expand Down

0 comments on commit bdd23a6

Please sign in to comment.