Skip to content

Commit 84b44c2

Browse files
authored
Merge pull request #96 from jpenilla/fix/configuration-cache
Fix SpongeGradleConfigurationSource configuration cache compatibility
2 parents 2e75a71 + d6278ae commit 84b44c2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ore/src/main/groovy/org/spongepowered/gradle/ore/SpongeGradleConfigurationSource.groovy

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ package org.spongepowered.gradle.ore
2626

2727
import groovy.transform.PackageScope
2828
import org.gradle.api.Project
29+
import org.spongepowered.gradle.ore.internal.OrePublicationImpl
2930

3031
@PackageScope
3132
class SpongeGradleConfigurationSource {
@@ -36,12 +37,15 @@ class SpongeGradleConfigurationSource {
3637
static def configureSpongeGradle(Project project, OreDeploymentExtension extension) {
3738
project.plugins.withId('org.spongepowered.gradle.plugin') {
3839
def first = true
40+
def jar = project.tasks.named('jar').flatMap { it.archiveFile }
41+
extension.defaultPublication {}
42+
def defPub = extension.publications().named(OrePublicationImpl.DEFAULT_NAME)
3943
project.sponge.plugins.whenObjectAdded { plugin ->
4044
if (first) {
4145
first = false
42-
extension.defaultPublication {
46+
defPub.configure {
4347
projectId.set(plugin.name)
44-
publishArtifacts.from(project.tasks.named('jar').map { it.outputs })
48+
publishArtifacts.from(jar)
4549
}
4650
}
4751
}

0 commit comments

Comments
 (0)