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
10 changes: 0 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@ apply from: "spotless.gradle"

subprojects {
apply from: "$rootDir/gradle/build-conventions.gradle"

// Skip Javadoc for demo modules
if (project.path.startsWith(':demos:')) {
tasks.withType(Javadoc) {
onlyIf { false }
}
tasks.matching { it.name == 'javadocJar' }.configureEach {
onlyIf { false }
}
}
}

tasks.register('aggregateTestReport', TestReport) {
Expand Down
91 changes: 49 additions & 42 deletions gradle/build-conventions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ java {
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withJavadocJar()
withSourcesJar()

// Only generate javadoc and sources JARs for non-demo modules
if (!project.path.startsWith(':demos:')) {
withJavadocJar()
withSourcesJar()
}
}

test {
Expand All @@ -36,58 +40,61 @@ dependencies {
testImplementation "com.redis:testcontainers-redis:${testcontainersRedisVersion}"
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
groupId = project.group
artifactId = project.name
version = project.version
description = project.description
// Only configure publishing for non-demo modules
if (!project.path.startsWith(':demos:')) {
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
groupId = project.group
artifactId = project.name
version = project.version
description = project.description

versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
}

pom {
packaging = 'jar'
name = project.name
description = project.description
url = "https://github.com/redis/redis-om-spring"
inceptionYear = '2021'
pom {
packaging = 'jar'
name = project.name
description = project.description
url = "https://github.com/redis/redis-om-spring"
inceptionYear = '2021'

licenses {
license {
name = "MIT License"
url = "https://opensource.org/licenses/MIT"
licenses {
license {
name = "MIT License"
url = "https://opensource.org/licenses/MIT"
}
}
}

developers {
developer {
id = "bsbodden"
name = "Brian Sam-Bodden"
email = "bsb at redis.com"
developers {
developer {
id = "bsbodden"
name = "Brian Sam-Bodden"
email = "bsb at redis.com"
}
}
}

scm {
connection = "scm:git:git://github.com/redis/redis-om-spring.git"
developerConnection = "scm:git:ssh://github.com/redis/redis-om-spring.git"
url = "https://github.com/redis/redis-om-spring"
scm {
connection = "scm:git:git://github.com/redis/redis-om-spring.git"
developerConnection = "scm:git:ssh://github.com/redis/redis-om-spring.git"
url = "https://github.com/redis/redis-om-spring"
}
}
}
}
}

repositories {
maven {
url = rootProject.layout.buildDirectory.dir('staging-deploy')
repositories {
maven {
url = rootProject.layout.buildDirectory.dir('staging-deploy')
}
}
}
}