Skip to content

Commit

Permalink
Release 3.0 and fix a crash when a project doesn't have the base plug…
Browse files Browse the repository at this point in the history
…in (#22)
  • Loading branch information
Matyrobbrt authored Jun 25, 2024
1 parent a65628b commit 72be0f5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ sourceSets {
}

group 'net.neoforged.gradleutils'
version '3.0.0-alpha.13'
version '3.0.0'

repositories {
mavenCentral()
Expand Down
3 changes: 1 addition & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// settings.gradle
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}

rootProject.name = 'GradleUtils'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ protected void extractZip(final String fileZip, final File destDir) throws Excep
binding.put("commonGroup", findCommonPrefix(
getProject().getAllprojects().stream()
.filter(project -> !project.getGroup().toString().isEmpty())
// Don't crash if a project doesn't have the base plugin
.filter(project -> project.getExtensions().findByType(BasePluginExtension.class) != null)
.map(project -> project.getGroup() + "/" + project.getExtensions().getByType(BasePluginExtension.class).getArchivesName().get() + "/")
.map(group -> group.replace('.', '/')) // Replace dots with slashes in the group
.collect(Collectors.toList())
Expand Down

0 comments on commit 72be0f5

Please sign in to comment.