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
47 changes: 34 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ buildscript {
classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:${versions.coveralls}"
classpath "org.scoverage:gradle-scoverage:${versions.gradleScoverage}"
classpath "com.github.alisiikh:gradle-scalastyle-plugin:${versions.scalaStyle}"
classpath "org.jreleaser:org.jreleaser.gradle.plugin:${versions.gradleJReleaser}"
}

// lock buildscript dependencies
Expand Down Expand Up @@ -48,6 +49,7 @@ allprojects {
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'org.jreleaser'
apply from: file("${rootDir}/versionInfo.gradle")

repositories {
Expand Down Expand Up @@ -264,6 +266,10 @@ subprojects {
configFile = new File("${rootDir}/checkstyle.xml")
}

tasks.withType(Checkstyle) {
it.mustRunAfter(rootProject.copyMySQLConfigTemplate, rootProject.copyH2ConfigTemplate)
}

tasks.withType(JavaExec).each { task ->
task.systemProperties(System.properties)
task.systemProperty "wd.warp.config.directory", "$rootDir/config"
Expand Down Expand Up @@ -399,14 +405,7 @@ subprojects {

repositories {
maven {
credentials {
// will be null if these aren't set as project properties
username findProperty("sonatypeUsername")
password findProperty("sonatypePassword")
}
String snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots'
String releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
url = isSnapshot(version.toString()) ? snapshotsRepoUrl : releasesRepoUrl
url = layout.buildDirectory.dir('staging-deploy')
}
}
}
Expand All @@ -415,11 +414,33 @@ subprojects {
addReleaseBranchPattern(".*feature")
}

signing {
// only require signing for non-snapshot versions being published to maven central
required {
!isSnapshot(version.toString()) && gradle.taskGraph.hasTask("publish")
jreleaser {

signing {
active = 'ALWAYS'
armored = true
}
deploy {
maven {
mavenCentral {
'release-deploy' {
active = 'RELEASE'
url = 'https://central.sonatype.com/api/v1/publisher'
stagingRepository(layout.buildDirectory.asFile.get().absolutePath + '/staging-deploy')
}
}
nexus2 {
'snapshot-deploy' {
active = 'SNAPSHOT'
snapshotUrl = 'https://central.sonatype.com/repository/maven-snapshots/'
applyMavenCentralRules = true
snapshotSupported = true
closeRepository = true
releaseRepository = true
stagingRepository(layout.buildDirectory.asFile.get().absolutePath + '/staging-deploy')
}
}
}
}
sign publishing.publications.mavenJava
}
}
147 changes: 138 additions & 9 deletions buildscript-gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,26 @@
# This file is expected to be part of source control.
ch.epfl.scala:scalafix-interfaces:0.10.4=classpath
com.adtran:scala-multiversion-plugin:2.0.4=classpath
com.fasterxml.jackson:jackson-bom:2.11.0=classpath
com.fasterxml.jackson.core:jackson-annotations:2.19.1=classpath
com.fasterxml.jackson.core:jackson-core:2.19.1=classpath
com.fasterxml.jackson.core:jackson-databind:2.19.1=classpath
com.fasterxml.jackson.dataformat:jackson-dataformat-toml:2.19.1=classpath
com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.19.1=classpath
com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.19.1=classpath
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.19.1=classpath
com.fasterxml.jackson:jackson-bom:2.19.1=classpath
com.fasterxml.woodstox:woodstox-core:7.1.1=classpath
com.fasterxml:classmate:1.7.0=classpath
com.github.alisiikh:gradle-scalastyle-plugin:3.4.1=classpath
com.github.luben:zstd-jni:1.5.7-3=classpath
com.github.sbaudoin:yamllint:1.6.1=classpath
com.github.spullara.mustache.java:compiler:0.9.14=classpath
com.github.victools:jsonschema-generator:4.38.0=classpath
com.github.victools:jsonschema-module-jackson:4.38.0=classpath
com.github.zafarkhaja:java-semver:0.9.0=classpath
com.googlecode.javaewah:JavaEWAH:1.1.12=classpath
com.googlecode.javaewah:JavaEWAH:1.1.13=classpath
com.hierynomus:asn-one:0.6.0=classpath
com.hierynomus:sshj:0.40.0=classpath
com.jcraft:jsch.agentproxy.connector-factory:0.0.7=classpath
com.jcraft:jsch.agentproxy.core:0.0.7=classpath
com.jcraft:jsch.agentproxy.pageant:0.0.7=classpath
Expand All @@ -25,14 +41,23 @@ com.netflix.nebula:nebula-release-plugin:15.0.3=classpath
com.perforce:p4java:2015.2.1365273=classpath
com.trilead:trilead-ssh2:1.0.0-build220=classpath
commons-beanutils:commons-beanutils:1.8.0=classpath
commons-codec:commons-codec:1.6=classpath
commons-codec:commons-codec:1.18.0=classpath
commons-collections:commons-collections:3.2.1=classpath
commons-io:commons-io:2.6=classpath
commons-io:commons-io:2.19.0=classpath
commons-lang:commons-lang:2.4=classpath
commons-logging:commons-logging:1.1.3=classpath
commons-logging:commons-logging:1.2=classpath
commons-net:commons-net:3.11.1=classpath
de.regnis.q.sequence:sequence-library:1.0.3=classpath
dev.failsafe:failsafe:3.3.2=classpath
io.get-coursier:interface:1.0.8=classpath
io.github.cosmicsilence:gradle-scalafix:0.1.14=classpath
io.github.openfeign.form:feign-form:3.8.0=classpath
io.github.openfeign:feign-core:13.6=classpath
io.github.openfeign:feign-httpclient:13.6=classpath
io.github.openfeign:feign-jackson:13.6=classpath
jakarta.activation:jakarta.activation-api:2.1.3=classpath
jakarta.mail:jakarta.mail-api:2.1.3=classpath
javax.inject:javax.inject:1=classpath
net.java.dev.jna:jna-platform:4.1.0=classpath
net.java.dev.jna:jna:4.1.0=classpath
net.java.dev.jna:platform:3.4.0=classpath
Expand All @@ -42,21 +67,125 @@ net.sourceforge.nekohtml:nekohtml:1.9.16=classpath
org.ajoberstar.grgit:grgit-core:4.1.1=classpath
org.ajoberstar.grgit:grgit-gradle:4.1.1=classpath
org.antlr:antlr-runtime:3.4=classpath
org.apache.httpcomponents:httpclient:4.3=classpath
org.apache.httpcomponents:httpcore:4.3=classpath
org.apache.commons:commons-compress:1.27.1=classpath
org.apache.commons:commons-jexl3:3.5.0=classpath
org.apache.commons:commons-lang3:3.17.0=classpath
org.apache.commons:commons-text:1.13.1=classpath
org.apache.httpcomponents:httpclient:4.5.14=classpath
org.apache.httpcomponents:httpcore:4.4.16=classpath
org.apache.httpcomponents:httpmime:4.3=classpath
org.apache.maven:maven-artifact:3.6.3=classpath
org.apache.maven:maven-builder-support:3.6.3=classpath
org.apache.maven:maven-model-builder:3.6.3=classpath
org.apache.maven:maven-model:3.6.3=classpath
org.apache.tika:tika-core:2.9.2=classpath
org.bouncycastle:bcpg-jdk18on:1.81=classpath
org.bouncycastle:bcpkix-jdk18on:1.81=classpath
org.bouncycastle:bcprov-jdk18on:1.81=classpath
org.bouncycastle:bcutil-jdk18on:1.81=classpath
org.codehaus.groovy.modules.http-builder:http-builder:0.7.1=classpath
org.eclipse.jgit:org.eclipse.jgit:5.13.0.202109080827-r=classpath
org.codehaus.plexus:plexus-interpolation:1.25=classpath
org.codehaus.plexus:plexus-utils:3.2.1=classpath
org.codehaus.woodstox:stax2-api:4.2.2=classpath
org.commonmark:commonmark-ext-autolink:0.21.0=classpath
org.commonmark:commonmark:0.21.0=classpath
org.eclipse.jgit:org.eclipse.jgit:5.13.3.202401111512-r=classpath
org.eclipse.sisu:org.eclipse.sisu.inject:0.3.4=classpath
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.50=classpath
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.50=classpath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.50=classpath
org.jetbrains.kotlin:kotlin-stdlib:1.3.50=classpath
org.jetbrains:annotations:13.0=classpath
org.jreleaser:jreleaser-artifactory-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-azure-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-bluesky-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-codeberg-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-command-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-config-json:1.19.0=classpath
org.jreleaser:jreleaser-config-toml:1.19.0=classpath
org.jreleaser:jreleaser-config-yaml:1.19.0=classpath
org.jreleaser:jreleaser-discord-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-discourse-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-engine:1.19.0=classpath
org.jreleaser:jreleaser-forgejo-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-ftp-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-genericgit-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-git-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-gitea-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-github-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-gitlab-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-gitter-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-google-chat-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-gradle-plugin:1.19.0=classpath
org.jreleaser:jreleaser-http-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-java-sdk-commons:1.19.0=classpath
org.jreleaser:jreleaser-linkedin-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-logger-api:1.19.0=classpath
org.jreleaser:jreleaser-mastodon-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-mattermost-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-mavencentral-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-model-api:1.19.0=classpath
org.jreleaser:jreleaser-model-impl:1.19.0=classpath
org.jreleaser:jreleaser-nexus2-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-nexus3-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-opencollective-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-resource-bundle:1.19.0=classpath
org.jreleaser:jreleaser-s3-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-sdkman-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-signing-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-slack-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-smtp-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-ssh-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-teams-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-telegram-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-templates:1.19.0=classpath
org.jreleaser:jreleaser-tool-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-twitter-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-utils:1.19.0=classpath
org.jreleaser:jreleaser-webhooks-java-sdk:1.19.0=classpath
org.jreleaser:jreleaser-zulip-java-sdk:1.19.0=classpath
org.jreleaser:org.jreleaser.gradle.plugin:1.19.0=classpath
org.kordamp.gradle:base-gradle-plugin:0.46.10=classpath
org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2=classpath
org.nibor.autolink:autolink:0.10.0=classpath
org.reactivestreams:reactive-streams:1.0.4=classpath
org.scoverage:gradle-scoverage:8.0.3=classpath
org.slf4j:slf4j-api:1.7.30=classpath
org.slf4j:jcl-over-slf4j:2.0.17=classpath
org.slf4j:slf4j-api:2.0.17=classpath
org.tmatesoft.sqljet:sqljet:1.1.10=classpath
org.tmatesoft.svnkit:svnkit:1.8.12=classpath
org.tukaani:xz:1.10=classpath
org.twitter4j:twitter4j-core:4.1.2=classpath
org.yaml:snakeyaml:2.4=classpath
software.amazon.awssdk:annotations:2.31.73=classpath
software.amazon.awssdk:apache-client:2.31.73=classpath
software.amazon.awssdk:arns:2.31.73=classpath
software.amazon.awssdk:auth:2.31.73=classpath
software.amazon.awssdk:aws-core:2.31.73=classpath
software.amazon.awssdk:aws-query-protocol:2.31.73=classpath
software.amazon.awssdk:aws-xml-protocol:2.31.73=classpath
software.amazon.awssdk:checksums-spi:2.31.73=classpath
software.amazon.awssdk:checksums:2.31.73=classpath
software.amazon.awssdk:crt-core:2.31.73=classpath
software.amazon.awssdk:endpoints-spi:2.31.73=classpath
software.amazon.awssdk:http-auth-aws-eventstream:2.31.73=classpath
software.amazon.awssdk:http-auth-aws:2.31.73=classpath
software.amazon.awssdk:http-auth-spi:2.31.73=classpath
software.amazon.awssdk:http-auth:2.31.73=classpath
software.amazon.awssdk:http-client-spi:2.31.73=classpath
software.amazon.awssdk:identity-spi:2.31.73=classpath
software.amazon.awssdk:json-utils:2.31.73=classpath
software.amazon.awssdk:metrics-spi:2.31.73=classpath
software.amazon.awssdk:profiles:2.31.73=classpath
software.amazon.awssdk:protocol-core:2.31.73=classpath
software.amazon.awssdk:regions:2.31.73=classpath
software.amazon.awssdk:retries-spi:2.31.73=classpath
software.amazon.awssdk:retries:2.31.73=classpath
software.amazon.awssdk:s3:2.31.73=classpath
software.amazon.awssdk:sdk-core:2.31.73=classpath
software.amazon.awssdk:third-party-jackson-core:2.31.73=classpath
software.amazon.awssdk:utils:2.31.73=classpath
software.amazon.eventstream:eventstream:1.0.1=classpath
xerces:xercesImpl:2.9.1=classpath
xml-apis:xml-apis:1.3.04=classpath
xml-resolver:xml-resolver:1.2=classpath
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ scalaVersions=2.12.20,2.13.16
# during releases, we only want to create 1 repo tag.
# note that devSnapshot and snapshot tasks won't create repo tags
# see https://github.com/ADTRAN/gradle-scala-multiversion-plugin#advanced-configuration
runOnceTasks=clean,candidate,final,release,generateGradleLintReport
runOnceTasks=candidate,final,release,generateGradleLintReport

# prevent publication of SHA256 & SHA512 checksums, which are incompatible with sonatype release repos
# see https://github.com/gradle/gradle/issues/11308
systemProp.org.gradle.internal.publish.checksums.insecure=true

showTestStandardStreams=false
showTestStandardStreams=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
34 changes: 34 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ set -e
# example: ./publish.sh snapshot minor local
# will increment minor version component and publish snapshots to local maven repository


# See further documentation here: https://jreleaser.org/guide/latest/examples/maven/maven-central.html
#
# Basic workflow:
# Artifacts are staged in a local working directory, then uploaded to maven central. This allows for local checking
# and verification of the directory layout, signing, and fine content requirements.
#
# Dry-Run:
# It can be useful to set dry-run for the upload phase. This can be accomplished with the environment variable JRELEASER_DRY_RUN=true
#
# As a final verification step, it can also be useful to inspect the uploaded file structure and content before
# the staging repository is closed and content is published.
# If the environment variable JRELEASER_MAVENCENTRAL_STAGE is set to UPLOAD, content will only be uploaded to the remote staging
# repository, and the repository will be left unreleased to allow for a final verification step. The last step of closing
# and releasing the remote repository can be done through the maven central UI.
#

if [[ $# -ne 3 ]]
then
echo "usage: ./publish.sh <release type> <release scope> <repository>"
Expand Down Expand Up @@ -38,6 +55,13 @@ else
exit 1
fi

# don't allow publishing devSnapshots to sonatype
if [[ $RELEASE_TYPE = 'devSnapshot' && $REPOSITORY = 'sonatype' ]]
then
echo "Do not publish devSnapshot to sonatype. (use local repository instead)"
exit 1
fi


if [[ $RELEASE_TYPE = 'final' || $RELEASE_TYPE = 'candidate' ]]
then
Expand All @@ -51,6 +75,15 @@ then
# then publish our primary module with other scala versions
echo "publishing $REPOSITORY artifacts for $RELEASE_SCOPE $RELEASE_TYPE release"
./gradlew -Prelease.useLastTag=true -PallScalaVersions $PUBLISH_TASK
if [[ $REPOSITORY = 'sonatype' ]]
then
echo "uploading staged artifacts"
# can also set to "publish" or "full"
# see https://jreleaser.org/guide/latest/reference/deploy/maven/maven-central.html
JRELEASER_MAVENCENTRAL_STAGE=${JRELEASER_MAVENCENTRAL_STAGE:-upload}
export JRELEASER_MAVENCENTRAL_STAGE
./gradlew -Prelease.useLastTag=true -PallScalaVersions jReleaserDeploy --stacktrace
fi
else
echo "we are on a personal fork, must release from main (Workday) fork. aborting $RELEASE_TYPE release"
exit 1
Expand All @@ -64,3 +97,4 @@ else
echo "$RELEASE_TYPE is not a valid release type"
exit 1
fi

4 changes: 1 addition & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
rootProject.name = 'warp-core-root'
include 'warp-core', 'warp-core-gatling', 'warp-core-macros'

enableFeaturePreview('ONE_LOCKFILE_PER_PROJECT')
include 'warp-core', 'warp-core-gatling', 'warp-core-macros'
1 change: 1 addition & 0 deletions versionInfo.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ project.ext.versions = [
, gatling: '3.8.4'
, gradleGit: '4.1.1'
, gradleScoverage: '8.0.3'
, gradleJReleaser: '1.19.0'
, guava: '32.0.1-jre'
, guice: '5.1.0'
, gson: '2.11.0'
Expand Down
Loading