Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[183] Update to spring boot 1.3.0 #184

Merged
merged 8 commits into from
May 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
Expand Down
24 changes: 12 additions & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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"))
Expand Down
3 changes: 1 addition & 2 deletions buildSrc/src/main/kotlin/Lib.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<SortProperty>, Serializable {

Expand Down
7 changes: 0 additions & 7 deletions common/common-wicket/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")))
Expand Down Expand Up @@ -71,6 +66,4 @@ dependencies {

testLibImplementation(Lib.servletApi())
testLibImplementation(Lib.validationApi())

developmentOnly(Lib.springBoot("devtools"))
}
1 change: 1 addition & 0 deletions core/core-entity/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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()}"
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ private const val SEARCH_ORDER_MAX = 200
* @author u.joss
*/
@Suppress("SameParameterValue")
class SearchOrderSelectorPanel internal constructor(id: String, model: IModel<SearchOrder?>?, mode: Mode) : BasePanel<SearchOrder?>(id, model, mode) {
class SearchOrderSelectorPanel internal constructor(
id: String,
model: IModel<SearchOrder?>?,
mode: Mode
) : BasePanel<SearchOrder?>(id, model, mode) {

@SpringBean
private lateinit var searchOrderService: SearchOrderService
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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%

Expand Down