-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b84b2c
commit 215135e
Showing
23 changed files
with
620 additions
and
412 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
exclude_paths: | ||
- 'docs/**' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
plugins: | ||
fixme: | ||
enabled: true | ||
git-legal: | ||
enabled: true | ||
markdownlint: | ||
enabled: true | ||
|
||
exclude_patterns: | ||
- "gradle/" | ||
- "docs/" | ||
- "gradlew" | ||
- "gradlew.bat" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: gradle | ||
directory: "/" | ||
schedule: | ||
interval: monthly | ||
open-pull-requests-limit: 50 | ||
target-branch: main | ||
labels: | ||
- dependabot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
daysUntilStale: 60 | ||
daysUntilClose: 7 | ||
exemptLabels: | ||
- "help wanted" | ||
exemptProjects: true | ||
exemptMilestone: true | ||
staleLabel: "stale" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Gradle Build | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'docs/**' | ||
- '.github/**' | ||
branches: | ||
- 1.18-fabric | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
branches: | ||
- 1.18-fabric | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 17 | ||
distribution: temurin | ||
|
||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
gradle-version: 7.3 | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew build | ||
|
||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
path: "./build/libs/*" | ||
|
||
- name: Delete dev files | ||
run: find ./build/libs/ -regex '.*-dev.jar' -delete | ||
|
||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: "build-latest" | ||
prerelease: true | ||
files: ./build/libs/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,29 @@ | ||
#General use .gitignore for Minecraft modding. | ||
# Compiled class file | ||
*.class | ||
|
||
#Folders | ||
/.gradle/* | ||
/.idea/* | ||
/asm/* | ||
/bin/* | ||
/build/* | ||
/eclipse/* | ||
/libs/* | ||
/out/* | ||
/classes/* | ||
/run/* | ||
/compiled/* | ||
/docs/* | ||
/libs/* | ||
# Log file | ||
*.log | ||
|
||
#File Extensions | ||
*.classpath | ||
*.db | ||
*.iml | ||
/build/*.jar | ||
*.ipr | ||
*.iws | ||
*.launch | ||
*.project | ||
*.psd | ||
*.pdn | ||
# Package Files # | ||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
|
||
# Gradle | ||
build/ | ||
.gradle | ||
|
||
# IntelliJ project files | ||
.idea | ||
*.iml | ||
out | ||
gen | ||
|
||
#Specific files | ||
.floo | ||
.flooignore | ||
# Fabric | ||
run/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"ignoredFiles": [ | ||
"src/main/resources/*" | ||
], | ||
"schedule": "monthly", | ||
"compressWiki": "true" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Minecraft-Beta-1.3-Unfix | ||
Unfixes a most important fix from Beta 1.3 - Milk-able squids. | ||
# SquidMilk ![Build](https://github.com/DeflatedPickle/SquidMilk/actions/workflows/gradle-build.yml/badge.svg) | ||
A Minecraft Fabric mod that unfixes milkable squids |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,146 @@ | ||
//file:noinspection GrMethodMayBeStatic | ||
|
||
plugins { | ||
id 'fabric-loom' | ||
id 'maven-publish' | ||
id 'org.jetbrains.kotlin.jvm' | ||
id 'com.diffplug.spotless' | ||
} | ||
id 'maven-publish' | ||
|
||
version = "$minecraft_version-$mod_version-$mod_loader" | ||
group = "com.${developer.toLowerCase()}" | ||
archivesBaseName = "$mod_id" | ||
id 'org.jetbrains.kotlin.jvm' | ||
|
||
sourceCompatibility = targetCompatibility = "$jvm_version" | ||
id 'fabric-loom' | ||
|
||
id 'com.diffplug.spotless' | ||
id 'net.kyori.blossom' | ||
} | ||
|
||
archivesBaseName = project.archives_base_name | ||
version = project.mod_version | ||
group = project.maven_group | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { url 'https://jitpack.io' } | ||
maven { url "https://maven.terraformersmc.com" } | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
minecraft "com.mojang:minecraft:$minecraft_version" | ||
mappings "net.fabricmc:yarn:$yarn_mappings:v$yarn_version" | ||
modImplementation "net.fabricmc:fabric-loader:$loader_version" | ||
minecraft "com.mojang:minecraft:${minecraft_version()}" | ||
mappings "net.fabricmc:yarn:${minecraft_version()}+${yarn_mappings}:v2" | ||
modImplementation "net.fabricmc:fabric-loader:${loader_version}" | ||
|
||
modImplementation "net.fabricmc.fabric-api:fabric-api:$fabric_version" | ||
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}+${minecraft_version_short()}" | ||
modImplementation "net.fabricmc:fabric-language-kotlin:${fabric_kotlin_version}+kotlin.${kotlin_version}" | ||
|
||
modImplementation "net.fabricmc:fabric-language-kotlin:$fabric_kotlin_version+kotlin.$kotlin_version" | ||
// https://fabricmc.net/wiki/documentation:libraries | ||
modImplementation "com.terraformersmc:modmenu:${modmenu_version}" | ||
} | ||
|
||
processResources { | ||
inputs.property "version", version | ||
|
||
filesMatching("fabric.mod.json") { | ||
expand "version": version | ||
} | ||
compileJava { | ||
options.encoding = "UTF-8" | ||
sourceCompatibility = targetCompatibility = project.java_version | ||
} | ||
|
||
tasks.withType(JavaCompile) { | ||
it.options.encoding = "UTF-8" | ||
compileKotlin { | ||
kotlinOptions { | ||
jvmTarget = project.java_version | ||
} | ||
sourceCompatibility = targetCompatibility = project.java_version | ||
} | ||
|
||
compileKotlin { | ||
kotlinOptions { | ||
jvmTarget = "$jvm_version" | ||
} | ||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(project.java_version) | ||
} | ||
withSourcesJar() | ||
} | ||
|
||
sourceSets.main.resources { | ||
srcDirs 'src/generated/resources/' | ||
jar { | ||
from("LICENSE") { | ||
rename { "${it}_${project.archivesBaseName}" } | ||
} | ||
} | ||
|
||
spotless { | ||
java { | ||
importOrder() | ||
removeUnusedImports() | ||
googleJavaFormat() | ||
ratchetFrom "origin/${branch}" | ||
|
||
java { | ||
importOrder() | ||
removeUnusedImports() | ||
googleJavaFormat() | ||
|
||
licenseHeader "/* ${expand_license(license_header)} */\n\n" | ||
} | ||
|
||
licenseHeader "/* $license_header */\n\n" | ||
} | ||
groovyGradle { | ||
target '*.gradle' | ||
greclipse() | ||
} | ||
|
||
kotlin { | ||
ktlint() | ||
kotlin { | ||
ktlint(ktlint_version) | ||
|
||
licenseHeader "/* $license_header */\n\n" | ||
} | ||
licenseHeader "/* ${expand_license(license_header)} */\n\n" | ||
} | ||
|
||
format 'misc', { | ||
target '*.md', '.gitignore' | ||
|
||
trimTrailingWhitespace() | ||
indentWithTabs() | ||
endWithNewline() | ||
} | ||
} | ||
compileJava.dependsOn spotlessApply | ||
compileKotlin.dependsOn spotlessApply | ||
|
||
blossom { | ||
replaceToken('$[name]', project.property('mod_name')) | ||
replaceToken('$[author]', project.property('mod_author')) | ||
replaceToken('$[version]', project.property('mod_version')) | ||
|
||
replaceToken('$[id]', project.property('archives_base_name')) | ||
replaceToken('$[group]', project.property('maven_group')) | ||
|
||
replaceToken('$[java]', project.property('java_version')) | ||
replaceToken('$[kotlin]', project.property('kotlin_version')) | ||
|
||
replaceToken('$[minecraft]', minecraft_version()) | ||
replaceToken('$[yarn]', project.property('yarn_mappings')) | ||
replaceToken('$[loader]', project.property('loader_version')) | ||
replaceToken('$[loom]', project.property('loom_version')) | ||
replaceToken('$[fabric_version]', project.property('fabric_version')) | ||
} | ||
|
||
processResources { | ||
filesMatching("*.json") { | ||
expand([ | ||
"id" : project.archives_base_name, | ||
"name" : project.mod_name, | ||
"version" : project.version, | ||
"author" : project.mod_author, | ||
"desc" : project.mod_desc, | ||
"site" : project.mod_site, | ||
"src" : project.mod_src, | ||
"minecraft": minecraft_version(), | ||
"fabric" : project.fabric_version, | ||
"loader" : project.loader_version, | ||
"java" : project.java_version, | ||
"adapter" : project.fabric_kotlin_version, | ||
"group" : project.maven_group, | ||
"license" : project.license_type, | ||
]) | ||
} | ||
} | ||
|
||
String minecraft_version() { | ||
return "$minecraft_major.$minecraft_minor.$minecraft_patch" | ||
} | ||
|
||
String minecraft_version_short() { | ||
return "$minecraft_major.$minecraft_minor" | ||
} | ||
|
||
String expand_license(String old) { | ||
old = old.replace('\$DEVELOPER', mod_author) | ||
old = old.replace('\$LICENSE', license_type.toUpperCase()) | ||
|
||
return old | ||
} |
Oops, something went wrong.