Skip to content

Commit

Permalink
replace property getter method with a smaller and more helpful implem…
Browse files Browse the repository at this point in the history
…entation

and squish icons more because why not
  • Loading branch information
rhysdh540 committed Apr 27, 2024
1 parent c02ca76 commit bfe7dc6
Show file tree
Hide file tree
Showing 14 changed files with 11 additions and 33 deletions.
4 changes: 1 addition & 3 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ plugins {
id("com.github.gmazzo.buildconfig")
}

operator fun String.invoke(): String {
return (rootProject.properties[this] as String?)!!
}
operator fun String.invoke(): String = rootProject.properties[this] as? String ?: error("Property $this not found")

buildConfig {
className("ZumeConstants")
Expand Down
Binary file modified api/src/main/resources/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions archaic/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import xyz.wagyourtail.unimined.api.minecraft.task.RemapJarTask

operator fun String.invoke(): String {
return (rootProject.properties[this] as String?)!!
}
operator fun String.invoke(): String = rootProject.properties[this] as? String ?: error("Property $this not found")

unimined.minecraft {
version("archaic_minecraft_version"())
Expand Down
Binary file modified icon_padded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icon_padded_large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions legacy/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
operator fun String.invoke(): String {
return (rootProject.properties[this] as String?)!!
}
operator fun String.invoke(): String = rootProject.properties[this] as? String ?: error("Property $this not found")

unimined.minecraft {
version("legacy_minecraft_version"())
Expand Down
4 changes: 1 addition & 3 deletions lexforge/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
operator fun String.invoke(): String {
return (rootProject.properties[this] as String?)!!
}
operator fun String.invoke(): String = rootProject.properties[this] as? String ?: error("Property $this not found")

unimined.minecraft {
combineWith(project(":api").sourceSets.main.get())
Expand Down
4 changes: 1 addition & 3 deletions lexforge16/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
operator fun String.invoke(): String {
return (rootProject.properties[this] as String?)!!
}
operator fun String.invoke(): String = rootProject.properties[this] as? String ?: error("Property $this not found")

unimined.minecraft {
combineWith(project(":api").sourceSets.main.get())
Expand Down
4 changes: 1 addition & 3 deletions lexforge18/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
operator fun String.invoke(): String {
return (rootProject.properties[this] as String?)!!
}
operator fun String.invoke(): String = rootProject.properties[this] as? String ?: error("Property $this not found")

unimined.minecraft {
combineWith(project(":api").sourceSets.main.get())
Expand Down
4 changes: 1 addition & 3 deletions modern/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
operator fun String.invoke(): String {
return (rootProject.properties[this] as String?)!!
}
operator fun String.invoke(): String = rootProject.properties[this] as? String ?: error("Property $this not found")

unimined.minecraft {
version("modern_minecraft_version"())
Expand Down
4 changes: 1 addition & 3 deletions neoforge/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
operator fun String.invoke(): String {
return (rootProject.properties[this] as String?)!!
}
operator fun String.invoke(): String = rootProject.properties[this] as? String ?: error("Property $this not found")

unimined.minecraft {
version("neoforge_minecraft_version"())
Expand Down
4 changes: 1 addition & 3 deletions primitive/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import xyz.wagyourtail.unimined.api.minecraft.task.RemapJarTask

operator fun String.invoke(): String {
return (rootProject.properties[this] as String?)!!
}
operator fun String.invoke(): String = rootProject.properties[this] as? String ?: error("Property $this not found")

unimined.minecraft {
side("client")
Expand Down
4 changes: 1 addition & 3 deletions stubs/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
operator fun String.invoke(): String {
return (rootProject.properties[this] as String?)!!
}
operator fun String.invoke(): String = rootProject.properties[this] as? String ?: error("Property $this not found")
4 changes: 1 addition & 3 deletions vintage/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import xyz.wagyourtail.unimined.api.minecraft.task.RemapJarTask

operator fun String.invoke(): String {
return (rootProject.properties[this] as String?)!!
}
operator fun String.invoke(): String = rootProject.properties[this] as? String ?: error("Property $this not found")

unimined.minecraft {
version("vintage_minecraft_version"())
Expand Down

0 comments on commit bfe7dc6

Please sign in to comment.