vavr/build.gradle
dependabot[bot] 4dc2f6f163
Bump org.junit.jupiter:junit-jupiter from 5.11.2 to 5.11.3 (#2915)
Bumps
[org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5)
from 5.11.2 to 5.11.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/junit-team/junit5/releases">org.junit.jupiter:junit-jupiter's
releases</a>.</em></p>
<blockquote>
<p>JUnit 5.11.3 = Platform 1.11.3 + Jupiter 5.11.3 + Vintage 5.11.3</p>
<p>See <a
href="http://junit.org/junit5/docs/5.11.3/release-notes/">Release
Notes</a>.</p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/junit-team/junit5/compare/r5.11.2...r5.11.3">https://github.com/junit-team/junit5/compare/r5.11.2...r5.11.3</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b20991e376"><code>b20991e</code></a>
Release 5.11.3</li>
<li><a
href="e57b508692"><code>e57b508</code></a>
Finalize 5.11.3 release notes</li>
<li><a
href="fb1254cb13"><code>fb1254c</code></a>
Allow repeating <code>ExtendWith</code> annotation on fields and
parameters</li>
<li><a
href="a3192bd97f"><code>a3192bd</code></a>
Fix package name comparison on Java 8 (<a
href="https://redirect.github.com/junit-team/junit5/issues/4077">#4077</a>)</li>
<li><a
href="fcb7b0197e"><code>fcb7b01</code></a>
Remove useless <code>Order</code> annotation</li>
<li><a
href="57dfcb515f"><code>57dfcb5</code></a>
Allow repeating <code>@…Source</code> annotations when used as meta
annotations</li>
<li><a
href="09cd8b3598"><code>09cd8b3</code></a>
Add ArchUnit test for consistency of repeatable annotations</li>
<li><a
href="fa46a92fc5"><code>fa46a92</code></a>
Hard-wrap at 90 characters</li>
<li><a
href="8f45eeab56"><code>8f45eea</code></a>
Find repeatable @⁠ExtendWith meta-annotations on fields again</li>
<li><a
href="b451122115"><code>b451122</code></a>
Introduce release notes for 5.11.3</li>
<li>Additional commits viewable in <a
href="https://github.com/junit-team/junit5/compare/r5.11.2...r5.11.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.junit.jupiter:junit-jupiter&package-manager=gradle&previous-version=5.11.2&new-version=5.11.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-22 13:43:35 +02:00

226 lines
6.6 KiB
Groovy

/*
* Some Gradle tasks we use:
*
* - Build: `./gradlew check`
* -> test reports: ./build/reports/tests/test/index.html
* -> coverage reports: ./build/reports/jacoco/test/html/index.html
* -> javadoc: `./build/docs/javadoc`
*
* - Release: `./gradlew release --info`
*
* - Release:
* -> checking the generated artifacts: `./gradlew publishAllPublicationsToTestRepo` then look into `build/repo`
* -> Releasing: `./gradlew release --info`
*
* In order to perform a release you need to:
* - Add the following properties to ~/.gradle/gradle.properties
* ossrhUsername=<username>
* ossrhPassword=<password>
* - or pass the credentials as command line parameters
* ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -DossrhUsername=<my-username> -DossrhPassword=<my-password>
*
* And for signing the artifacts:
* - Get public key ID `gpg --list-keys --keyid-format SHORT`
* - Export key `gpg --keyring secring.gpg --export-secret-keys > ~/.gnupg/secring.gpg`
* - Add the following properties to ~/.gradle/gradle.properties
* signing.keyId=0ABCDEF
* signing.password=password
* signing.secretKeyRingFile=/absolute/path/to/.gnupg/secring.gpg
*/
plugins {
// library
id 'java-library'
id 'jacoco'
// publishing
id 'maven-publish'
id 'signing'
id 'net.researchgate.release' version '3.0.2'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
}
ext.ammoniteScalaVersion = '3.5'
ext.ammoniteVersion = '3.0.0'
ext.ammoniteVersionQualifier = '2-6342755f'
ext.assertjVersion = '3.26.3'
ext.junitVersion = '5.11.3'
// JAVA_VERSION used for CI build matrix, may be provided as env variable
def javaVersion = Integer.parseInt(System.getenv('JAVA_VERSION') ?: '8')
repositories {
mavenCentral()
}
// -- --
// -- JAVA BUILD & CODE GEN --
// -- --
dependencies {
testImplementation "org.junit.jupiter:junit-jupiter:$junitVersion"
testImplementation "org.assertj:assertj-core:$assertjVersion"
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
maxHeapSize = '1G'
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(javaVersion))
}
withSourcesJar()
withJavadocJar()
}
sourceSets.main.java.srcDirs += ['src-gen/main/java']
sourceSets.test.java.srcDirs += ['src-gen/test/java']
tasks.register('generateSources') {
doLast {
delete 'src-gen'
def ammoniteDir = file("generator/bin")
if (!ammoniteDir.exists()) {
ammoniteDir.mkdirs()
}
def ammoniteJar = new File(ammoniteDir, "amm-${ammoniteScalaVersion}-${ammoniteVersion}.jar")
if (!ammoniteJar.exists()) {
def ammoniteAssetName = [ammoniteScalaVersion, ammoniteVersion, ammoniteVersionQualifier]
.findAll { it != null && !it.isEmpty() }
.join('-')
def ammoniteReleaseUrl = "https://github.com/lihaoyi/Ammonite/releases/download/${ammoniteVersion}/${ammoniteAssetName}"
ant.get(src: ammoniteReleaseUrl, dest: ammoniteJar)
}
javaexec {
classpath = project.files(ammoniteJar)
args = ["generator/Generator.sc"]
}
}
}
compileJava.dependsOn 'generateSources'
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.compilerArgs = [ '-Werror', '-Xlint:all', '-Xlint:-deprecation' ]
}
javadoc {options.encoding = "UTF-8"} // error: unmappable character for encoding ASCII
tasks.named('jacocoTestReport') {
reports {
xml.required = true
}
}
tasks.named('check') {
dependsOn jacocoTestReport
dependsOn javadoc
}
tasks.named('jar') {
from('.') {
include 'LICENSE'
}
manifest {
attributes('Automatic-Module-Name': 'io.vavr')
}
}
tasks.register('testSourcesJar', Jar) {
from sourceSets.test.allSource
archiveClassifier = 'test-sources'
}
// -- --
// -- PUBLISHING & RELEASING --
// -- --
// What we want to publish
publishing {
repositories {
maven {
// A test repository which can be used to
// verify what is going to be uploaded by
// running ./gradlew publishAllPublicationsToTestRepo
name = "testRepo"
url = "${buildDir}/repo"
}
}
publications {
maven(MavenPublication) {
from components.java
// vavr also publishes a test sources jar
artifact tasks.named('testSourcesJar')
pom {
name = project.name
description = "Vavr is an object-functional library for Java 8+"
url = 'https://www.vavr.io'
inceptionYear = '2014'
licenses {
license {
name = 'The MIT License (MIT)'
url = 'https://mit-license.org'
}
}
developers {
developer {
name = 'Daniel Dietrich'
email = 'cafebab3@gmail.com'
organization = 'Vavr'
organizationUrl = 'https://github.com/vavr-io'
}
developer {
name = 'Grzegorz Piwowarek'
email = 'gpiwowarek@gmail.com'
organization = 'Vavr'
organizationUrl = 'https://github.com/vavr-io'
}
}
scm {
connection = 'scm:git:https://github.com/vavr-io/vavr.git'
developerConnection = 'scm:git:https://github.com/vavr-io/vavr.git'
url = 'https://github.com/vavr-io/vavr/tree/master'
}
}
}
}
}
// Signing configuration mandatory for Maven Central
signing {
required { !version.endsWith("-SNAPSHOT") }
publishing.publications.configureEach {
sign(it)
}
}
// Configure the publishing repositories for Maven Central
nexusPublishing {
repositories {
sonatype {
username.set(providers.systemProperty("ossrhUsername").orElse("").forUseAtConfigurationTime())
password.set(providers.systemProperty("ossrhPassword").orElse("").forUseAtConfigurationTime())
}
}
}
// Configure the "release" plugin
tasks.named('afterReleaseBuild') {
dependsOn "publishToSonatype", "closeAndReleaseSonatypeStagingRepository"
}
release {
buildTasks = ['build']
tagTemplate = '$name-$version'
git {
requireBranch.set('')
pushToRemote.set('origin')
}
}