Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override of shard via system property is removed #108

Merged
merged 2 commits into from
Mar 17, 2023
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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.gradle</groupId>
<artifactId>common-custom-user-data-maven-extension</artifactId>
<version>1.11.2-SNAPSHOT</version>
<version>1.12-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Gradle Enterprise Common Custom User Data Maven Extension</name>
Expand Down
2 changes: 1 addition & 1 deletion release/changes.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@

- [NEW] Overrides via system properties are consolidated #108
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public void configure(GradleEnterpriseApi api, MavenSession session) throws Exce
logger.debug("Finished configuring build cache");

GroovyScriptUserData.evaluate(session, api, logger);
SystemPropertyOverrides.configureBuildCache(buildCache);
}

}
25 changes: 0 additions & 25 deletions src/main/java/com/gradle/SystemPropertyOverrides.java

This file was deleted.

13 changes: 0 additions & 13 deletions src/main/java/com/gradle/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,10 @@ static boolean isNotEmpty(String value) {
return value != null && !value.isEmpty();
}

static String stripPrefix(String prefix, String string) {
return string.startsWith(prefix) ? string.substring(prefix.length()) : string;
}

static String appendIfMissing(String str, String suffix) {
return str.endsWith(suffix) ? str : str + suffix;
}

static URI appendPathAndTrailingSlash(URI baseUri, String path) {
if (isNotEmpty(path)) {
String normalizedBasePath = appendIfMissing(baseUri.getPath(), "/");
String normalizedPath = appendIfMissing(stripPrefix("/", path), "/");
return baseUri.resolve(normalizedBasePath).resolve(normalizedPath);
}
return baseUri;
}

static String urlEncode(String str) {
try {
return URLEncoder.encode(str, StandardCharsets.UTF_8.name());
Expand Down