diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index adb6acbd..7c2c8c24 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=7ba68c54029790ab444b39d7e293d3236b2632631fb5f2e012bb28b4ff669e4b -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionSha256Sum=591855b517fc635b9e04de1d05d5e76ada3f89f5fc76f87978d1b245b4f69225 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/sigstore-gradle/sigstore-gradle-sign-base-plugin/build.gradle.kts b/sigstore-gradle/sigstore-gradle-sign-base-plugin/build.gradle.kts index 8b3d0a87..44a64bdf 100644 --- a/sigstore-gradle/sigstore-gradle-sign-base-plugin/build.gradle.kts +++ b/sigstore-gradle/sigstore-gradle-sign-base-plugin/build.gradle.kts @@ -15,18 +15,15 @@ dependencies { testImplementation(project(":sigstore-testkit")) } -pluginBundle { - website = "https://github.com/sigstore/sigstore-java" - vcsUrl = "https://github.com/sigstore/sigstore-java.git" - tags = listOf("sigstore", "sign") -} - gradlePlugin { + website.set("https://github.com/sigstore/sigstore-java") + vcsUrl.set("https://github.com/sigstore/sigstore-java.git") plugins { named("dev.sigstore.sign-base") { displayName = "Base tasks and configurations for signing artifacts via Sigstore" description = "The plugin provides tasks and configurations so you can wire your own Sigstore signing. " + "If you want sign everything with standard configuration, then consider dev.sigstore.sign plugin instead" + tags.set(listOf("sigstore", "sign")) } } } diff --git a/sigstore-gradle/sigstore-gradle-sign-base-plugin/src/main/kotlin/dev/sigstore/sign/DefaultDerivedArtifactFile.kt b/sigstore-gradle/sigstore-gradle-sign-base-plugin/src/main/kotlin/dev/sigstore/sign/DefaultDerivedArtifactFile.kt index 42c8d880..0b38173f 100644 --- a/sigstore-gradle/sigstore-gradle-sign-base-plugin/src/main/kotlin/dev/sigstore/sign/DefaultDerivedArtifactFile.kt +++ b/sigstore-gradle/sigstore-gradle-sign-base-plugin/src/main/kotlin/dev/sigstore/sign/DefaultDerivedArtifactFile.kt @@ -23,12 +23,22 @@ import org.gradle.api.provider.Provider import org.gradle.api.publish.internal.PublicationInternal import org.gradle.api.specs.Spec import org.gradle.api.tasks.TaskProvider +import org.gradle.internal.Factory import java.io.File internal class DefaultDerivedArtifactFile( val task: TaskProvider, val fileProvider: Provider, -) : PublicationInternal.DerivedArtifact { +) : PublicationInternal.DerivedArtifact, Factory { + + // Gradle expects create(): Object method as well, otherwise it throws the following error. + // We workaround it by adding "implements Factory", so Java bytecode has a bridge method + // Caused by: java.lang.AbstractMethodError: Receiver class dev.sigstore.sign.DefaultDerivedArtifactFile does not define or inherit an implementation of the resolved method 'abstract java.lang.Object create()' of interface org.gradle.internal.Factory. + // at org.gradle.api.publish.maven.internal.artifact.DerivedMavenArtifact.getFile(DerivedMavenArtifact.java:37) + // at dev.sigstore.sign.SigstoreSignExtension$sign$3.execute(SigstoreSignExtension.kt:84) + // at dev.sigstore.sign.SigstoreSignExtension$sign$3.execute(SigstoreSignExtension.kt:82) + // at org.gradle.internal.Actions$FilteredAction.execute(Actions.java:243) + // at org.gradle.internal.ImmutableActionSet$SingletonSet.execute(ImmutableAction override fun create(): File = fileProvider.get().asFile diff --git a/sigstore-gradle/sigstore-gradle-sign-plugin/build.gradle.kts b/sigstore-gradle/sigstore-gradle-sign-plugin/build.gradle.kts index 149103bf..2b5133ce 100644 --- a/sigstore-gradle/sigstore-gradle-sign-plugin/build.gradle.kts +++ b/sigstore-gradle/sigstore-gradle-sign-plugin/build.gradle.kts @@ -15,17 +15,14 @@ dependencies { testImplementation(project(":sigstore-testkit")) } -pluginBundle { - website = "https://github.com/sigstore/sigstore-java" - vcsUrl = "https://github.com/sigstore/sigstore-java.git" - tags = listOf("sigstore", "sign") -} - gradlePlugin { + website.set("https://github.com/sigstore/sigstore-java") + vcsUrl.set("https://github.com/sigstore/sigstore-java.git") plugins { named("dev.sigstore.sign") { displayName = "Sign artifacts via Sigstore" description = "The plugin signs all artifacts with Sigstore and attaches signature bundles" + tags.set(listOf("sigstore", "sign")) } } }