Skip to content

Latest build conv #326

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

Merged
merged 1 commit into from
Aug 6, 2025
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
26 changes: 16 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6 # v3.5.0
- name: Fetch version history
# Do NOT want to fetch all tags if building a specific tag.
# Doing so could result in code published with wrong version, if newer tags have been pushed
# Doing so could result in code published with the wrong version if newer tags have been pushed
if: (!startsWith(github.ref, 'refs/tags/'))
run: git fetch --tag --unshallow
- name: Set up JDK
Expand All @@ -39,23 +39,26 @@ jobs:
java-version: '17'
distribution: 'adopt'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
with:
gradle-home-cache-cleanup: true
- name: Build
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
CI_NAME: github-actions
CI_JOB_ID: ${{ github.run_id }}
CI_PULL_REQUEST: ${{ github.event.pull_request.number }}
run: ./gradlew build coveralls
- name: Upload Reports
if: failure()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: reports-linux
path: '**/build/reports/**/*.xml'
retention-days: 5
- name: Upload Test Results
if: failure()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: test-results-linux
path: '**/build/test-results/**/*.xml'
Expand All @@ -69,8 +72,7 @@ jobs:
ORG_GRADLE_PROJECT_SONA_PASSWORD: ${{ secrets.SONA_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew cV
./gradlew publish closeAndReleaseStagingRepository
./gradlew publish closeAndReleaseStagingRepositories
- name: Publish to Gradle Plugins Portal
if: startsWith(github.ref, 'refs/tags/') && !endsWith(github.ref, '-alpha')
env:
Expand All @@ -87,27 +89,31 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6 # v3.5.0
- name: Fetch version history
# Do NOT want to fetch all tags if building a specific tag, as it will fail
if: (!startsWith(github.ref, 'refs/tags/'))
run: git fetch --tag --unshallow
- name: Set up JDK
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
java-version: '17'
distribution: 'adopt'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
with:
gradle-home-cache-cleanup: true
- name: Build
run: ./gradlew.bat build -PexcludeContainerised
- name: Upload Reports
- name: Upload reports
if: failure()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: reports-win
path: '**/build/reports/**/*.xml'
retention-days: 5
- name: Upload Test Results
if: failure()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: test-results-win
path: '**/build/test-results/**/*.xml'
Expand Down
3 changes: 3 additions & 0 deletions buildSrc/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@
* limitations under the License.
*/

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
}
17 changes: 9 additions & 8 deletions buildSrc/src/main/kotlin/creek-common-convention.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
* <p>Apply to all java modules, usually excluding the root project in multi-module sets.
*
* <p>Versions:
* - 1.13: indentWithSpaces -> leadingTabsToSpaces and a few others
* - 1.12: XML reporting for spotbugs
* - 1.11: Add explicit checkstyle tool version
* - 1.10: Add ability to exclude containerised tests
* - 1.10: Add the 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
* - 1.7: Switch to setting the Java version via toolchain
* - 1.6: Remove GitHub packages for snapshots
* - 1.5: Add filters to exclude generated sources
* - 1.4: Add findsecbugs-plugin
Expand All @@ -50,7 +51,7 @@ repositories {
mavenCentral()

maven {
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
url = uri("https://central.sonatype.com/repository/maven-snapshots/")
mavenContent {
includeGroup("org.creekservice")
snapshotsOnly()
Expand All @@ -59,12 +60,12 @@ repositories {
}

dependencies {
spotbugsPlugins("com.h3xstream.findsecbugs:findsecbugs-plugin:1.12.0")
checkstyle("com.puppycrawl.tools:checkstyle:10.17.0")
spotbugsPlugins("com.h3xstream.findsecbugs:findsecbugs-plugin:1.14.0")
checkstyle("com.puppycrawl.tools:checkstyle:10.26.1")
}

configurations.all {
// Reduce chance of build servers running into compilation issues due to stale snapshots:
// Reduce the chance of build servers running into compilation issues due to stale snapshots:
resolutionStrategy.cacheChangingModulesFor(15, TimeUnit.MINUTES)
}

Expand All @@ -80,7 +81,7 @@ tasks.test {
}
}

setForkEvery(5)
forkEvery = 5
maxParallelForks = Runtime.getRuntime().availableProcessors()
testLogging {
showStandardStreams = true
Expand All @@ -94,7 +95,7 @@ tasks.test {
spotless {
java {
googleJavaFormat("1.15.0").aosp().reflowLongStrings()
indentWithSpaces()
leadingTabsToSpaces()
importOrder()
removeUnusedImports()
trimTrailingWhitespace()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* <p>Versions:
* - 1.6: Correct automatic module name
* - 1.5: Switch to using `gradlePlugin`, as required by Gradle 8.0
* - 1.4: Fix website URL to avoid redirect
* - 1.4: Fix website URL to avoid redirect
* - 1.3: Switch to setting 'system' from issue-management
*
* <p>Apply this plugin to any module publishing a Gradle plugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
/**
* Standard configuration for Creek library publishing
*
* <p>Version: 1.2
* <p>Version: 1.3
* - 1.3: Switch to setting 'system' from issue-management
*
* <p> Apply this plugin only to subprojects if in multi-module setup.
*
Expand Down Expand Up @@ -113,7 +114,7 @@ publishing {
}

issueManagement {
name.set("GitHub issues")
system.set("GitHub issues")
url.set("https://github.com/creek-service/${rootProject.name}/issues")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,26 @@
*/

/**
* Standard configuration for Creek library publishing to Maven Central vis SonaType OSSRH
* Standard configuration for Creek library publishing to Maven Central viq the portal
*
* <p>Version: 1.1
* <p>Version: 1.2
*
* <p>Apply this plugin only to the root project if in multi-module setup.
*
* @see <a href="https://s01.oss.sonatype.org/">OSSHR Nexus Service</a>
* @see <a href="https://central.sonatype.com/publishing">Maven Central Portal</a>
*/

plugins {
id("io.github.gradle-nexus.publish-plugin")
}

nexusPublishing {
packageGroup = "org.creekservice"

repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
stagingProfileId.set("89a20518f39cd")
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))

if (project.hasProperty("SONA_USERNAME")) {
username.set(project.property("SONA_USERNAME").toString())
Expand Down
Loading