diff --git a/.github/workflows/deploy-snapshot.yaml b/.github/workflows/deploy-snapshot.yaml index e294b0b0e..5879fdb90 100644 --- a/.github/workflows/deploy-snapshot.yaml +++ b/.github/workflows/deploy-snapshot.yaml @@ -31,7 +31,7 @@ jobs: java-version: 8 - name: Build detekt - run: ./gradlew build --build-cache --parallel -PwarningsAsErrors=true + run: ./gradlew build --build-cache --parallel - name: Deploy Snapshot env: diff --git a/.github/workflows/pre-merge.yaml b/.github/workflows/pre-merge.yaml index 08b26a23a..eafbf002a 100644 --- a/.github/workflows/pre-merge.yaml +++ b/.github/workflows/pre-merge.yaml @@ -53,7 +53,7 @@ jobs: - name: Build detekt - run: ./gradlew build :detekt-cli:shadowJarExecutable -PwarningsAsErrors=true --parallel + run: ./gradlew build :detekt-cli:shadowJarExecutable --parallel - name: Run detekt-cli --help run: java -jar ./detekt-cli/build/run/detekt --help - name: Run detekt-cli with argsfile diff --git a/README.md b/README.md index 8de7aa3fd..702af31d1 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ You can find [other ways to install detekt here](https://detekt.github.io/detekt #### with Gradle -Gradle 5.0+ is required: +Gradle 5.4+ is required: ```kotlin buildscript { diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 5c44e6f72..b30edaceb 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -13,7 +13,7 @@ repositories { } object Plugins { - const val KOTLIN = "1.3.72" + const val KOTLIN = "1.4.0" const val DETEKT = "1.11.2" const val GITHUB_RELEASE = "2.2.12" const val ARTIFACTORY = "4.15.1" diff --git a/buildSrc/src/main/kotlin/detekt.gradle.kts b/buildSrc/src/main/kotlin/detekt.gradle.kts index ee6176a53..c0c2f0f03 100644 --- a/buildSrc/src/main/kotlin/detekt.gradle.kts +++ b/buildSrc/src/main/kotlin/detekt.gradle.kts @@ -8,7 +8,6 @@ plugins { val analysisDir = file(projectDir) val baselineFile = file("$rootDir/config/detekt/baseline.xml") val configFile = file("$rootDir/config/detekt/detekt.yml") -val formatConfigFile = file("$rootDir/config/detekt/format.yml") val statisticsConfigFile = file("$rootDir/config/detekt/statistics.yml") val kotlinFiles = "**/*.kt" @@ -53,7 +52,7 @@ val detektFormat by tasks.registering(Detekt::class) { buildUponDefaultConfig = true autoCorrect = true setSource(analysisDir) - config.setFrom(listOf(statisticsConfigFile, formatConfigFile)) + config.setFrom(listOf(statisticsConfigFile, configFile)) include(kotlinFiles) include(kotlinScriptFiles) exclude(resourceFiles) diff --git a/config/detekt/detekt.yml b/config/detekt/detekt.yml index 13bf53cc5..7601a4c85 100644 --- a/config/detekt/detekt.yml +++ b/config/detekt/detekt.yml @@ -53,6 +53,8 @@ formatting: autoCorrect: true MaximumLineLength: active: false + ParameterListWrapping: + active: false naming: MemberNameEqualsClassName: diff --git a/config/detekt/format.yml b/config/detekt/format.yml deleted file mode 100644 index 02f8e3778..000000000 --- a/config/detekt/format.yml +++ /dev/null @@ -1,6 +0,0 @@ -formatting: - active: true - android: false - autoCorrect: true - MaximumLineLength: - active: false diff --git a/detekt-bom/build.gradle.kts b/detekt-bom/build.gradle.kts index 18555b826..daee7d7eb 100644 --- a/detekt-bom/build.gradle.kts +++ b/detekt-bom/build.gradle.kts @@ -5,7 +5,7 @@ plugins { dependencies { val version = object { val spek = "2.0.13-alpha.0.3+3b5f071" - val ktlint = "0.37.2" + val ktlint = "0.38.0-alpha01" } constraints { diff --git a/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/DetektProgressListener.kt b/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/DetektProgressListener.kt index 5a91539de..d2057efd3 100644 --- a/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/DetektProgressListener.kt +++ b/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/DetektProgressListener.kt @@ -22,6 +22,6 @@ class DetektProgressListener : FileProcessListener { override fun onFinish(files: List, result: Detektion) { val middlePart = if (files.size == 1) "file was" else "files were" - outPrinter.appendln("\n\n${files.size} kotlin $middlePart analyzed.") + outPrinter.appendLine("\n\n${files.size} kotlin $middlePart analyzed.") } } diff --git a/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/JCommander.kt b/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/JCommander.kt index d1dc41750..7fc79a2ff 100644 --- a/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/JCommander.kt +++ b/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/JCommander.kt @@ -34,14 +34,14 @@ private fun CliArgs.validate(jCommander: JCommander) { val violations = StringBuilder() if (createBaseline && baseline == null) { - violations.appendln("Creating a baseline.xml requires the --baseline parameter to specify a path.") + violations.appendLine("Creating a baseline.xml requires the --baseline parameter to specify a path.") } if (!createBaseline && baseline != null) { if (Files.notExists(checkNotNull(baseline))) { - violations.appendln("The file specified by --baseline should exist '$baseline'.") + violations.appendLine("The file specified by --baseline should exist '$baseline'.") } else if (!Files.isRegularFile(checkNotNull(baseline))) { - violations.appendln("The path specified by --baseline should be a file '$baseline'.") + violations.appendLine("The path specified by --baseline should be a file '$baseline'.") } } diff --git a/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/runners/AstPrinter.kt b/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/runners/AstPrinter.kt index e80c1f220..a19603a7a 100644 --- a/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/runners/AstPrinter.kt +++ b/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/runners/AstPrinter.kt @@ -20,6 +20,6 @@ class AstPrinter( } val ktFile = KtCompiler().compile(input, input) - outPrinter.appendln(ElementPrinter.dump(ktFile)) + outPrinter.appendLine(ElementPrinter.dump(ktFile)) } } diff --git a/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/runners/ConfigExporter.kt b/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/runners/ConfigExporter.kt index 44136eae6..1a82bff50 100644 --- a/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/runners/ConfigExporter.kt +++ b/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/runners/ConfigExporter.kt @@ -12,6 +12,6 @@ class ConfigExporter( override fun execute() { val configPath = Paths.get(arguments.config ?: "detekt.yml") DefaultConfigurationProvider.load().copy(configPath) - outputPrinter.appendln("Successfully copied default config to ${configPath.toAbsolutePath()}") + outputPrinter.appendLine("Successfully copied default config to ${configPath.toAbsolutePath()}") } } diff --git a/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/runners/ElementPrinter.kt b/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/runners/ElementPrinter.kt index 4ec4c910e..2a3b6a818 100644 --- a/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/runners/ElementPrinter.kt +++ b/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/runners/ElementPrinter.kt @@ -12,7 +12,7 @@ class ElementPrinter : DetektVisitor() { companion object { fun dump(file: KtFile): String = ElementPrinter().run { - sb.appendln("0: " + file.javaClass.simpleName) + sb.appendLine("0: " + file.javaClass.simpleName) visitKtFile(file) sb.toString() } @@ -39,14 +39,14 @@ class ElementPrinter : DetektVisitor() { val currentLine = element.line if (element.isContainer()) { indent++ - sb.appendln(element.dump) + sb.appendLine(element.dump) } else { if (lastLine == currentLine) { indent++ - sb.appendln(element.dump) + sb.appendLine(element.dump) indent-- } else { - sb.appendln(element.dump) + sb.appendLine(element.dump) } } lastLine = currentLine diff --git a/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/runners/VersionPrinter.kt b/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/runners/VersionPrinter.kt index 0795b7987..bcca0751f 100644 --- a/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/runners/VersionPrinter.kt +++ b/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/runners/VersionPrinter.kt @@ -5,6 +5,6 @@ import io.github.detekt.tooling.api.VersionProvider class VersionPrinter(private val outputPrinter: Appendable) : Executable { override fun execute() { - outputPrinter.appendln(VersionProvider.load().current()) + outputPrinter.appendLine(VersionProvider.load().current()) } } diff --git a/detekt-cli/src/test/kotlin/io/gitlab/arturbosch/detekt/cli/runners/VersionPrinterSpec.kt b/detekt-cli/src/test/kotlin/io/gitlab/arturbosch/detekt/cli/runners/VersionPrinterSpec.kt index 8e4b790dd..1d9a2f59c 100644 --- a/detekt-cli/src/test/kotlin/io/gitlab/arturbosch/detekt/cli/runners/VersionPrinterSpec.kt +++ b/detekt-cli/src/test/kotlin/io/gitlab/arturbosch/detekt/cli/runners/VersionPrinterSpec.kt @@ -3,18 +3,14 @@ package io.gitlab.arturbosch.detekt.cli.runners import io.github.detekt.test.utils.StringPrintStream import org.assertj.core.api.Assertions.assertThat import org.spekframework.spek2.Spek -import org.spekframework.spek2.style.specification.describe class VersionPrinterSpec : Spek({ - describe("version printer") { + test("prints the version") { + val printStream = StringPrintStream() - it("prints the version") { - val printStream = StringPrintStream() + VersionPrinter(printStream).execute() - VersionPrinter(printStream).execute() - - assertThat(printStream.toString()).isEqualTo("1.6.0" + System.lineSeparator()) - } + assertThat(printStream.toString()).contains("1.6.0") } }) diff --git a/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/BindingContext.kt b/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/BindingContext.kt index c1dba0f65..11bbe2885 100644 --- a/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/BindingContext.kt +++ b/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/BindingContext.kt @@ -1,8 +1,8 @@ package io.gitlab.arturbosch.detekt.core import org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport -import org.jetbrains.kotlin.cli.common.messages.CompilerMessageLocation import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity +import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSourceLocation import org.jetbrains.kotlin.cli.common.messages.PlainTextMessageRenderer import org.jetbrains.kotlin.cli.common.messages.PrintingMessageCollector import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment @@ -16,7 +16,7 @@ import org.jetbrains.kotlin.resolve.lazy.declarations.FileBasedDeclarationProvid internal fun generateBindingContext( environment: KotlinCoreEnvironment, classpath: List, - files: List + files: List, ): BindingContext { if (classpath.isEmpty()) { return BindingContext.EMPTY @@ -38,11 +38,11 @@ internal fun generateBindingContext( private object DetektMessageRenderer : PlainTextMessageRenderer() { override fun getName() = "detekt message renderer" - override fun getPath(location: CompilerMessageLocation) = location.path + override fun getPath(location: CompilerMessageSourceLocation) = location.path override fun render( severity: CompilerMessageSeverity, message: String, - location: CompilerMessageLocation? + location: CompilerMessageSourceLocation?, ): String { if (!severity.isError) return "" return super.render(severity, message, location) diff --git a/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/reporting/OutputFacade.kt b/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/reporting/OutputFacade.kt index d58d2ec6a..800d28705 100644 --- a/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/reporting/OutputFacade.kt +++ b/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/reporting/OutputFacade.kt @@ -29,7 +29,7 @@ class OutputFacade( for (extension in extensions) { val output = extension.render(result) if (!output.isNullOrBlank()) { - settings.outputChannel.appendln(output) + settings.outputChannel.appendLine(output) } } } diff --git a/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/settings/LoggingAware.kt b/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/settings/LoggingAware.kt index 476748d08..4167c92cc 100644 --- a/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/settings/LoggingAware.kt +++ b/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/settings/LoggingAware.kt @@ -19,7 +19,7 @@ internal fun Throwable.printStacktraceRecursively(logger: Appendable) { is PrintStream -> this.printStackTrace(logger) is PrintWriter -> this.printStackTrace(logger) else -> { - stackTrace.forEach { logger.appendln(it.toString()) } + stackTrace.forEach { logger.appendLine(it.toString()) } cause?.printStacktraceRecursively(logger) } } @@ -33,17 +33,17 @@ internal class LoggingFacade( override val errorChannel: Appendable = spec.errorChannel override fun info(msg: String) { - outputChannel.appendln(msg) + outputChannel.appendLine(msg) } override fun error(msg: String, error: Throwable) { - errorChannel.appendln(msg) + errorChannel.appendLine(msg) error.printStacktraceRecursively(errorChannel) } override fun debug(msg: () -> String) { if (spec.debug) { - outputChannel.appendln(msg()) + outputChannel.appendLine(msg()) } } } diff --git a/detekt-core/src/test/kotlin/io/gitlab/arturbosch/detekt/core/reporting/OutputFacadeSpec.kt b/detekt-core/src/test/kotlin/io/gitlab/arturbosch/detekt/core/reporting/OutputFacadeSpec.kt index 3da461610..851b10f1a 100644 --- a/detekt-core/src/test/kotlin/io/gitlab/arturbosch/detekt/core/reporting/OutputFacadeSpec.kt +++ b/detekt-core/src/test/kotlin/io/gitlab/arturbosch/detekt/core/reporting/OutputFacadeSpec.kt @@ -7,7 +7,6 @@ import io.github.detekt.test.utils.StringPrintStream import io.github.detekt.test.utils.createTempFileForTest import io.github.detekt.test.utils.resourceAsPath import io.gitlab.arturbosch.detekt.core.DetektResult -import io.gitlab.arturbosch.detekt.core.NL import io.gitlab.arturbosch.detekt.core.createNullLoggingSpec import io.gitlab.arturbosch.detekt.core.tooling.withSettings import io.gitlab.arturbosch.detekt.test.createFinding @@ -42,9 +41,9 @@ internal class OutputFacadeSpec : Spek({ spec.withSettings { OutputFacade(this).run(defaultResult) } assertThat(printStream.toString()).contains( - "Successfully generated ${TxtOutputReport().name} at $plainOutputPath$NL", - "Successfully generated ${XmlOutputReport().name} at $xmlOutputPath$NL", - "Successfully generated ${HtmlOutputReport().name} at $htmlOutputPath$NL" + "Successfully generated ${TxtOutputReport().name} at $plainOutputPath", + "Successfully generated ${XmlOutputReport().name} at $xmlOutputPath", + "Successfully generated ${HtmlOutputReport().name} at $htmlOutputPath" ) } }) diff --git a/detekt-gradle-plugin/src/test/kotlin/io/gitlab/arturbosch/detekt/MultiVersionTest.kt b/detekt-gradle-plugin/src/test/kotlin/io/gitlab/arturbosch/detekt/MultiVersionTest.kt index 100bfcc49..3d99749f3 100644 --- a/detekt-gradle-plugin/src/test/kotlin/io/gitlab/arturbosch/detekt/MultiVersionTest.kt +++ b/detekt-gradle-plugin/src/test/kotlin/io/gitlab/arturbosch/detekt/MultiVersionTest.kt @@ -29,9 +29,9 @@ object MultiVersionTest : Spek({ private fun getGradleVersionsUnderTest() = if (getJdkVersion() < 13) { - listOf("5.0", "6.4.1") + listOf("5.4", "6.6") } else { - listOf("6.4.1") + listOf("6.6") } private fun getJdkVersion(): Int { diff --git a/detekt-parser/build.gradle.kts b/detekt-parser/build.gradle.kts index d702a368c..dbb488747 100644 --- a/detekt-parser/build.gradle.kts +++ b/detekt-parser/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.plugin.getKotlinPluginVersion + dependencies { api(kotlin("compiler-embeddable")) implementation(project(":detekt-psi-utils")) @@ -5,7 +7,7 @@ dependencies { } tasks.withType { - systemProperty("kotlinVersion", embeddedKotlinVersion) + systemProperty("kotlinVersion", getKotlinPluginVersion() ?: embeddedKotlinVersion) doFirst { systemProperty("testClasspath", classpath.joinToString(";")) diff --git a/detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/UnusedPrivateMember.kt b/detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/UnusedPrivateMember.kt index 4cf42c053..59dbc53f7 100644 --- a/detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/UnusedPrivateMember.kt +++ b/detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/UnusedPrivateMember.kt @@ -54,9 +54,9 @@ class UnusedPrivateMember(config: Config = Config.empty) : Rule(config) { override val defaultRuleIdAliases: Set = setOf("UNUSED_VARIABLE", "UNUSED_PARAMETER", "unused") override val issue: Issue = Issue("UnusedPrivateMember", - Severity.Maintainability, - "Private member is unused.", - Debt.FIVE_MINS) + Severity.Maintainability, + "Private member is unused.", + Debt.FIVE_MINS) private val allowedNames by LazyRegex(ALLOWED_NAMES_PATTERN, "(_|ignored|expected|serialVersionUID)") @@ -99,11 +99,11 @@ private class UnusedFunctionVisitor( } else { emptyList() } - val referenceDescriptors = (references + referencesViaOperator).mapNotNull { - it.getResolvedCall(bindingContext)?.resultingDescriptor - } - functions.filter { - bindingContext[BindingContext.DECLARATION_TO_DESCRIPTOR, it] !in referenceDescriptors + val referenceDescriptors = (references + referencesViaOperator) + .mapNotNull { it.getResolvedCall(bindingContext)?.resultingDescriptor } + .map { it.original } + functions.filterNot { + bindingContext[BindingContext.DECLARATION_TO_DESCRIPTOR, it] in referenceDescriptors } } references.isEmpty() -> functions @@ -204,7 +204,7 @@ private class UnusedParameterVisitor(allowedNames: Regex) : UnusedMemberVisitor( private fun KtNamedFunction.isRelevant() = !isAllowedToHaveUnusedParameters() private fun KtNamedFunction.isAllowedToHaveUnusedParameters() = - isAbstract() || isOpen() || isOverride() || isOperator() || isMainFunction() || isExternal() || isExpect() + isAbstract() || isOpen() || isOverride() || isOperator() || isMainFunction() || isExternal() || isExpect() } private class UnusedPropertyVisitor(allowedNames: Regex) : UnusedMemberVisitor(allowedNames) { @@ -214,9 +214,11 @@ private class UnusedPropertyVisitor(allowedNames: Regex) : UnusedMemberVisitor(a override fun getUnusedReports(issue: Issue): List { return properties - .filter { it.nameAsSafeName.identifier !in nameAccesses } - .map { CodeSmell(issue, Entity.from(it), - "Private property ${it.nameAsSafeName.identifier} is unused.") } + .filter { it.nameAsSafeName.identifier !in nameAccesses } + .map { + CodeSmell(issue, Entity.from(it), + "Private property ${it.nameAsSafeName.identifier} is unused.") + } } override fun visitParameter(parameter: KtParameter) { @@ -236,8 +238,8 @@ private class UnusedPropertyVisitor(allowedNames: Regex) : UnusedMemberVisitor(a override fun visitPrimaryConstructor(constructor: KtPrimaryConstructor) { super.visitPrimaryConstructor(constructor) constructor.valueParameters - .filter { (it.isPrivate() || !it.hasValOrVar()) && it.containingClassOrObject?.isExpect() == false } - .forEach { maybeAddUnusedProperty(it) } + .filter { (it.isPrivate() || !it.hasValOrVar()) && it.containingClassOrObject?.isExpect() == false } + .forEach { maybeAddUnusedProperty(it) } } override fun visitSecondaryConstructor(constructor: KtSecondaryConstructor) { diff --git a/detekt-rules-style/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/UnusedPrivateMemberSpec.kt b/detekt-rules-style/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/UnusedPrivateMemberSpec.kt index 731120c91..cb4770df9 100644 --- a/detekt-rules-style/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/UnusedPrivateMemberSpec.kt +++ b/detekt-rules-style/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/UnusedPrivateMemberSpec.kt @@ -1157,7 +1157,7 @@ class UnusedPrivateMemberSpec : Spek({ """ val findings = subject.compileAndLintWithContext(env, code) assertThat(findings).hasSize(1).hasSourceLocations( - SourceLocation(3,5) + SourceLocation(3, 5) ) } } diff --git a/docs/pages/gettingstarted/gradle.md b/docs/pages/gettingstarted/gradle.md index dcec0666e..151337d0f 100644 --- a/docs/pages/gettingstarted/gradle.md +++ b/docs/pages/gettingstarted/gradle.md @@ -10,7 +10,7 @@ redirect_from: summary: --- -detekt requires Gradle 5.0 or higher. +detekt requires Gradle 5.4 or higher. #### Available plugin tasks diff --git a/gradle.properties b/gradle.properties index bf19503c8..def588e2f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,5 +4,7 @@ systemProp.file.encoding=UTF-8 org.gradle.parallel=true org.gradle.workers.max=4 org.gradle.caching=true +# increase max heap for dokka on Java 11 +org.gradle.jvmargs=-Xmx1024m # Needed for https://github.com/gradle/gradle/issues/11412 systemProp.org.gradle.internal.publish.checksums.insecure=true diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 62d4c0535..e708b1c02 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 21e622da6..bca17f365 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index fbd7c5158..4f906e0c8 100755 --- a/gradlew +++ b/gradlew @@ -130,7 +130,7 @@ fi if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath diff --git a/gradlew.bat b/gradlew.bat index 5093609d5..107acd32c 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -54,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -64,21 +64,6 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - :execute @rem Setup the command line @@ -86,7 +71,7 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell