Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
628cf4e
build: run workflow on pull request
Apr 12, 2025
a199315
build: try using full path
Apr 12, 2025
4330660
build: it should be string...
Apr 12, 2025
7b9937f
build: only run CI on master push or pull request
Apr 12, 2025
130a58f
build: wrong sdk version
Apr 12, 2025
0ac7a41
build: ls android sdk files
Apr 12, 2025
e31383e
build: echo updated path
Apr 12, 2025
5f3fe00
build: a
Apr 12, 2025
6ab731d
build: add general information
Apr 12, 2025
6368c34
build: lets try commandLine command
Apr 12, 2025
a4f98b3
build: idk
Apr 12, 2025
fb32234
build: whatever
Apr 12, 2025
3b94996
build: which first
Apr 12, 2025
769fa4e
build: oops
Apr 12, 2025
ee11edd
build: bash -c maybe???
Apr 12, 2025
6268ebd
build: use ' instead of " ????
Apr 12, 2025
3861dde
build: why....
Apr 12, 2025
06dc898
build: project.exec
Apr 12, 2025
c644e0b
build: lets try sh again
Apr 12, 2025
156675d
build: this is nuts
Apr 12, 2025
d2c9f5b
build: lets setup gradle
Apr 12, 2025
cefca0b
build: don't setup gradle
Apr 12, 2025
3b05b4e
build: run with debug
Apr 12, 2025
e79cc18
build: logger info
Apr 12, 2025
20c9880
build: remove dependencies
Apr 12, 2025
a595735
build: maybe its order???
Apr 12, 2025
c086eff
build: lets try old approach
Apr 12, 2025
5d5d4c3
build: this actually works?
Apr 12, 2025
453a84c
build: what?
Apr 12, 2025
6e59017
build: what???
Apr 12, 2025
a244da2
build: forgot here
Apr 12, 2025
b3d2f1d
build: make directory first???
Apr 12, 2025
0713bfc
build: do first maybe
Apr 12, 2025
48bf692
build: wrong path for jar
Apr 12, 2025
4a2dfb6
build: oops
Apr 12, 2025
3d5d533
build: try again
Apr 12, 2025
a2f3e20
build: use buildDirectory
Apr 12, 2025
a42e242
build: use buildDirectory.get()
Apr 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Java CI

on: [push]
on:
push:
branches:
- master
pull_request:

jobs:
buildJar:
Expand All @@ -14,9 +18,17 @@ jobs:
java-version: 17
- name: Set up PATH
run: |
ls "${ANDROID_HOME}/build-tools/34.0.0"
echo "${ANDROID_HOME}/build-tools/34.0.0" >> $GITHUB_PATH
echo "Updated PATH: $PATH"
- name: General information
run: |
java --version
d8 --version
- name: Build mod jar
run: ./gradlew deploy
run: |
chmod +x gradlew
./gradlew deploy
- name: Upload built jar file
uses: actions/upload-artifact@v4
with:
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ tasks.register('jarAndroid') {

//dex and desugar files - this requires d8 in your PATH
"$d8 $dependencies --min-api 14 --output ${project.archivesBaseName}Android.jar ${project.archivesBaseName}Desktop.jar"
.execute(null, new File("$project.rootProject.layout.buildDirectory/libs")).waitForProcessOutput(System.out, System.err)
.execute(null, new File("${layout.buildDirectory.get()}/libs")).waitForProcessOutput(System.out, System.err)
}
}

jar{
archiveFileName = "${project.rootProject.layout.buildDirectory}Desktop.jar"
archiveFileName = "${project.archivesBaseName}Desktop.jar"

from{
configurations.runtimeClasspath.collect{ it.isDirectory() ? it : zipTree(it) }
Expand All @@ -99,10 +99,10 @@ tasks.register('deploy', Jar) {
dependsOn jar
archiveFileName = "${project.archivesBaseName}.jar"

from { [zipTree("$rootProject.layout.buildDirectory/libs/${project.archivesBaseName}Desktop.jar"), zipTree("$rootProject.layout.buildDirectory/libs/${project.archivesBaseName}Android.jar")] }
from { [zipTree("${layout.buildDirectory.get()}/libs/${project.archivesBaseName}Desktop.jar"), zipTree("${layout.buildDirectory.get()}/libs/${project.archivesBaseName}Android.jar")] }

doLast {
delete { delete "$rootProject.layout.buildDirectory/libs/${project.archivesBaseName}Desktop.jar" }
delete { delete "$rootProject.layout.buildDirectory/libs/${project.archivesBaseName}Android.jar" }
delete { delete "${layout.buildDirectory.get()}/libs/${project.archivesBaseName}Desktop.jar" }
delete { delete "${layout.buildDirectory.get()}/libs/${project.archivesBaseName}Android.jar" }
}
}