From 65e869df68d7858f573339721c6158e29bde5444 Mon Sep 17 00:00:00 2001 From: Big Andy <8012398+big-andy-coates@users.noreply.github.com> Date: Thu, 21 Dec 2023 13:33:48 +0000 Subject: [PATCH] Latest conv --- .github/workflows/build.yml | 22 +++++++++++++++++-- .../kotlin/creek-common-convention.gradle.kts | 10 +++++++-- ...ek-plugin-publishing-convention.gradle.kts | 4 ++-- .../creek-publishing-convention.gradle.kts | 4 ++-- config/spotbugs/suppressions.xml | 6 +++++ 5 files changed, 38 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20be1e4..b32af29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ permissions: contents: read jobs: - build: + build_linux: permissions: packages: write runs-on: ubuntu-latest @@ -67,9 +67,27 @@ jobs: run: | ./gradlew -Dgradle.publish.key="$GRADLE_PUBLISH_KEY" -Dgradle.publish.secret="$GRADLE_PUBLISH_SECRET" publishPlugins + # Until Creek fully supports Windows, minimal check: + build_windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4 # v1.1.0 + - name: Set up JDK + uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 + with: + java-version: '17' + distribution: 'adopt' + - name: Setup Gradle + uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a # v2.9.0 + with: + gradle-home-cache-cleanup: true + - name: Build + run: ./gradlew.bat build -PexcludeContainerised + create-gh-release: if: startsWith(github.ref, 'refs/tags/') && !endsWith(github.ref, '-alpha') - needs: build + needs: [build_linux, build_windows] runs-on: ubuntu-latest permissions: contents: write diff --git a/buildSrc/src/main/kotlin/creek-common-convention.gradle.kts b/buildSrc/src/main/kotlin/creek-common-convention.gradle.kts index 1806f0b..7d3527e 100644 --- a/buildSrc/src/main/kotlin/creek-common-convention.gradle.kts +++ b/buildSrc/src/main/kotlin/creek-common-convention.gradle.kts @@ -19,7 +19,8 @@ * *

Apply to all java modules, usually excluding the root project in multi-module sets. * - *

Version: 1.9 + *

Versions: + * - 1.10: Add ability to exclude containerised tests * - 1.9: Add `allDeps` task. * - 1.8: Tweak test config to reduce build speed. * - 1.7: Switch to setting Java version via toolchain @@ -70,7 +71,12 @@ tasks.withType { } tasks.test { - useJUnitPlatform() + useJUnitPlatform() { + if (project.hasProperty("excludeContainerised")) { + excludeTags("ContainerisedTest") + } + } + setForkEvery(5) maxParallelForks = Runtime.getRuntime().availableProcessors() testLogging { diff --git a/buildSrc/src/main/kotlin/creek-plugin-publishing-convention.gradle.kts b/buildSrc/src/main/kotlin/creek-plugin-publishing-convention.gradle.kts index 8196620..b3d048f 100644 --- a/buildSrc/src/main/kotlin/creek-plugin-publishing-convention.gradle.kts +++ b/buildSrc/src/main/kotlin/creek-plugin-publishing-convention.gradle.kts @@ -95,9 +95,9 @@ publishing { name.set("${project.group}:${artifactId}") if (prependRootName) { - description.set("${rootProject.name.capitalize()} ${project.name} library".replace("-", " ")) + description.set("${rootProject.name} ${project.name} library".replace("-", " ")) } else { - description.set("${project.name.capitalize()} library".replace("-", " ")) + description.set("${project.name} library".replace("-", " ")) } url.set("https://www.creekservice.org") diff --git a/buildSrc/src/main/kotlin/creek-publishing-convention.gradle.kts b/buildSrc/src/main/kotlin/creek-publishing-convention.gradle.kts index f7c5fb4..ebb7f27 100644 --- a/buildSrc/src/main/kotlin/creek-publishing-convention.gradle.kts +++ b/buildSrc/src/main/kotlin/creek-publishing-convention.gradle.kts @@ -78,9 +78,9 @@ publishing { name.set("${project.group}:${artifactId}") if (prependRootName) { - description.set("${rootProject.name.capitalize()} ${project.name} library".replace("-", " ")) + description.set("${rootProject.name} ${project.name} library".replace("-", " ")) } else { - description.set("${project.name.capitalize()} library".replace("-", " ")) + description.set("${project.name} library".replace("-", " ")) } url.set("https://www.creekservice.org") diff --git a/config/spotbugs/suppressions.xml b/config/spotbugs/suppressions.xml index 116ee98..c51071a 100644 --- a/config/spotbugs/suppressions.xml +++ b/config/spotbugs/suppressions.xml @@ -8,4 +8,10 @@ + + + + + + \ No newline at end of file