Skip to content

Commit 70f0be9

Browse files
authored
Reformat all Java and Groovy code (#1751)
1 parent ceabb88 commit 70f0be9

File tree

63 files changed

+721
-669
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+721
-669
lines changed

.editorconfig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ indent_style = space
77
insert_final_newline = true
88
trim_trailing_whitespace = true
99

10-
[*.{groovy,java}]
10+
[*.{java,groovy}]
1111
indent_size = 4
12+
ij_java_class_count_to_use_import_on_demand = 999
13+
ij_groovy_class_count_to_use_import_on_demand = 999
1214

1315
[*.{kt,kts}]
1416
ij_kotlin_imports_layout = *

src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowApplicationPlugin.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ class ShadowApplicationPlugin implements Plugin<Project> {
9898
if (task.destinationDir.directory) {
9999
if (task.destinationDir.listFiles().size() != 0 && (!new File(task.destinationDir, 'lib').directory || !new File(task.destinationDir, 'bin').directory)) {
100100
throw new GradleException("The specified installation directory '${task.destinationDir}' is neither empty nor does it contain an installation for '${javaApplication.applicationName}'.\n" +
101-
"If you really want to install to this directory, delete it and run the install task again.\n" +
102-
"Alternatively, choose a different installation directory."
101+
"If you really want to install to this directory, delete it and run the install task again.\n" +
102+
"Alternatively, choose a different installation directory."
103103
)
104104
}
105105
}

src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowJavaPlugin.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ class ShadowJavaPlugin implements Plugin<Project> {
9797
}
9898
shadow.from(sourceSets.main.output)
9999
shadow.configurations = [
100-
project.configurations.findByName(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME) ?:
101-
project.configurations.runtime,
100+
project.configurations.findByName(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME) ?:
101+
project.configurations.runtime,
102102
]
103103
shadow.exclude('META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA', 'module-info.class')
104104
}

src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowStats.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ShadowStats {
1919

2020
String getRelocationString() {
2121
def maxLength = relocations.keySet().collect { it.length() }.max()
22-
relocations.collect { k, v -> "${k} ${separator(k, maxLength)} ${v}"}.sort().join("\n")
22+
relocations.collect { k, v -> "${k} ${separator(k, maxLength)} ${v}" }.sort().join("\n")
2323
}
2424

2525
static String separator(String key, int max) {
@@ -60,7 +60,7 @@ class ShadowStats {
6060
double getAverageTimeSecsPerJar() {
6161
averageTimePerJar / 1000
6262
}
63-
63+
6464
String toString() {
6565
StringBuilder sb = new StringBuilder()
6666
sb.append "*******************\n"
@@ -74,8 +74,8 @@ class ShadowStats {
7474

7575
Map<String, String> getBuildScanData() {
7676
[
77-
dependencies: jarCount,
78-
relocations : relocationString,
77+
dependencies: jarCount,
78+
relocations : relocationString,
7979
] as Map<String, String>
8080
}
8181
}

src/main/groovy/com/github/jengelman/gradle/plugins/shadow/internal/AbstractDependencyFilter.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ abstract class AbstractDependencyFilter implements DependencyFilter {
105105
Spec<? super ResolvedDependency> dependency(Dependency dependency) {
106106
this.dependency({ ResolvedDependency it ->
107107
(!dependency.group || it.moduleGroup.matches(dependency.group)) &&
108-
(!dependency.name || it.moduleName.matches(dependency.name)) &&
109-
(!dependency.version || it.moduleVersion.matches(dependency.version))
108+
(!dependency.name || it.moduleName.matches(dependency.name)) &&
109+
(!dependency.version || it.moduleVersion.matches(dependency.version))
110110
})
111111
}
112112

@@ -117,7 +117,7 @@ abstract class AbstractDependencyFilter implements DependencyFilter {
117117
*/
118118
@Override
119119
Spec<? super ResolvedDependency> dependency(Closure spec) {
120-
return Specs.<ResolvedDependency>convertClosureToSpec(spec)
120+
return Specs.<ResolvedDependency> convertClosureToSpec(spec)
121121
}
122122

123123
protected boolean isIncluded(ResolvedDependency dependency) {

src/main/groovy/com/github/jengelman/gradle/plugins/shadow/internal/CleanProperties.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class CleanProperties extends Properties {
2525

2626
private boolean couldBeCommentWithTimestamp(final String str) {
2727
return str != null &&
28-
str.startsWith("#") &&
29-
str.length() == lengthOfExpectedTimestamp
28+
str.startsWith("#") &&
29+
str.length() == lengthOfExpectedTimestamp
3030
}
3131
}
3232

src/main/groovy/com/github/jengelman/gradle/plugins/shadow/internal/DefaultZipCompressor.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class DefaultZipCompressor implements ZipCompressor {
2222
private final int entryCompressionMethod
2323
private final Zip64Mode zip64Mode
2424

25-
DefaultZipCompressor(boolean allowZip64Mode, int entryCompressionMethod) {
25+
DefaultZipCompressor(boolean allowZip64Mode, int entryCompressionMethod) {
2626
this.entryCompressionMethod = entryCompressionMethod
2727
zip64Mode = allowZip64Mode ? Zip64Mode.AsNeeded : Zip64Mode.Never
2828
}

src/main/groovy/com/github/jengelman/gradle/plugins/shadow/internal/MinimizeDependencyFilter.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import org.gradle.api.artifacts.ResolvedDependency
66

77
@Slf4j
88
class MinimizeDependencyFilter extends AbstractDependencyFilter {
9-
9+
1010
MinimizeDependencyFilter(Project project) {
1111
super(project)
1212
}
@@ -26,4 +26,4 @@ class MinimizeDependencyFilter extends AbstractDependencyFilter {
2626
private static boolean isParentExcluded(Set<ResolvedDependency> excludedDependencies, ResolvedDependency dependency) {
2727
excludedDependencies.any { dependency.parents.contains(it) }
2828
}
29-
}
29+
}

src/main/groovy/com/github/jengelman/gradle/plugins/shadow/internal/RelocationUtil.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.github.jengelman.gradle.plugins.shadow.internal
22

33
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
4+
45
import java.util.jar.JarFile
56

67
class RelocationUtil {

src/main/groovy/com/github/jengelman/gradle/plugins/shadow/internal/UnusedTracker.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class UnusedTracker {
5353
def dependencyName = dep.name
5454

5555
return (fileName == "${dependencyName}.jar") ||
56-
(fileName.startsWith("${dependencyName}-") && fileName.endsWith('.jar'))
56+
(fileName.startsWith("${dependencyName}-") && fileName.endsWith('.jar'))
5757
}
5858

5959
private static void addJar(Configuration config, Dependency dep, List<File> result) {

0 commit comments

Comments
 (0)