Skip to content

Commit

Permalink
Gone gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneBeee committed Feb 4, 2024
1 parent 1519e2c commit effb543
Show file tree
Hide file tree
Showing 10 changed files with 478 additions and 122 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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: ['**']
pull_request:
branches: ['**']

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: build
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
# Artifact name
name: VirtualFurnace-Artifact
# A file, directory or wildcard pattern that describes what to upload
path: build/libs/VirtualFurnace*.jar
24 changes: 0 additions & 24 deletions .github/workflows/maven.yml

This file was deleted.

17 changes: 15 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/FakeFurnace.iml
/dependency-reduced-pom.xml
/.idea/
/javadocs.command
/VirtualFurnace.iml

# Compiled class file
*.class

/.gradle/
/.settings/
.project
.classpath
/build/
/bin/
/target/
src/.DS_Store
*.DS_Store
69 changes: 69 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
//file:noinspection GrDeprecatedAPIUsage
//file:noinspection GrUnresolvedAccess
//file:noinspection GroovyAssignabilityCheck
import org.apache.tools.ant.filters.ReplaceTokens

plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'maven-publish'
}

compileJava {
sourceCompatibility = '17'
targetCompatibility = '17'
options.encoding = 'UTF-8'
}

// VirtualFurnace version
version = '1.0.0'

repositories {
mavenCentral()
mavenLocal()

// Paper
maven { url 'https://repo.papermc.io/repository/maven-public/' }
}

dependencies {
// Paper
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")

// bStats
implementation(group: 'org.bstats', name: 'bstats-bukkit', version: '3.0.2')
}

build {
tasks.withType(JavaCompile).tap {
configureEach {
options.compilerArgs.add("-Xlint:unchecked")
//options.compilerArgs.add("-Xlint:deprecation")
}
}
}

processResources {
filter ReplaceTokens, tokens: ["version": project.version]
}

publishing {
publications {
maven(MavenPublication) {
groupId 'com.shanebeestudios'
artifactId 'VirtualFurnace'
version project.version
artifact jar
}
}
}

javadoc {
destinationDir = file("${buildDir}/javadoc")
options {
links('https://hub.spigotmc.org/javadocs/spigot/')
links('https://jd.advntr.dev/api/4.14.0/')
}
options.addStringOption('Xdoclint:none', '-quiet')
exclude("com/shanebeestudios/vf/**.java", "com/shanebeestudios/vf/command", "com/shanebeestudios/vf/debug")
}
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.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit effb543

Please sign in to comment.