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

Issue #357 Upgrade gradle to remove signing workarounds #517

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Publish package
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.4
gradle-version: 7.5.1
arguments: publish
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
Expand Down
30 changes: 6 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,32 +41,32 @@ publishing {
}

//linux 64 arm
artifact("$buildDir/dist/protoc-gen-doc_linux_arm64") {
artifact("$projectDir/dist/protoc-gen-doc_linux_arm64/protoc-gen-doc") {
classifier 'linux-aarch_64'
extension 'exe'
}
//linux 64 intel
artifact("$buildDir/dist/protoc-gen-doc_linux_amd64") {
artifact("$projectDir/dist/protoc-gen-doc_linux_amd64/protoc-gen-doc") {
classifier 'linux-x86_64'
extension 'exe'
}
//mac 64 arm
artifact("$buildDir/dist/protoc-gen-doc_darwin_arm64") {
artifact("$projectDir/dist/protoc-gen-doc_darwin_arm64/protoc-gen-doc") {
classifier 'osx-aarch_64'
extension 'exe'
}
//mac 64 intel
artifact("$buildDir/dist/protoc-gen-doc_darwin_amd64") {
artifact("$projectDir/dist/protoc-gen-doc_darwin_amd64/protoc-gen-doc") {
classifier 'osx-x86_64'
extension 'exe'
}
//windows 64 arm
artifact("$buildDir/dist/protoc-gen-doc_windows_arm64") {
artifact("$projectDir/dist/protoc-gen-doc_windows_arm64/protoc-gen-doc.exe") {
classifier 'windows-aarch_64'
extension 'exe'
}
//windows 64 intel
artifact("$buildDir/dist/protoc-gen-doc_windows_amd64") {
artifact("$projectDir/dist/protoc-gen-doc_windows_amd64/protoc-gen-doc.exe") {
classifier 'windows-x86_64'
extension 'exe'
}
Expand All @@ -93,21 +93,3 @@ signing {
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.maven
}

// A strange issue with signing meant that only the first files (with the same name) got signed.
// To workaround this, rename all executables to include architecture.
tasks.register('flattenDistDirectory', Copy) {
from("$projectDir/dist") {
include "**/protoc-gen-doc"
include "**/protoc-gen-doc.exe"
eachFile { file ->
file.name = file.relativePath.parent.lastName
file.relativePath = new RelativePath(true, file.relativePath.segments.drop(1))
}
includeEmptyDirs = false
}
into "$buildDir/dist"
}

publish.dependsOn flattenDistDirectory
signMavenPublication.mustRunAfter flattenDistDirectory