Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,4 @@ generated-pipeline.yml
*.crf
*.dat
/build-tools/convention-plugins/.gradle
*.salive
Comment thread
kohlmu-pivotal marked this conversation as resolved.
26 changes: 24 additions & 2 deletions build-tools/convention-plugins/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,30 @@ plugins {
}

repositories {
mavenCentral()
gradlePluginPortal()
val repositoryConfigFilePath = providers.gradleProperty("spring.gemfire.repositories").getOrElse(
providers.environmentVariable("HOME").get() + "/.gradle/gradleRepositories.json"
)

val jsonString = File(repositoryConfigFilePath).readText(Charsets.UTF_8)
val repositories = groovy.json.JsonSlurper().parseText(jsonString) as Map<*, *>
(repositories["repositories"] as List<*>).filterNotNull().map { entry -> entry as Map<*, *> }
.forEach { entry ->
entry.apply {
maven {
url = uri(entry["url"]!! as String)
if (!entry["username"]?.toString().isNullOrBlank()) {
credentials {
username = entry["username"] as String
password = entry["password"] as String
}
}
}
}
}

if (providers.gradleProperty("useMavenCentral").getOrElse("false").toBoolean()) {
mavenCentral()
}
}

dependencies {
Expand Down
30 changes: 25 additions & 5 deletions build-tools/convention-plugins/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,31 @@
*/

pluginManagement {
repositories.mavenCentral()
repositories.gradlePluginPortal()
repositories.google()
repositories.maven {
url = uri("https://repo.spring.io/plugins-release")
repositories {
val repositoryConfigFilePath = providers.gradleProperty("spring.gemfire.repositories").getOrElse(
providers.environmentVariable("HOME").get() + "/.gradle/gradleRepositories.json"
)

val jsonString = File(repositoryConfigFilePath).readText(Charsets.UTF_8)
val repositories = groovy.json.JsonSlurper().parseText(jsonString) as Map<*, *>
(repositories["repositories"] as List<*>).filterNotNull().map { entry -> entry as Map<*, *> }
.forEach { entry ->
entry.apply {
maven {
url = uri(entry["url"]!! as String)
if (!entry["username"]?.toString().isNullOrBlank()) {
credentials {
username = entry["username"] as String
password = entry["password"] as String
}
}
}
}
}

if (providers.gradleProperty("useMavenCentral").getOrElse("false").toBoolean()) {
gradlePluginPortal()
}
}
}

Expand Down
26 changes: 24 additions & 2 deletions build-tools/publishing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,30 @@ plugins {
}

repositories {
mavenCentral()
gradlePluginPortal()
val repositoryConfigFilePath = providers.gradleProperty("spring.gemfire.repositories").getOrElse(
providers.environmentVariable("HOME").get() + "/.gradle/gradleRepositories.json"
)

val jsonString = File(repositoryConfigFilePath).readText(Charsets.UTF_8)
val repositories = groovy.json.JsonSlurper().parseText(jsonString) as Map<*, *>
(repositories["repositories"] as List<*>).filterNotNull().map { entry -> entry as Map<*, *> }
.forEach { entry ->
entry.apply {
maven {
url = uri(entry["url"]!! as String)
if (!entry["username"]?.toString().isNullOrBlank()) {
credentials {
username = entry["username"] as String
password = entry["password"] as String
}
}
}
}
}

if (providers.gradleProperty("useMavenCentral").getOrElse("false").toBoolean()) {
mavenCentral()
}
}

dependencies {
Expand Down
29 changes: 25 additions & 4 deletions build-tools/publishing/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,31 @@
* SPDX-License-Identifier: Apache-2.0
*/
pluginManagement {
repositories.gradlePluginPortal()
repositories.google()
repositories.maven {
url = uri("https://repo.spring.io/plugins-release")
repositories {
val repositoryConfigFilePath = providers.gradleProperty("spring.gemfire.repositories").getOrElse(
providers.environmentVariable("HOME").get() + "/.gradle/gradleRepositories.json"
)

val jsonString = File(repositoryConfigFilePath).readText(Charsets.UTF_8)
val repositories = groovy.json.JsonSlurper().parseText(jsonString) as Map<*, *>
(repositories["repositories"] as List<*>).filterNotNull().map { entry -> entry as Map<*, *> }
.forEach { entry ->
entry.apply {
maven {
url = uri(entry["url"]!! as String)
if (!entry["username"]?.toString().isNullOrBlank()) {
credentials {
username = entry["username"] as String
password = entry["password"] as String
}
}
}
}
}

if (providers.gradleProperty("useMavenCentral").getOrElse("false").toBoolean()) {
gradlePluginPortal()
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins {
project.ext.set("constrainVersionInBom", true)

val license = """
Copyright 2023-2024 Broadcom. All rights reserved.
Copyright 2023-2026 Broadcom. All rights reserved.
SPDX-License-Identifier: Apache-2.0
"""

Expand Down
55 changes: 54 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,30 @@ import nl.littlerobots.vcu.plugin.versionSelector

buildscript {
repositories {
mavenCentral()
val repositoryConfigFilePath = providers.gradleProperty("spring.gemfire.repositories").getOrElse(
providers.environmentVariable("HOME").get() + "/.gradle/gradleRepositories.json"
)

val jsonString = File(repositoryConfigFilePath).readText(Charsets.UTF_8)
val repositories = groovy.json.JsonSlurper().parseText(jsonString) as Map<*, *>
(repositories["repositories"] as List<*>).filterNotNull().map { entry -> entry as Map<*, *> }
.forEach { entry ->
entry.apply {
maven {
url = uri(entry["url"]!! as String)
if (!entry["username"]?.toString().isNullOrBlank()) {
credentials {
username = entry["username"] as String
password = entry["password"] as String
}
}
}
}
}

if (providers.gradleProperty("useMavenCentral").getOrElse("false").toBoolean()) {
mavenCentral()
}
}
}

Expand All @@ -20,6 +43,36 @@ plugins {
id("gemfire-artifactory")
}

allprojects {
repositories {
val repositoryConfigFilePath = providers.gradleProperty("spring.gemfire.repositories").getOrElse(
providers.environmentVariable("HOME").get() + "/.gradle/gradleRepositories.json"
)

val jsonString = File(repositoryConfigFilePath).readText(Charsets.UTF_8)
val repositories = groovy.json.JsonSlurper().parseText(jsonString) as Map<*, *>
(repositories["repositories"] as List<*>).filterNotNull().map { entry -> entry as Map<*, *> }
.forEach { entry ->
entry.apply {
maven {
url = uri(entry["url"]!! as String)
if (!entry["username"]?.toString().isNullOrBlank()) {
credentials {
username = entry["username"] as String
password = entry["password"] as String
}
}
}
}
}

if (providers.gradleProperty("useMavenCentral").getOrElse("false").toBoolean()) {
mavenCentral()
}
}
}


// Suppress warning from gemfire-artifactory plugin. We need the module to be on this project in order to get buildInfo
// uploaded, but there is no artifact on the root project, so we skip that part.
tasks.artifactoryPublish {
Expand Down
6 changes: 4 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ description = 'Spring Data for VMware GemFire'

minimumGradleVersion = 9.4
gemfireVersion= [10.2,10.3)
spring-framework.version=[7.0,7.1)
spring-data-bom.version=[2025.1,2025.2)
baseGemFireVersion=10.2
baseSpringVersion=4.0
spring-framework.version=7.0.7
spring-data-bom.version=2025.1.5

org.gradle.parallel=true
org.gradle.workers.max=3
Expand Down
10 changes: 5 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
[versions]
annotationApiVersion = "2.1.1"
antlrVersion = "2.7.6"
aspectJVersion = "1.9.22.1"
antlrVersion = "2.7.7"
aspectJVersion = "1.9.25"
assertJVersion = "3.26.3"
awaitilityVersion = "4.2.2"
cacheApiVersion = "1.1.1"
cdiApiVersion = "4.0.1"
derbyVersion = "10.9.1.0"
gemFireTestContainersVersion = "3.0.0"
gemfireVersion = "10.2.3"
gemfireVersion = "10.2.4"
googleCloudStorageVersion = "2.45.0"
interceptorApiVersion = "1.2.2"
jUnitJupiterVersion = "5.11.4"
jUnitVersion = "4.13.2"
jacksonVersion = "2.18.7"
log4JVersion = "2.24.3"
logbackVersion = "1.5.32"
lombokPluginVersion = "8.11"
lombokPluginVersion = "8.14"
lombokVersion = "1.18.46"
mockitoVersion = "5.14.2"
multithreadedTCVersion = "1.01"
Expand All @@ -26,7 +26,7 @@ springBootVersion = "4.0.6"
springShellVersion = "1.2.0.RELEASE"
springShiroVersion = "2.0.6"
versionCatalogUpdateVersion = "1.1.0"
versionsVersion = "0.53.0"
versionsVersion = "0.54.0"

[libraries]
annotation-api = { module = "jakarta.annotation:jakarta.annotation-api", version.ref = "annotationApiVersion" }
Expand Down
26 changes: 24 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,30 @@ pluginManagement {
includeBuild("build-tools/publishing")
includeBuild("build-tools/convention-plugins")
repositories {
maven { url = uri("https://repo.spring.io/milestone") }
gradlePluginPortal()
val repositoryConfigFilePath = providers.gradleProperty("spring.gemfire.repositories").getOrElse(
providers.environmentVariable("HOME").get() + "/.gradle/gradleRepositories.json"
)

val jsonString = File(repositoryConfigFilePath).readText(Charsets.UTF_8)
val repositories = groovy.json.JsonSlurper().parseText(jsonString) as Map<*, *>
(repositories["repositories"] as List<*>).filterNotNull().map { entry -> entry as Map<*, *> }
.forEach { entry ->
entry.apply {
maven {
url = uri(entry["url"]!! as String)
if (!entry["username"]?.toString().isNullOrBlank()) {
credentials {
username = entry["username"] as String
password = entry["password"] as String
}
}
}
}
}

if (providers.gradleProperty("useMavenCentral").getOrElse("false").toBoolean()) {
gradlePluginPortal()
}
}
}

Expand Down
41 changes: 28 additions & 13 deletions spring-data-vmware-gemfire/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,30 @@ import java.io.FileInputStream

buildscript {
repositories {
mavenCentral()
val repositoryConfigFilePath = providers.gradleProperty("spring.gemfire.repositories").getOrElse(
providers.environmentVariable("HOME").get() + "/.gradle/gradleRepositories.json"
)

val jsonString = File(repositoryConfigFilePath).readText(Charsets.UTF_8)
val repositories = groovy.json.JsonSlurper().parseText(jsonString) as Map<*, *>
(repositories["repositories"] as List<*>).filterNotNull().map { entry -> entry as Map<*, *> }
.forEach { entry ->
entry.apply {
maven {
url = uri(entry["url"]!! as String)
if (!entry["username"]?.toString().isNullOrBlank()) {
credentials {
username = entry["username"] as String
password = entry["password"] as String
}
}
}
}
}

if (providers.gradleProperty("useMavenCentral").getOrElse("false").toBoolean()) {
mavenCentral()
}
}
dependencies {
classpath(libs.google.cloud.storage)
Expand Down Expand Up @@ -64,8 +87,11 @@ tasks.withType<JavaCompile>().configureEach {
options.compilerArgs.add("-parameters")
}

val baseGemFireVersion: String by project
val baseSpringVersion: String by project

publishingDetails {
artifactName.set("spring-data-4.0-gemfire-${getGemFireBaseVersion()}")
artifactName.set("spring-data-${baseSpringVersion}-gemfire-${baseGemFireVersion}")
longName.set("Spring Data VMware GemFire")
description.set("Spring Data For VMware GemFire")
test.set(false)
Expand Down Expand Up @@ -195,17 +221,6 @@ gradle.taskGraph.whenReady {
}
}

fun getGemFireBaseVersion(): String {
val gemfireVersion = System.getProperty("gemfireVersion")

logger.info("gemFireVersion provided |$gemfireVersion|")
val split = gemfireVersion.split(".")
if (split.size < 2) {
throw RuntimeException("gemfireVersion is malformed")
}
return "${split[0]}.${split[1]}"
}

tasks.register("copyJavadocsToBucket") {
dependsOn(tasks.named("javadocJar"))
doLast {
Expand Down
Loading