Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Deftu committed Aug 26, 2023
1 parent 9cda480 commit ec7fcef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ kotlin.code.style=official

# Project properties
project.name=gradle-toolkit
project.version=1.19.1
project.version=1.19.2
project.group=xyz.deftu.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import xyz.deftu.gradle.MCData
import xyz.deftu.gradle.ModData
import xyz.deftu.gradle.utils.*
import java.nio.charset.StandardCharsets
import java.util.*

plugins {
java
Expand Down Expand Up @@ -82,7 +83,7 @@ fun ReleasingExtension.getUploadFile() = file.getOrElse(tasks.named<org.gradle.j

fun ReleasingExtension.getGameVersions() = gameVersions.getOrElse(listOf(mcData.versionStr))
fun ReleasingExtension.getLoaders(capitalized: Boolean) = loaders.getOrElse(listOf(mcData.loader.name)).map { loader ->
if (capitalized) loader.capitalize() else loader
if (capitalized) loader.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.US) else it.toString() } else loader
}

fun ReleasingExtension.getVersionType() = versionType.getOrElse(VersionType.RELEASE)
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/xyz/deftu/gradle/utils/utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fun Project.propertyOr(
}

fun Project.getFixedSourcesJarTask() = if (isLoomPresent()) {
tasks.named<Jar>("remapSources")
tasks.named<Jar>("remapSourcesJar")
} else {
tasks.named<Jar>("sourcesJar")
}
Expand Down

0 comments on commit ec7fcef

Please sign in to comment.