diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index a70b5d717..83ec08166 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -70,7 +70,7 @@ NOTE: References to user stories are in the form Iteration/Story-Number. .Added .Changed -- Bumped detekt +- Bumped detekt, gradle-wrapper //.Deprecated // diff --git a/build.gradle.kts b/build.gradle.kts index 44b76a517..cd6199081 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -72,6 +72,18 @@ reckon { snapshotFromProp() } +detekt { + failFast = false + buildUponDefaultConfig = true + config = files("$rootDir/detekt-config.yml") + baseline = file("detekt-baseline.xml") + + reports { + xml.enabled = true + html.enabled = true + } +} + allprojects { group = "ch.difty" @@ -129,18 +141,6 @@ subprojects { apply(plugin = "java-library") } - detekt { - failFast = false - buildUponDefaultConfig = true - config = files("$rootDir/detekt-config.yml") - baseline = file("detekt-baseline.xml") - - reports { - xml.enabled = true - html.enabled = true - } - } - dependencies { implementation(Lib.kotlin("stdlib-jdk8")) implementation(Lib.kotlin("reflect")) diff --git a/buildSrc/src/main/kotlin/Lib.kt b/buildSrc/src/main/kotlin/Lib.kt index 13ef828e8..9521fcd7c 100644 --- a/buildSrc/src/main/kotlin/Lib.kt +++ b/buildSrc/src/main/kotlin/Lib.kt @@ -9,7 +9,7 @@ object Lib { //region:dependencyVersions private const val kotlinVersion = "1.3.72" - private const val springBootVersion = "2.2.7.RELEASE" + private const val springBootVersion = "2.3.0.RELEASE" private const val springBootAdminVersion = "2.2.2" const val springCloudVersion = "Hoxton.SR4" private const val springCloudStarterVersion = "2.2.2.RELEASE" @@ -206,7 +206,6 @@ fun DependencyHandler.integrationTestAnnotationProcessor(dependencyNotation: Dep fun DependencyHandler.integrationTestRuntimeOnly(dependencyNotation: Dep): Dependency? = add("integrationTestRuntimeOnly", dependencyNotation.id) fun DependencyHandler.jaxb(dependencyNotation: Dep): Dependency? = add("jaxb", dependencyNotation.id) fun DependencyHandler.jooqModelatorRuntime(dependencyNotation: Dep): Dependency? = add("jooqModelatorRuntime", dependencyNotation.id) -fun DependencyHandler.developmentOnly(dependencyNotation: Dep): Dependency? = add("developmentOnly", dependencyNotation.id) fun File.asProperties() = Properties().apply { inputStream().use { fis -> diff --git a/common/common-test/src/main/kotlin/ch/difty/scipamato/common/FrozenDateTimeService.kt b/common/common-test/src/main/kotlin/ch/difty/scipamato/common/FrozenDateTimeService.kt index 13b61f04b..5146d296f 100644 --- a/common/common-test/src/main/kotlin/ch/difty/scipamato/common/FrozenDateTimeService.kt +++ b/common/common-test/src/main/kotlin/ch/difty/scipamato/common/FrozenDateTimeService.kt @@ -5,7 +5,8 @@ import java.time.LocalDate import java.time.LocalDateTime /** - * Implementation of [DateTimeService] constantly returning a frozen moment. This is the implementation to be used in test context. + * Implementation of [DateTimeService] constantly returning a frozen moment. + * This is the implementation to be used in test context. */ class FrozenDateTimeService : DateTimeService { diff --git a/common/common-utils/src/main/kotlin/ch/difty/scipamato/common/persistence/paging/Sort.kt b/common/common-utils/src/main/kotlin/ch/difty/scipamato/common/persistence/paging/Sort.kt index 70a48d273..1641afac2 100644 --- a/common/common-utils/src/main/kotlin/ch/difty/scipamato/common/persistence/paging/Sort.kt +++ b/common/common-utils/src/main/kotlin/ch/difty/scipamato/common/persistence/paging/Sort.kt @@ -4,8 +4,9 @@ import ch.difty.scipamato.common.persistence.paging.Sort.SortProperty import java.io.Serializable /** - * Sort specification offering a list of [SortProperty] items, each providing a name of the to be sorted property and the sort direction. - * This Sort implementation initially was a simplified version of the spring data Sort class. + * Sort specification offering a list of [SortProperty] items, each providing a name + * of the to be sorted property and the sort direction. This Sort implementation initially + * was a simplified version of the spring data Sort class. */ class Sort : Iterable, Serializable { diff --git a/common/common-wicket/build.gradle.kts b/common/common-wicket/build.gradle.kts index 47475ac50..e3725c210 100644 --- a/common/common-wicket/build.gradle.kts +++ b/common/common-wicket/build.gradle.kts @@ -18,11 +18,6 @@ sourceSets { } } -configurations { - val developmentOnly: Configuration = create("developmentOnly") - runtimeClasspath.get().extendsFrom(developmentOnly) -} - dependencies { implementation(project(Module.scipamatoCommon("utils"))) implementation(project(Module.scipamatoCommon("entity"))) @@ -71,6 +66,4 @@ dependencies { testLibImplementation(Lib.servletApi()) testLibImplementation(Lib.validationApi()) - - developmentOnly(Lib.springBoot("devtools")) } diff --git a/core/core-entity/build.gradle.kts b/core/core-entity/build.gradle.kts index 7db02698e..15bd0d6ae 100644 --- a/core/core-entity/build.gradle.kts +++ b/core/core-entity/build.gradle.kts @@ -4,6 +4,7 @@ dependencies { api(project(Module.scipamatoCommon("entity"))) implementation(project(Module.scipamatoCommon("utils"))) + api(Lib.springBootStarter("validation")) api(Lib.validationApi()) testImplementation(project(Module.scipamatoCommon("test"))) diff --git a/core/core-web/src/main/java/ch/difty/scipamato/core/logic/exporting/RisAdapter.kt b/core/core-web/src/main/java/ch/difty/scipamato/core/logic/exporting/RisAdapter.kt index 478b9a93e..1f2f15977 100644 --- a/core/core-web/src/main/java/ch/difty/scipamato/core/logic/exporting/RisAdapter.kt +++ b/core/core-web/src/main/java/ch/difty/scipamato/core/logic/exporting/RisAdapter.kt @@ -65,6 +65,7 @@ sealed class JRisAdapter( return newRisRecord(p, startPage, endPage, periodical, volume, issue) } + @Suppress("LongParameterList") protected abstract fun newRisRecord( p: Paper, startPage: Int?, diff --git a/core/core-web/src/main/java/ch/difty/scipamato/core/web/behavior/AjaxDownload.kt b/core/core-web/src/main/java/ch/difty/scipamato/core/web/behavior/AjaxDownload.kt index d143cd9ae..6f8903e17 100644 --- a/core/core-web/src/main/java/ch/difty/scipamato/core/web/behavior/AjaxDownload.kt +++ b/core/core-web/src/main/java/ch/difty/scipamato/core/web/behavior/AjaxDownload.kt @@ -27,7 +27,9 @@ sealed class AjaxDownload(private val addAntiCache: Boolean) : AbstractAjaxBehav * The timeout is needed to let Wicket release the channel */ fun initiate(target: AjaxRequestTarget) { - target.appendJavaScript("""setTimeout("window.location.href='${callbackUrl.toUrl(addAntiCache)}'", 100);""") + target.appendJavaScript( + """setTimeout("window.location.href='${callbackUrl.toUrl(addAntiCache)}'", 100);""" + ) } override fun onRequest() { @@ -46,4 +48,5 @@ open class AjaxTextDownload @JvmOverloads constructor(addAntiCache: Boolean = tr } private fun CharSequence.toUrl(antiCache: Boolean): String = - if (!antiCache) toString() else "$this${if (this.contains("?")) "&" else "?"}antiCache=${System.currentTimeMillis()}" + if (!antiCache) toString() + else "$this${if (this.contains("?")) "&" else "?"}antiCache=${System.currentTimeMillis()}" diff --git a/core/core-web/src/main/java/ch/difty/scipamato/core/web/paper/search/SearchOrderSelectorPanel.kt b/core/core-web/src/main/java/ch/difty/scipamato/core/web/paper/search/SearchOrderSelectorPanel.kt index 5cf03c1ee..3f6595143 100644 --- a/core/core-web/src/main/java/ch/difty/scipamato/core/web/paper/search/SearchOrderSelectorPanel.kt +++ b/core/core-web/src/main/java/ch/difty/scipamato/core/web/paper/search/SearchOrderSelectorPanel.kt @@ -54,7 +54,11 @@ private const val SEARCH_ORDER_MAX = 200 * @author u.joss */ @Suppress("SameParameterValue") -class SearchOrderSelectorPanel internal constructor(id: String, model: IModel?, mode: Mode) : BasePanel(id, model, mode) { +class SearchOrderSelectorPanel internal constructor( + id: String, + model: IModel?, + mode: Mode +) : BasePanel(id, model, mode) { @SpringBean private lateinit var searchOrderService: SearchOrderService diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 490fda857..62d4c0535 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 4c5803d13..a4f0001d2 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-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 2fe81a7d9..fbd7c5158 100755 --- a/gradlew +++ b/gradlew @@ -82,6 +82,7 @@ esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then @@ -129,6 +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 9109989e3..a9f778a7a 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -84,6 +84,7 @@ set CMD_LINE_ARGS=%* 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%