-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement TCK build and generator plugins
- Loading branch information
1 parent
4f7eb16
commit 77f14c8
Showing
22 changed files
with
497 additions
and
226 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# | ||
# Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Apache License, Version 2.0 which is available at | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Contributors: | ||
# Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation | ||
# | ||
|
||
--- | ||
name: "Publish Snapshot Build" | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
jobs: | ||
secrets-presence: | ||
name: "Check for required credentials" | ||
runs-on: ubuntu-latest | ||
outputs: | ||
HAS_OSSRH: ${{ steps.secret-presence.outputs.HAS_OSSRH }} | ||
steps: | ||
- name: Check whether secrets exist | ||
id: secret-presence | ||
run: | | ||
[ ! -z "${{ secrets.GPG_PASSPHRASE }}" ] && | ||
[ ! -z "${{ secrets.GPG_PRIVATE_KEY }}" ] && | ||
[ ! -z "${{ secrets.OSSRH_PASSWORD }}" ] && | ||
[ ! -z "${{ secrets.OSSRH_USERNAME }}" ] && echo "HAS_OSSRH=true" >> $GITHUB_OUTPUT | ||
exit 0 | ||
Publish-Snapshot: | ||
name: "Publish artefacts to OSSRH Snapshots" | ||
runs-on: ubuntu-latest | ||
needs: [ secrets-presence ] | ||
if: | | ||
needs.secrets-presence.outputs.HAS_OSSRH | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/publish-maven-artifacts | ||
with: | ||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} | ||
osshr-username: ${{ secrets.OSSRH_USERNAME }} | ||
osshr-password: ${{ secrets.OSSRH_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# | ||
# Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Apache License, Version 2.0 which is available at | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Contributors: | ||
# Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation | ||
# | ||
|
||
--- | ||
name: "Publish Snapshot Build" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
Publish-Snapshot: | ||
# This workflow will abort if the required secrets don't exist | ||
uses: ./.github/workflows/publish-snapshot.yml | ||
secrets: inherit | ||
|
||
# Publish-Dependencies: | ||
# uses: eclipse-edc/.github/.github/workflows/publish-dependencies.yml@main | ||
# secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import org.eclipse.dataspacetck.gradle.tckbuild.extensions.TckBuildExtension | ||
|
||
/* | ||
* Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) | ||
* | ||
|
@@ -15,129 +17,40 @@ | |
plugins { | ||
checkstyle | ||
`maven-publish` | ||
} | ||
|
||
subprojects { | ||
|
||
// afterEvaluate { | ||
// | ||
// publishing { | ||
// publications.forEach { i -> | ||
// val mp = (i as MavenPublication) | ||
// mp.pom { | ||
// name.set(project.name) | ||
// description.set("Compliance Verification Toolkit") | ||
// url.set("https://projects.eclipse.org/projects/technology.dataspacetck") | ||
// | ||
// licenses { | ||
// license { | ||
// name.set("The Apache License, Version 2.0") | ||
// url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
// } | ||
// developers { | ||
// developer { | ||
// id.set("JimMarino") | ||
// name.set("Jim Marino") | ||
// email.set("[email protected]") | ||
// } | ||
// developer { | ||
// id.set("PaulLatzelsperger") | ||
// name.set("Paul Latzelsperger") | ||
// email.set("[email protected]") | ||
// } | ||
// developer { | ||
// id.set("EnricoRisa") | ||
// name.set("Enrico Risa") | ||
// email.set("[email protected]") | ||
// } | ||
// } | ||
// scm { | ||
// connection.set("scm:git:[email protected]:eclipse-dataspacetck/cvf.git") | ||
// url.set("https://github.com/eclipse-dataspacetck/cvf.git") | ||
// } | ||
// } | ||
// } | ||
// } | ||
// } | ||
// | ||
// } | ||
|
||
signing | ||
`java-library` | ||
`version-catalog` | ||
alias(libs.plugins.gradle.publish) apply false | ||
} | ||
|
||
|
||
// needed for running the dash tool | ||
tasks.register("allDependencies", DependencyReportTask::class) | ||
|
||
// disallow any errors | ||
checkstyle { | ||
maxErrors = 0 | ||
} | ||
|
||
allprojects { | ||
apply(plugin = "checkstyle") | ||
apply(plugin = "maven-publish") | ||
apply(plugin = "java-library") | ||
apply(plugin = "org.eclipse.dataspacetck.tck-build") | ||
|
||
configure<JavaPluginExtension> { | ||
toolchain.languageVersion.set(JavaLanguageVersion.of(17)) | ||
// for all gradle plugins: | ||
pluginManager.withPlugin("java-gradle-plugin") { | ||
apply(plugin = "com.gradle.plugin-publish") | ||
} | ||
} | ||
|
||
|
||
subprojects { | ||
|
||
publishing { | ||
publications { | ||
if (project.subprojects.isEmpty()) { | ||
create<MavenPublication>(project.name) { | ||
artifactId = project.name | ||
from(components["java"]) | ||
} | ||
} | ||
// configure POM | ||
configure<TckBuildExtension> { | ||
pom { | ||
scmConnection = "https://github.com/eclipse-dataspacetck/dsp-tck.git" | ||
scmUrl = "scm:git:[email protected]:eclipse-dataspacetck/dsp-tck.git" | ||
groupId = "org.eclipse.dataspacetck.build" | ||
projectName = project.name | ||
description = "DSP Technology Compatibility Kit" | ||
projectUrl = "https://projects.eclipse.org/projects/technology.dataspacetck" | ||
} | ||
} | ||
|
||
afterEvaluate { | ||
publishing { | ||
publications.forEach { i -> | ||
val mp = (i as MavenPublication) | ||
mp.pom { | ||
name.set(project.name) | ||
description.set("Compliance Verification Toolkit") | ||
url.set("https://projects.eclipse.org/projects/technology.dataspacetck") | ||
|
||
licenses { | ||
license { | ||
name.set("The Apache License, Version 2.0") | ||
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
} | ||
developers { | ||
developer { | ||
id.set("JimMarino") | ||
name.set("Jim Marino") | ||
email.set("[email protected]") | ||
} | ||
developer { | ||
id.set("PaulLatzelsperger") | ||
name.set("Paul Latzelsperger") | ||
email.set("[email protected]") | ||
} | ||
developer { | ||
id.set("EnricoRisa") | ||
name.set("Enrico Risa") | ||
email.set("[email protected]") | ||
} | ||
} | ||
scm { | ||
connection.set("scm:git:[email protected]:eclipse-dataspacetck/cvf.git") | ||
url.set("https://github.com/eclipse-dataspacetck/cvf.git") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
// FIXME - workaround for https://github.com/gradle/gradle/issues/26091 | ||
val signingTasks = tasks.withType<Sign>() | ||
tasks.withType<AbstractPublishToMaven>().configureEach { | ||
mustRunAfter(signingTasks) | ||
} | ||
} | ||
|
||
|
||
|
||
} |
Oops, something went wrong.