Skip to content
Open
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
42 changes: 42 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Java CI with Gradle (main - snaphot)

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK 8
id: setup_jdk_8
uses: actions/setup-java@v1
with:
java-version: 8
# - name: Install advancecomp and strip-nondeterminism
# run: sudo apt-get install advancecomp strip-nondeterminism -y
- name: Build with Gradle
uses: eskatos/gradle-command-action@v1
with:
gradle-version: wrapper
wrapper-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
arguments: build
# - name: Run strip-nondeterminism on built .jar files
# run: strip-nondeterminism build/libs/*.jar
# - name: Run advzip (-i 99) on built .jar files
# run: advzip --shrink-insane -kzi 99 -p build/libs/*.jar
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: SnapshotPackage
path: build/libs
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# general
*.class
*.log
*.ctxt
.mtj.tmp/
*.war
*.ear
*.zip
*.tar.gz
*.rar
hs_err_pid*

# legacy eclipse ignores of dubious use
/target/
/bin/
.classpath
.project
.metadata/
.settings/
src/.classpath
src/.project
src/.settings/

# gradle
build
.gradle

# mac os
.DS_Store
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PigSpawnerFinder
Finds seeds with pig spawners

if you want to run this you also need KaptainWutax's BiomesUtils, SeedUtils and MathUtils libraries
To use, first build the project with Gradle, and then run the built .jar file PigSpawnerFinder-all.jar in ./build/libs.
70 changes: 70 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
plugins {
id 'application'
id 'com.github.johnrengelman.shadow' version '6.1.0'
}

// Reproducible builds
tasks.withType(AbstractArchiveTask) {
preserveFileTimestamps = false
reproducibleFileOrder = true
}

apply plugin: 'java'

// Defines a Java 8 compatible JDK.
def compiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(8)
}

// Tells Gradle to use the previously defined Java 8 compatible JDK.
java {
toolchain {
compiler
}
}

// Tells Gradle to always compile with the previously defined Java 8 compatible JDK.
tasks.withType(JavaCompile).configureEach {
javaCompiler = compiler
}

tasks.withType(JavaCompile) {
// Ensures that the encoding of source files is set to UTF-8, see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
options.encoding = "UTF-8"
}

repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}

dependencies {
implementation ('com.github.KaptainWutax:BiomeUtils:-SNAPSHOT'){
transitive = false
}
implementation ('com.github.KaptainWutax:SeedUtils:-SNAPSHOT'){
transitive = false
}
implementation ('com.github.KaptainWutax:MathUtils:-SNAPSHOT'){
transitive = false
}
implementation("com.google.guava:guava:30.1-jre")
}

// Package dependencies with Shadow plugin
shadowJar {
minimize()
mainClassName = 'randomreverser.PigSpawnerFinder'
}

application {
mainClass = 'randomreverser.PigSpawnerFinder'
}

jar {
manifest {
attributes (
'Main-Class': 'randomreverser.PigSpawnerFinder'
)
}
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
185 changes: 185 additions & 0 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading