From f102bf3b2c05ae75f38c2a72182a8c104a5d3749 Mon Sep 17 00:00:00 2001 From: Pascal Christoph Date: Thu, 24 Feb 2022 16:50:25 +0100 Subject: [PATCH 1/2] Fix warnings reported by Intellij IDE processing gradle.properties --- build.gradle | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index 9f34bfb71..93cefe672 100644 --- a/build.gradle +++ b/build.gradle @@ -65,7 +65,7 @@ subprojects { tasks.withType(JavaCompile) { 'all -processing -rawtypes -serial'.split().each { - options.compilerArgs << "-Xlint:${it}" + options.compilerArgs << ("-Xlint:${it}" as String) } options.compilerArgs << '-Werror' @@ -139,7 +139,7 @@ gradle.projectsEvaluated { } def mavenProjectDescription = { - name project.mavenName ?: project.name + name = project.mavenName ?: project.name if (project.description) { description project.description } @@ -148,7 +148,7 @@ gradle.projectsEvaluated { developers { developer { id 'mgeipel' - name 'Markus M. Geipel' + name = 'Markus M. Geipel' email 'm.geipel@dnb.de' url 'https://github.com/mgeipel' roles { @@ -158,7 +158,7 @@ gradle.projectsEvaluated { } developer { id 'cboehme' - name 'Christoph Böhme' + name = 'Christoph Böhme' email 'c.boehme@dnb.de' url 'https://github.com/cboehme' roles { @@ -168,18 +168,18 @@ gradle.projectsEvaluated { } } organization { - name 'Metafacture' + name = 'Metafacture' url 'https://github.com/metafacture' } licenses { license { - name 'The Apache License, Version 2.0' + name = 'The Apache License, Version 2.0' url 'http://www.apache.org/licenses/LICENSE-2.0.txt' } } mailingLists { mailingList { - name 'Metafacture Mailing List' + name = 'Metafacture Mailing List' post 'metafacture@lists.dnb.de' subscribe 'metafacture-subscribe@lists.dnb.de' unsubscribe 'metafacture-unsubscribe@lists.dnb.de' @@ -286,7 +286,6 @@ class ScmInfo { } def getScmInfo() { - def version = null def tag = getGitTag() if (tag != null) { logger.lifecycle('SCM tag found. Making a release build') @@ -304,11 +303,11 @@ def getSnapshotVersion() { logger.warn('No Git repository found') return 'non-scm-build-SNAPSHOT' } - if (grgit.branch.current().fullName.equals('HEAD')) { + if (grgit.branch.current().fullName == 'HEAD') { logger.lifecycle('Detached HEAD found') return "commit-${grgit.head().id}-SNAPSHOT" } - if (grgit.branch.current().name.equals('master')) { + if (grgit.branch.current().name == 'master') { logger.lifecycle('On master branch') return 'master-SNAPSHOT' } @@ -343,7 +342,7 @@ def getGitTag() { return tag.name } -def getAnnotatedTags() { + def getAnnotatedTags() { def tags = [] for (tag in grgit.tag.list()) { if (tag.commit == grgit.head() From 1ea8c7d5900aac4272837abab7380c8b8a3c6fcf Mon Sep 17 00:00:00 2001 From: Pascal Christoph Date: Fri, 25 Feb 2022 09:25:49 +0100 Subject: [PATCH 2/2] Get rid of cast; fix typo --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 93cefe672..d0b730a63 100644 --- a/build.gradle +++ b/build.gradle @@ -65,7 +65,7 @@ subprojects { tasks.withType(JavaCompile) { 'all -processing -rawtypes -serial'.split().each { - options.compilerArgs << ("-Xlint:${it}" as String) + options.compilerArgs << "-Xlint:${it}".toString() } options.compilerArgs << '-Werror' @@ -342,7 +342,7 @@ def getGitTag() { return tag.name } - def getAnnotatedTags() { +def getAnnotatedTags() { def tags = [] for (tag in grgit.tag.list()) { if (tag.commit == grgit.head()