Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
47 changes: 47 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: Java CI with Gradle

on:
push:
branches:
- master
- 'dev/**'
pull_request:

permissions:
contents: read

jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3.6.0
- name: Set up JDK 21
uses: actions/setup-java@v4.2.1
with:
java-version: '21'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/actions/setup-gradle@v3
with:
arguments: build
- name: Upload a Build Artifact Jar
uses: actions/upload-artifact@master
with:
# Artifact name
name: McDeob-Java-Jar
# A file, directory or wildcard pattern that describes what to upload
path: build/libs/McDeob-*.jar
- name: Upload a Build Artifact macOS DMG
uses: actions/upload-artifact@master
with:
# Artifact name
name: McDeob-macOS-DMG
# A file, directory or wildcard pattern that describes what to upload
path: build/libs/McDeob-*.dmg
42 changes: 0 additions & 42 deletions .github/workflows/maven.yml

This file was deleted.

11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,14 @@ That said, you may **NOT** upload the resulting files to something like GitHub.

## Building/Compiling:
If you wish to compile the jar yourself, simply clone the repo and run:
`mvn clean package`
If you want the macOS APP and DMG file run:
`mvn clean package -P macos`
`./gradlew jar`

If you wish to compile the macOS app, run:
`./gradlew createApp`

If you want the macOS app and DMG file, run:
`./gradlew createDmg`

Super Simple!!!

## Tools:
Expand Down
67 changes: 67 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import groovy.lang.Closure

plugins {
id("java")
id("com.gradleup.shadow") version "9.2.0"
id("edu.sc.seis.macAppBundle") version "2.3.1"
}

// Version of McDeob
val projectVersion = "3.3.0"
java.sourceCompatibility = JavaVersion.VERSION_21

repositories {
mavenLocal()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://hub.spigotmc.org/nexus/content/repositories/public/")
maven("https://jitpack.io")
maven("https://repo.maven.apache.org/maven2/")
}

dependencies {
compileOnly("org.jetbrains:annotations:24.1.0")
implementation("org.json:json:20210307") {
isTransitive = false
}
implementation("net.md-5:SpecialSource:1.11.5-SNAPSHOT") {
//exclude("com.google.guava")
exclude("com.opencsv")
}
implementation("io.papermc:patched-spigot-fernflower:0.1+build.13") {
isTransitive = false
}
}

tasks {
compileJava {
options.release = 21
options.compilerArgs.add("-Xlint:unchecked")
options.compilerArgs.add("-Xlint:deprecation")
}
shadowJar {
enableAutoRelocation = true
relocationPrefix = "shaded-libs"
archiveFileName = project.name + "-" + projectVersion + ".jar"
manifest.attributes["Main-Class"] = "com.shanebeestudios.mcdeob.McDeob"
}
jar {
dependsOn(shadowJar)
}
createDmg {
dependsOn(jar)
}
}

macAppBundle {
mainClassName = "com.shanebeestudios.mcdeob.McDeob"
icon = "src/main/resources/images/1024.icns"
runtimeConfigurationName = "shadow"
jarTask = "shadowJar"
appOutputDir = "libs"
dmgOutputDir = "libs"
dmgName = "McDeob-macOS-$projectVersion"
bundleExtras["CFBundleVersion"] = projectVersion
bundleExtras["CFBundleShortVersionString"] = "Version"
bundleExtras["NSRequiresAquaSystemAppearance"] = false
javaExtras["-Xms3G"] = null
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading