Skip to content

Commit

Permalink
Invoked gradle initscript to upgrade project dependencies via OpenRew… (
Browse files Browse the repository at this point in the history
#408)

* Invoked gradle initscript to upgrade project dependencies via OpenRewrite

* Upgrade spring-cloud-dependencies, spring-boot, and wire-mock versions
  • Loading branch information
pacphi authored Apr 8, 2024
1 parent fcdba9f commit c4ec3ce
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ target
bin
.idea
out
.history/
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ buildscript {
}
dependencies {
classpath("io.spring.gradle:dependency-management-plugin:1.1.4")
classpath("org.jfrog.buildinfo:build-info-extractor-gradle:5.1.13")
classpath("io.spring.javaformat:spring-javaformat-gradle-plugin:0.0.40")
classpath("org.jfrog.buildinfo:build-info-extractor-gradle:5.2.0")
classpath("io.spring.javaformat:spring-javaformat-gradle-plugin:0.0.41")
classpath("io.spring.nohttp:nohttp-gradle:${nohttpVersion}")
}
}
Expand Down Expand Up @@ -260,4 +260,4 @@ def getProjectsWithSource() {

def getJavaProjects() {
subprojects - project(":spring-cloud-services-dependencies")
}
}
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version=4.1.1-SNAPSHOT
parallel=true

springCloudVersion=2023.0.0
springBootVersion=3.2.0
springCloudVersion=2023.0.1
springBootVersion=3.2.4
javaCfenvVersion=3.1.5
nohttpVersion=0.0.11
wireMockVersion=3.3.1
wireMockVersion=3.5.2
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ dependencies {

testImplementation('org.springframework.boot:spring-boot-starter-test')
testImplementation('org.junit.jupiter:junit-jupiter-api')
testImplementation('org.junit.vintage:junit-vintage-engine')
testImplementation("org.springframework.cloud:spring-cloud-config-server")
testImplementation("org.wiremock:wiremock-standalone:${wireMockVersion}")
testImplementation("org.awaitility:awaitility:4.2.0")
testImplementation("org.awaitility:awaitility:4.2.1")
}

publishing {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ dependencies {

testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation('org.junit.jupiter:junit-jupiter-api')
testImplementation('org.junit.vintage:junit-vintage-engine')
testImplementation("org.springframework.boot:spring-boot-starter-web")
testImplementation("org.wiremock:wiremock-standalone:${wireMockVersion}")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,13 @@ private static String zoneFromUri(String defaultZoneUri) {
hostname = new URI(defaultZoneUri).getHost();
}
catch (URISyntaxException e) {
LOGGER.warning(String.format(INDETERMINATE_EUREKA_ZONE_MESSAGE + " %s", DEFAULT_ZONE_PROPERTY,
defaultZoneUri, UNKNOWN_ZONE, e));
LOGGER.warning((INDETERMINATE_EUREKA_ZONE_MESSAGE + " %s").formatted(DEFAULT_ZONE_PROPERTY, defaultZoneUri,
UNKNOWN_ZONE, e));
return UNKNOWN_ZONE;
}
if (hostname == null || !hostname.contains(".")) {
LOGGER.warning(String.format(INDETERMINATE_EUREKA_ZONE_MESSAGE, DEFAULT_ZONE_PROPERTY, defaultZoneUri,
UNKNOWN_ZONE));
LOGGER.warning(
INDETERMINATE_EUREKA_ZONE_MESSAGE.formatted(DEFAULT_ZONE_PROPERTY, defaultZoneUri, UNKNOWN_ZONE));
return UNKNOWN_ZONE;
}
return hostname.substring(hostname.indexOf('.') + 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public HttpRequest transformRequest(HttpRequest request, ServiceInstance instanc
return request;
}

final var headerValue = String.format("%s:%s", metadata.get(CF_APP_GUID), metadata.get(CF_INSTANCE_INDEX));
final var headerValue = "%s:%s".formatted(metadata.get(CF_APP_GUID), metadata.get(CF_INSTANCE_INDEX));

// request.getHeaders might be immutable, so return a wrapper
return new HttpRequestWrapper(request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ private String[] applicationProperties(String clientId, String clientSecret) {

private String[] applicationProperties(String clientId, String clientSecret, String scope) {
return new String[] { "eureka.client.oauth2.access-token-uri=http://uaa.local/token/uri",
String.format("eureka.client.oauth2.client-id=%s", clientId),
String.format("eureka.client.oauth2.client-secret=%s", clientSecret),
String.format("eureka.client.oauth2.scope=%s", scope), };
"eureka.client.oauth2.client-id=%s".formatted(clientId),
"eureka.client.oauth2.client-secret=%s".formatted(clientSecret),
"eureka.client.oauth2.scope=%s".formatted(scope), };
}

}

0 comments on commit c4ec3ce

Please sign in to comment.