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
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,12 @@ for current features, their requirement descriptions and migration from junit4.
See [LICENSE.txt](LICENSE.txt) to make your company's lawyer happy.

See [CHANGES.txt](CHANGES.txt) for API changes and updates.

## Snapshot artifacts and releases

We do not publish snapshot artifacts. If you'd like to work with a snapshot,
use gradle's composite build or install maven artifacts locally with:

```
./gradlew publishToMavenLocal
```
14 changes: 14 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
plugins {
alias(libs.plugins.spotless) apply false
alias(libs.plugins.nexus.publish)
}

apply from: file('gradle/scripts/publishing-sonatype-central.gradle')

allprojects {
group = 'com.carrotsearch.randomizedtesting'
version = '0.1.0-SNAPSHOT'
}

nexusPublishing {
repositories {
sonatype {
nexusUrl = uri("https://ossrh-staging-api.central.sonatype.com/service/local/")
snapshotRepositoryUrl = uri("https://central.sonatype.com/repository/maven-snapshots/")
username = findProperty("nexusUsername") ?: ""
password = findProperty("nexusPassword") ?: ""
}
}
}

subprojects {
apply plugin: 'java-library'
apply plugin: 'com.diffplug.spotless'
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
assertj = "3.27.7"
googleJavaFormat = "1.34.1"
junit = "6.0.3"
nexus-publish = "2.0.0"
spotless = "8.3.0"

[libraries]
Expand All @@ -12,4 +13,5 @@ junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher
junit-platform-testkit = { module = "org.junit.platform:junit-platform-testkit", version.ref = "junit" }

[plugins]
nexus-publish = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "nexus-publish" }
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
69 changes: 69 additions & 0 deletions gradle/scripts/publishing-sonatype-central.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
def published = [
":randomizedtesting-jupiter"
]

configure(subprojects.findAll { it.path in published }) {
apply plugin: 'maven-publish'
apply plugin: 'signing'

// Hack: do not generate or publish gradle metadata files.
tasks.withType(GenerateModuleMetadata).configureEach {
enabled = false
}

plugins.withType(JavaPlugin).configureEach {
java {
withSourcesJar()
withJavadocJar()
}

publishing {
def configurePom = {
name = "${project.name}"
description = "${project.name}"
url = 'https://github.com/randomizedtesting/randomizedtesting-jupiter'
inceptionYear = "2026"

licenses {
license {
name = 'ASL 2.0 License'
url = 'https://github.com/randomizedtesting/randomizedtesting-jupiter/blob/main/LICENSE.txt'
}
}

organization {
name = "Carrot Search s.c."
url = "https://www.carrotsearch.com"
}

developers {
developer {
id = 'dawid.weiss'
name = 'Dawid Weiss'
email = 'dawid.weiss@carrotsearch.com'
}
}
scm {
connection = 'scm:git:git@github.com:randomizedtesting/randomizedtesting-jupiter.git'
developerConnection = 'scm:git:git@github.com:randomizedtesting/randomizedtesting-jupiter.git'
url = 'https://github.com/randomizedtesting/randomizedtesting-jupiter'
}
}

publications {
jars(MavenPublication) {
from components.java
groupId = project.group
artifactId = project.base.archivesName.get()

pom(configurePom)
}
}
}

signing {
required = { !project.version.endsWith('-SNAPSHOT') }
sign publishing.publications.jars
}
}
}
Loading