Skip to content
This repository was archived by the owner on Dec 3, 2025. It is now read-only.

Add spring-boot sample application - #746

Open
ramsrib wants to merge 2 commits into
gradle:masterfrom
ramsrib:develop
Open

Add spring-boot sample application#746
ramsrib wants to merge 2 commits into
gradle:masterfrom
ramsrib:develop

Conversation

@ramsrib

@ramsrib ramsrib commented Mar 9, 2018

Copy link
Copy Markdown

Context

Added spring-boot sample which is missing in the present kotlin-dsl samples.

Contributor Checklist

  • Base the PR against the develop branch
  • Make sure that all commits are signed off to indicate that you agree to the terms of Developer Certificate of Origin.
  • Provide integration tests to verify changes from a user perspective
  • Provide unit tests to verify logic
  • Ensure that tests pass locally: ./gradlew check --parallel

@ramsrib ramsrib mentioned this pull request Mar 9, 2018
5 tasks

@Test
fun hello() {
Assertions.assertEquals("Hello, Spring Boot!..", restTemplate.getForObject<String>("/hello"))

@JLLeitschuh JLLeitschuh Mar 9, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭕ Static import of Assertions.assertEquals probably better.

}
}

(tasks.findByName("test") as Test).useJUnitPlatform()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

personally I find

tasks.withType(Test::class.java) {
    useJUnitPlatform()
}

more idiomatic

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@breskeby
This is simpler:

tasks.withType<Test> {
    useJUnitPlatform()
}

But this is bikeshedding. The way it is here also makes sense.

@ramsrib

ramsrib commented Mar 12, 2018

Copy link
Copy Markdown
Author

Build is failing in JDK 8. Any idea?


org.gradle.kotlin.dsl.integration.KotlinBuildScriptModelIntegrationTest > can fetch buildSrc classpath in face of compilation errors STANDARD_ERROR
    e: /tmp/junit638243372634683066/can#20fetch#20buildSrc#20classpath#20in#20face#20of#20compilation#20errors/build.gradle.kts:2:20: Expecting an expression
    org.gradle.internal.exceptions.LocationAwareException: Build file '/tmp/junit638243372634683066/can#20fetch#20buildSrc#20classpath#20in#20face#20of#20compilation#20errors/build.gradle.kts' line: 2
    Script compilation error:
      Line 2:             val p =
                                 ^ Expecting an expression
    1 error
    	at org.gradle.kotlin.dsl.provider.KotlinBuildScriptCompiler.withKotlinCompiler(KotlinBuildScriptCompiler.kt:508)

@ramsrib
ramsrib force-pushed the develop branch 3 times, most recently from 5a076eb to ef63e06 Compare April 30, 2018 20:54
@JLLeitschuh

Copy link
Copy Markdown
Contributor

@ramsrib Is that a test failure?

@ramsrib

ramsrib commented May 3, 2018

Copy link
Copy Markdown
Author

It doesn't look like a test failure.

ramsrib added 2 commits May 3, 2018 17:52
Signed-off-by: Sriram <sri.kmb@gmail.com>
Signed-off-by: Sriram <sri.kmb@gmail.com>
@ramsrib

ramsrib commented May 15, 2018

Copy link
Copy Markdown
Author

Guys, Any idea on why the build is failing?

@eskatos
eskatos changed the base branch from develop to master April 25, 2019 14:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants