Skip to content
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: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ concurrency:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30 # a hung Gradle daemon otherwise holds the runner for 6 hours
permissions:
contents: read
packages: write
Expand Down Expand Up @@ -166,6 +167,7 @@ jobs:
matlab-jar:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 30 # a hung Gradle daemon otherwise holds the runner for 6 hours
permissions:
contents: read
steps:
Expand Down Expand Up @@ -211,6 +213,7 @@ jobs:
needs: [build, matlab-jar]
if: github.event_name == 'workflow_dispatch' && !inputs.dry_run
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write # create the tag and the release
env:
Expand Down Expand Up @@ -248,6 +251,7 @@ jobs:
update-matlab:
needs: [build, release]
runs-on: ubuntu-latest
timeout-minutes: 10
permissions: {} # writes to Shimmer-MATLAB-ID with MATLAB_REPO_TOKEN, not this repo's token
env:
VERSION: ${{ needs.build.outputs.version }}
Expand Down
11 changes: 11 additions & 0 deletions ShimmerBluetoothManager/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,14 @@ dependencies {
// 'test.useTestNG()' to your build script.
testImplementation 'junit:junit:4.12'
}

// Without -PreleaseVersion the version is 'local', and GitHub Packages never lets a version be
// overwritten. Releases go through the Release Java API workflow; publishToMavenLocal is unaffected.
tasks.withType(PublishToMavenRepository).configureEach {
doFirst {
if (publication.version == 'local') {
throw new GradleException("Refusing to publish ${publication.artifactId} as version 'local'. " +
"Release with the Release Java API workflow, or pass -PreleaseVersion.")
}
}
}
11 changes: 11 additions & 0 deletions ShimmerDriver/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,14 @@ tasks.withType(Test).configureEach {
}
}


// Without -PreleaseVersion the version is 'local', and GitHub Packages never lets a version be
// overwritten. Releases go through the Release Java API workflow; publishToMavenLocal is unaffected.
tasks.withType(PublishToMavenRepository).configureEach {
doFirst {
if (publication.version == 'local') {
throw new GradleException("Refusing to publish ${publication.artifactId} as version 'local'. " +
"Release with the Release Java API workflow, or pass -PreleaseVersion.")
}
}
}
16 changes: 16 additions & 0 deletions ShimmerDriverPC/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ publishing {
publications {
mavenJava(MavenPublication) {
from components.java
// The Shadow plugin adds ShimmerJavaClass.jar (no classifier) to components.java, where it
// collides with the plain jar and fails publish on Gradle 8. Publish the plain jar with its
// dependencies in the POM, as releases up to 0.11.7_beta did; the fat jar goes to MATLAB
// and the GitHub Release instead.
components.java.withVariantsFromConfiguration(configurations.shadowRuntimeElements) { skip() }

groupId = 'com.shimmerresearch' // Replace with your package's group/organization name
artifactId = 'shimmerdriverpc' // Replace with the name of your package
Expand Down Expand Up @@ -132,3 +137,14 @@ shadowJar {

mergeServiceFiles() // Merges service files (if any)
}

// Without -PreleaseVersion the version is 'local', and GitHub Packages never lets a version be
// overwritten. Releases go through the Release Java API workflow; publishToMavenLocal is unaffected.
tasks.withType(PublishToMavenRepository).configureEach {
doFirst {
if (publication.version == 'local') {
throw new GradleException("Refusing to publish ${publication.artifactId} as version 'local'. " +
"Release with the Release Java API workflow, or pass -PreleaseVersion.")
}
}
}
Loading