-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to 1.21 & Add neoforge version
- Loading branch information
Showing
143 changed files
with
1,590 additions
and
761 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,15 @@ | ||
* text eol=lf | ||
*.bat text eol=crlf | ||
*.patch text eol=lf | ||
*.java text eol=lf | ||
*.gradle text eol=crlf | ||
*.png binary | ||
*.gif binary | ||
*.exe binary | ||
*.dll binary | ||
*.jar binary | ||
*.lzma binary | ||
*.zip binary | ||
*.pyd binary | ||
*.cfg text eol=lf | ||
*.jks binary |
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,26 @@ | ||
# gradle | ||
|
||
.gradle/ | ||
build/ | ||
out/ | ||
classes/ | ||
|
||
# eclipse | ||
|
||
bin | ||
*.launch | ||
.settings | ||
.metadata | ||
.classpath | ||
.project | ||
|
||
# idea | ||
|
||
.idea/ | ||
*.iml | ||
out | ||
*.ipr | ||
*.iws | ||
*.iml | ||
.idea/* | ||
!.idea/scopes | ||
|
||
# vscode | ||
|
||
.settings/ | ||
.vscode/ | ||
bin/ | ||
.classpath | ||
.project | ||
|
||
# macos | ||
|
||
*.DS_Store | ||
# gradle | ||
build | ||
.gradle | ||
|
||
# fabric | ||
# other | ||
eclipse | ||
run | ||
runs | ||
|
||
run/ | ||
.cache |
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 +1 @@ | ||
- Update fabric.mod.json to enable 1.20.2 in minecraft version range. | ||
- Rewrote mod, now available for NeoForge & Fabric |
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
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,90 +1,4 @@ | ||
plugins { | ||
alias libs.plugins.fabric.loom | ||
alias libs.plugins.publishing | ||
id 'maven-publish' | ||
} | ||
apply from: 'https://raw.githubusercontent.com/UltrusBot/GradleScripts/61556de3c834075f02353af9c9c55462c6f8bea0/release.gradle' | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
|
||
base { | ||
archivesName = project.archives_base_name | ||
} | ||
version = project.mod_version | ||
group = project.maven_group | ||
|
||
|
||
dependencies { | ||
minecraft(libs.minecraft) | ||
mappings loom.officialMojangMappings() | ||
modImplementation(libs.fabric.loader) | ||
modImplementation(libs.fabric.api)} | ||
|
||
processResources { | ||
inputs.property "version", project.version | ||
|
||
filesMatching("fabric.mod.json") { | ||
expand "version": project.version | ||
} | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17. | ||
it.options.release = 17 | ||
} | ||
|
||
java { | ||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task | ||
// if it is present. | ||
// If you remove this line, sources will not be generated. | ||
withSourcesJar() | ||
} | ||
|
||
jar { | ||
from("LICENSE") { | ||
rename { "${it}_${project.base.archivesName.get()}"} | ||
} | ||
} | ||
publishMods { | ||
displayName = "Extra Sponges v${project.version}" | ||
file = remapJar.archiveFile | ||
changelog = file("$rootDir/CHANGELOG.md").text | ||
version = "v${project.version}" | ||
type = STABLE | ||
modLoaders.addAll("fabric", "quilt") | ||
|
||
curseforge { | ||
projectId = "457043" | ||
minecraftVersions.addAll("1.20.3", "1.20.4") | ||
accessToken = providers.environmentVariable("CF_API_KEY") | ||
} | ||
modrinth { | ||
projectId = "poGrqY8n" | ||
minecraftVersions.addAll("1.20.3", "1.20.4") | ||
accessToken = providers.environmentVariable("MODRINTH_TOKEN") | ||
} | ||
github { | ||
repository = "UltrusBot/ExtraSponges" | ||
commitish = "1.20.4" | ||
accessToken = providers.environmentVariable("GH_TOKEN") | ||
} | ||
|
||
dryRun = false | ||
} | ||
|
||
// configure the maven publication | ||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
} | ||
} | ||
|
||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. | ||
repositories { | ||
// Add repositories to publish to here. | ||
// Notice: This block does NOT have the same function as the block in the top level. | ||
// The repositories here will be used for publishing your artifact, not for | ||
// retrieving dependencies. | ||
} | ||
// Required for NeoGradle | ||
id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.7" | ||
} |
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,3 @@ | ||
plugins { | ||
id 'groovy-gradle-plugin' | ||
} |
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,105 @@ | ||
plugins { | ||
id 'java-library' | ||
id 'maven-publish' | ||
} | ||
|
||
base { | ||
archivesName = "${mod_id}-${project.name}-${minecraft_version}" | ||
} | ||
|
||
java { | ||
toolchain.languageVersion = JavaLanguageVersion.of(java_version) | ||
withSourcesJar() | ||
withJavadocJar() | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
// https://docs.gradle.org/current/userguide/declaring_repositories.html#declaring_content_exclusively_found_in_one_repository | ||
maven { | ||
name = 'BlameJared' | ||
url = 'https://maven.blamejared.com' | ||
} | ||
maven { | ||
name = 'Sleeping Town' | ||
url = 'https://repo.sleeping.town/' | ||
} | ||
|
||
} | ||
|
||
// Declare capabilities on the outgoing configurations. | ||
// Read more about capabilities here: https://docs.gradle.org/current/userguide/component_capabilities.html#sec:declaring-additional-capabilities-for-a-local-component | ||
['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements'].each { variant -> | ||
configurations."$variant".outgoing { | ||
capability("$group:${base.archivesName.get()}:$version") | ||
capability("$group:$mod_id-${project.name}-${minecraft_version}:$version") | ||
capability("$group:$mod_id:$version") | ||
} | ||
publishing.publications.configureEach { | ||
suppressPomMetadataWarningsFor(variant) | ||
} | ||
} | ||
|
||
sourcesJar { | ||
from(rootProject.file("LICENSE")) { | ||
rename { "${it}_${mod_name}" } | ||
} | ||
} | ||
|
||
jar { | ||
from(rootProject.file("LICENSE")) { | ||
rename { "${it}_${mod_name}" } | ||
} | ||
|
||
manifest { | ||
attributes([ | ||
'Specification-Title' : mod_name, | ||
'Specification-Vendor' : mod_author, | ||
'Specification-Version' : project.jar.archiveVersion, | ||
'Implementation-Title' : project.name, | ||
'Implementation-Version': project.jar.archiveVersion, | ||
'Implementation-Vendor' : mod_author, | ||
'Built-On-Minecraft' : minecraft_version | ||
]) | ||
} | ||
} | ||
|
||
processResources { | ||
def expandProps = [ | ||
"version": version, | ||
"group": project.group, //Else we target the task's group. | ||
"minecraft_version": minecraft_version, | ||
"minecraft_version_range": minecraft_version_range, | ||
"fabric_version": fabric_version, | ||
"fabric_loader_version": fabric_loader_version, | ||
"mod_name": mod_name, | ||
"mod_author": mod_author, | ||
"mod_id": mod_id, | ||
"license": license, | ||
"description": project.description, | ||
"neoforge_version": neoforge_version, | ||
"neoforge_loader_version_range": neoforge_loader_version_range, | ||
"credits": credits, | ||
"java_version": java_version | ||
] | ||
|
||
filesMatching(['pack.mcmeta', 'fabric.mod.json', 'META-INF/mods.toml', 'META-INF/neoforge.mods.toml', '*.mixins.json']) { | ||
expand expandProps | ||
} | ||
inputs.properties(expandProps) | ||
exclude ".cache" | ||
} | ||
|
||
publishing { | ||
publications { | ||
register('mavenJava', MavenPublication) { | ||
artifactId base.archivesName.get() | ||
from components.java | ||
} | ||
} | ||
repositories { | ||
maven { | ||
url System.getenv("local_maven_url") | ||
} | ||
} | ||
} |
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,44 @@ | ||
plugins { | ||
id 'multiloader-common' | ||
} | ||
|
||
configurations { | ||
commonJava{ | ||
canBeResolved = true | ||
} | ||
commonResources{ | ||
canBeResolved = true | ||
} | ||
} | ||
|
||
dependencies { | ||
compileOnly(project(':common')) { | ||
capabilities { | ||
requireCapability "$group:$mod_id" | ||
} | ||
} | ||
commonJava project(path: ':common', configuration: 'commonJava') | ||
commonResources project(path: ':common', configuration: 'commonResources') | ||
} | ||
|
||
tasks.named('compileJava', JavaCompile) { | ||
dependsOn(configurations.commonJava) | ||
source(configurations.commonJava) | ||
} | ||
|
||
processResources { | ||
dependsOn(configurations.commonResources) | ||
from(configurations.commonResources) | ||
} | ||
|
||
tasks.named('javadoc', Javadoc).configure { | ||
dependsOn(configurations.commonJava) | ||
source(configurations.commonJava) | ||
} | ||
|
||
tasks.named("sourcesJar", Jar) { | ||
dependsOn(configurations.commonJava) | ||
from(configurations.commonJava) | ||
dependsOn(configurations.commonResources) | ||
from(configurations.commonResources) | ||
} |
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,44 @@ | ||
plugins { | ||
id 'multiloader-common' | ||
id 'agency.highlysuspect.minivan' version '0.5-SNAPSHOT' | ||
} | ||
|
||
//minecraft { | ||
// version(minecraft_version) | ||
// def aw = file("src/main/resources/${mod_id}.accesswidener") | ||
// if(aw.exists()){ | ||
// accessWideners(aw) | ||
// } | ||
//} | ||
|
||
minivan { | ||
version(minecraft_version) | ||
def aw = file("src/main/resources/${mod_id}.accesswidener") | ||
// accessWideners "./path/to/your.accesswidener" | ||
if(aw.exists()){ | ||
accessWideners = "./src/main/resources/${mod_id}.accesswidener" | ||
} | ||
} | ||
|
||
sourceSets { | ||
named("main") { | ||
resources.srcDir("src/generated/resources") | ||
} | ||
} | ||
|
||
configurations { | ||
commonJava { | ||
canBeResolved = false | ||
canBeConsumed = true | ||
} | ||
commonResources { | ||
canBeResolved = false | ||
canBeConsumed = true | ||
} | ||
} | ||
|
||
artifacts { | ||
commonJava sourceSets.main.java.sourceDirectories.singleFile | ||
commonResources sourceSets.main.resources.sourceDirectories.files | ||
} | ||
|
7 changes: 7 additions & 0 deletions
7
common/src/generated/resources/assets/extrasponges/blockstates/diamond_sponge.json
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 @@ | ||
{ | ||
"variants": { | ||
"": { | ||
"model": "extrasponges:block/diamond_sponge" | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
common/src/generated/resources/assets/extrasponges/blockstates/gold_sponge.json
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 @@ | ||
{ | ||
"variants": { | ||
"": { | ||
"model": "extrasponges:block/gold_sponge" | ||
} | ||
} | ||
} |
Oops, something went wrong.