Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Gradle to 8.3 #542

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<DefaultTask>,
val fileProvider: Provider<RegularFile>,
) : PublicationInternal.DerivedArtifact {
) : PublicationInternal.DerivedArtifact, Factory<File> {

// Gradle expects create(): Object method as well, otherwise it throws the following error.
// We workaround it by adding "implements Factory<File>", 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
Comment on lines +32 to +41
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ljacomet , I'm not sure what is the best workaround here, however, implementing Factory<File> seem to resolve AbstractMethodError. I wonder if there's a better public API in the first place for derived artifacts

override fun create(): File =
fileProvider.get().asFile

Expand Down
9 changes: 3 additions & 6 deletions sigstore-gradle/sigstore-gradle-sign-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
}
}
}
Expand Down