From a2adeae9ac12b7fc4c9f7a8d1bacaa7db97a430a Mon Sep 17 00:00:00 2001 From: iamdanfox Date: Mon, 21 Jan 2019 13:31:46 +0000 Subject: [PATCH] Use modern gradle tooling (#259) --- .../checkstyle/checkstyle-suppressions.xml | 14 +- .baseline/checkstyle/checkstyle.xml | 151 ++++++++++++++---- .../{apache-2.0.txt => 001_apache-2.0.txt} | 2 +- .../copyright/palantir-copyright-external.txt | 13 -- .../copyright/palantir-copyright-internal.txt | 0 .baseline/eclipse/org.eclipse.jdt.core.prefs | 12 +- .../dotfile.settings/org.eclipse.jdt.ui.prefs | 2 +- .../idea/intellij-java-palantir-style.xml | 26 ++- .bulldozer.yml | 14 ++ .policy.yml | 50 ++++++ README.md | 2 +- build.gradle | 23 ++- .../{core.gradle => build.gradle} | 0 .../docker/compose/CustomImmutablesStyle.java | 2 +- .../AdditionalEnvironmentValidator.java | 2 +- .../DaemonEnvironmentValidator.java | 6 +- .../configuration/DaemonHostIpResolver.java | 2 +- .../configuration/DockerComposeFiles.java | 2 +- .../compose/configuration/DockerType.java | 2 +- .../configuration/EnvironmentValidator.java | 2 +- .../configuration/EnvironmentVariables.java | 2 +- .../compose/configuration/HostIpResolver.java | 2 +- .../compose/configuration/PackageVisible.java | 2 +- .../compose/configuration/ProjectName.java | 6 +- .../RemoteEnvironmentValidator.java | 2 +- .../configuration/RemoteHostIpResolver.java | 2 +- .../configuration/ShutdownStrategy.java | 2 +- .../docker/compose/connection/Cluster.java | 2 +- .../docker/compose/connection/Container.java | 9 +- .../compose/connection/ContainerCache.java | 2 +- .../compose/connection/ContainerName.java | 2 +- .../compose/connection/ContainerNames.java | 2 +- .../compose/connection/DockerMachine.java | 2 +- .../docker/compose/connection/DockerPort.java | 2 +- .../compose/connection/PortMapping.java | 2 +- .../docker/compose/connection/Ports.java | 2 +- .../docker/compose/connection/State.java | 2 +- .../compose/connection/waiting/Attempt.java | 2 +- .../waiting/ClusterHealthCheck.java | 2 +- .../connection/waiting/ClusterWait.java | 2 +- .../connection/waiting/Exceptions.java | 2 +- .../connection/waiting/HealthCheck.java | 2 +- .../connection/waiting/HealthChecks.java | 2 +- .../connection/waiting/SuccessOrFailure.java | 2 +- .../execution/AggressiveShutdownStrategy.java | 2 +- ...iveShutdownWithNetworkCleanupStrategy.java | 2 +- .../docker/compose/execution/Command.java | 2 +- ...lictingContainerRemovingDockerCompose.java | 2 +- .../execution/DefaultDockerCompose.java | 10 +- .../execution/DelegatingDockerCompose.java | 2 +- .../docker/compose/execution/Docker.java | 3 +- .../execution/DockerCommandLocations.java | 2 +- .../compose/execution/DockerCompose.java | 2 +- .../execution/DockerComposeExecArgument.java | 2 +- .../execution/DockerComposeExecOption.java | 2 +- .../execution/DockerComposeExecutable.java | 2 +- .../execution/DockerComposeRunArgument.java | 2 +- .../execution/DockerComposeRunOption.java | 2 +- .../execution/DockerComposeVersion.java | 2 +- .../execution/DockerConfiguration.java | 2 +- .../compose/execution/DockerExecutable.java | 2 +- .../execution/DockerExecutionException.java | 2 +- .../execution/DockerForMacHostsIssue.java | 3 +- .../compose/execution/ErrorHandler.java | 2 +- .../docker/compose/execution/Executable.java | 2 +- .../execution/GracefulShutdownStrategy.java | 2 +- .../execution/KillDownShutdownStrategy.java | 2 +- .../compose/execution/ProcessResult.java | 2 +- .../docker/compose/execution/Retryer.java | 2 +- .../execution/RetryingDockerCompose.java | 2 +- .../execution/SkipShutdownStrategy.java | 2 +- .../logging/DoNothingLogCollector.java | 2 +- .../compose/logging/FileLogCollector.java | 2 +- .../docker/compose/logging/LogCollector.java | 2 +- .../docker/compose/logging/LogDirectory.java | 2 +- .../matchers/AvailablePortMatcher.java | 2 +- .../AggressiveShutdownStrategyTest.java | 2 +- ...hutdownWithNetworkCleanupStrategyTest.java | 2 +- .../docker/compose/TestContainerNames.java | 2 +- .../AdditionalEnvironmentValidatorShould.java | 2 +- .../DaemonEnvironmentValidatorShould.java | 2 +- .../DaemonHostIpResolverShould.java | 2 +- .../DockerComposeFilesShould.java | 2 +- .../configuration/DockerTypeShould.java | 2 +- .../configuration/MockDockerEnvironment.java | 2 +- .../configuration/ProjectNameShould.java | 2 +- .../RemoteEnvironmentValidatorShould.java | 2 +- .../RemoteHostIpResolverShould.java | 2 +- .../connection/ContainerCacheShould.java | 2 +- .../connection/ContainerIntegrationTests.java | 2 +- .../connection/ContainerNameShould.java | 2 +- .../compose/connection/ContainerShould.java | 2 +- .../DockerPortFormattingShould.java | 2 +- .../connection/LocalBuilderShould.java | 2 +- .../compose/connection/PortsShould.java | 2 +- .../connection/RemoteBuilderShould.java | 2 +- .../connection/waiting/ClusterWaitShould.java | 2 +- .../connection/waiting/ExceptionsShould.java | 2 +- .../waiting/HttpHealthCheckShould.java | 2 +- .../waiting/PortsHealthCheckShould.java | 2 +- .../waiting/SuccessOrFailureMatchers.java | 2 +- .../waiting/SuccessOrFailureShould.java | 2 +- .../compose/execution/CommandShould.java | 4 +- ...gContainerRemovingDockerComposeShould.java | 3 +- .../DockerCommandLocationsShould.java | 4 +- .../DockerComposeExecOptionShould.java | 2 +- .../execution/DockerComposeShould.java | 4 +- .../execution/DockerComposeVersionShould.java | 2 +- .../compose/execution/DockerShould.java | 4 +- .../GracefulShutdownStrategyShould.java | 2 +- .../KillDownShutdownStrategyShould.java | 2 +- .../compose/execution/RetryerShould.java | 2 +- .../RetryingDockerComposeShould.java | 2 +- .../logging/FileLogCollectorShould.java | 14 +- .../compose/logging/LogDirectoryTest.java | 2 +- .../matchers/AvailablePortMatcherShould.java | 2 +- .../DockerMachineEnvironmentMatcher.java | 2 +- .../docker/compose/matchers/IOMatchers.java | 2 +- .../compose/matchers/ValueCachingMatcher.java | 2 +- .../compose/utils/MockitoMultiAnswer.java | 2 +- .../{junit4.gradle => build.gradle} | 0 .../docker/compose/DockerComposeRule.java | 3 +- ...essiveShutdownStrategyIntegrationTest.java | 2 +- ...NetworkCleanupStrategyIntegrationTest.java | 2 +- .../DockerComposeRuleIntegrationTest.java | 2 +- ...eRuleNativeHealthcheckIntegrationTest.java | 2 +- .../compose/DockerComposeRuleShould.java | 10 +- ...ComposeRuleUpContainerIntegrationTest.java | 2 +- .../HostNetworkedPortsIntegrationTest.java | 3 +- ...eConflictingContainersIntegrationTest.java | 2 +- .../EnvironmentVariableIntegrationTest.java | 2 +- .../logging/LoggingIntegrationTest.java | 4 +- gradle/publish-jar.gradle | 30 ++++ gradle/publish.gradle | 75 --------- settings.gradle | 9 +- 135 files changed, 410 insertions(+), 307 deletions(-) rename .baseline/copyright/{apache-2.0.txt => 001_apache-2.0.txt} (87%) delete mode 100644 .baseline/copyright/palantir-copyright-external.txt delete mode 100644 .baseline/copyright/palantir-copyright-internal.txt create mode 100644 .bulldozer.yml create mode 100644 .policy.yml rename docker-compose-rule-core/{core.gradle => build.gradle} (100%) rename docker-compose-rule-junit4/{junit4.gradle => build.gradle} (100%) create mode 100644 gradle/publish-jar.gradle delete mode 100644 gradle/publish.gradle diff --git a/.baseline/checkstyle/checkstyle-suppressions.xml b/.baseline/checkstyle/checkstyle-suppressions.xml index 44de1a46a..2a7cd17ed 100644 --- a/.baseline/checkstyle/checkstyle-suppressions.xml +++ b/.baseline/checkstyle/checkstyle-suppressions.xml @@ -10,6 +10,13 @@ + + + + + + + @@ -19,13 +26,14 @@ - - + - + + + diff --git a/.baseline/checkstyle/checkstyle.xml b/.baseline/checkstyle/checkstyle.xml index d513cb33f..c42ade258 100644 --- a/.baseline/checkstyle/checkstyle.xml +++ b/.baseline/checkstyle/checkstyle.xml @@ -14,15 +14,12 @@ - - - - + @@ -42,12 +39,22 @@ + + + + + - + + + + + + @@ -70,6 +77,14 @@ + + + @@ -90,7 +105,7 @@ - + @@ -103,14 +118,45 @@ + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -127,11 +173,17 @@ - + + + + + + + @@ -139,20 +191,21 @@ - - - + - + - + + + + + - @@ -175,6 +228,7 @@ + @@ -225,10 +279,27 @@ + + + + + + + + + + + + + + + + + @@ -253,19 +324,6 @@ - - - - - - - - - - - - - @@ -277,7 +335,19 @@ - + + + + + + + + + + + + + @@ -286,16 +356,27 @@ - + - + + + + + + + + + + + + - + @@ -342,7 +423,9 @@ - + + + @@ -359,7 +442,7 @@ - + @@ -374,7 +457,7 @@ - + diff --git a/.baseline/copyright/apache-2.0.txt b/.baseline/copyright/001_apache-2.0.txt similarity index 87% rename from .baseline/copyright/apache-2.0.txt rename to .baseline/copyright/001_apache-2.0.txt index c12d5ab06..54d4a0312 100644 --- a/.baseline/copyright/apache-2.0.txt +++ b/.baseline/copyright/001_apache-2.0.txt @@ -1,4 +1,4 @@ -Copyright ${today.year} Palantir Technologies, Inc. All rights reserved. +(c) Copyright ${today.year} Palantir Technologies Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/.baseline/copyright/palantir-copyright-external.txt b/.baseline/copyright/palantir-copyright-external.txt deleted file mode 100644 index 79ba63068..000000000 --- a/.baseline/copyright/palantir-copyright-external.txt +++ /dev/null @@ -1,13 +0,0 @@ -Copyright ${today.year} Palantir Technologies, Inc. All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file diff --git a/.baseline/copyright/palantir-copyright-internal.txt b/.baseline/copyright/palantir-copyright-internal.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/.baseline/eclipse/org.eclipse.jdt.core.prefs b/.baseline/eclipse/org.eclipse.jdt.core.prefs index 1a4c6b3ab..fc7a7ddf5 100644 --- a/.baseline/eclipse/org.eclipse.jdt.core.prefs +++ b/.baseline/eclipse/org.eclipse.jdt.core.prefs @@ -15,9 +15,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=javax.annotation.CheckForNull org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=${javaTargetVersion} org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.compliance=${javaTargetVersion} org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -26,7 +26,7 @@ org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore org.eclipse.jdt.core.compiler.processAnnotations=enabled -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.source=${javaSourceVersion} org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=16 @@ -87,7 +87,7 @@ org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false org.eclipse.jdt.core.formatter.comment.indent_root_tags=true org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert -org.eclipse.jdt.core.formatter.comment.line_length=150 +org.eclipse.jdt.core.formatter.comment.line_length=120 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false @@ -109,7 +109,7 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true org.eclipse.jdt.core.formatter.indentation.size=4 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert @@ -298,7 +298,7 @@ org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.lineSplit=150 +org.eclipse.jdt.core.formatter.lineSplit=120 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 diff --git a/.baseline/eclipse/static/dotfile.settings/org.eclipse.jdt.ui.prefs b/.baseline/eclipse/static/dotfile.settings/org.eclipse.jdt.ui.prefs index d3db44ab7..f2990d969 100644 --- a/.baseline/eclipse/static/dotfile.settings/org.eclipse.jdt.ui.prefs +++ b/.baseline/eclipse/static/dotfile.settings/org.eclipse.jdt.ui.prefs @@ -11,7 +11,7 @@ org.eclipse.jdt.ui.keywordthis=false org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.overrideannotation=true org.eclipse.jdt.ui.staticondemandthreshold=99 -org.eclipse.jdt.ui.text.custom_code_templates=