-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
269 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,27 @@ | ||
HELP.md | ||
.gradle | ||
.gradle/ | ||
build/ | ||
!gradle/wrapper/gradle-wrapper.jar | ||
!**/src/main/** | ||
!**/src/test/** | ||
|
||
target/ | ||
out/ | ||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
.idea/ | ||
*.iws | ||
*.iml | ||
*.ipr | ||
out/ | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
|
||
### VS Code ### | ||
.vscode/ | ||
======= | ||
# Compiled class file | ||
*.class | ||
|
||
# Log file | ||
*.log | ||
|
||
# BlueJ files | ||
*.ctxt | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
nbproject/private/ | ||
build/ | ||
nbbuild/ | ||
dist/ | ||
nbdist/ | ||
.nb-gradle/ | ||
/.mvn/ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
plugins { | ||
// Apply the Kotlin JVM plugin to add support for Kotlin on the JVM. | ||
id 'org.jetbrains.kotlin.jvm' version '1.3.50' | ||
|
||
// Apply the application plugin to add support for building a CLI application. | ||
id 'application' | ||
id 'idea' | ||
id 'org.springframework.boot' version '2.2.1.RELEASE' | ||
id "org.asciidoctor.convert" version "1.5.3" | ||
id "io.spring.dependency-management" version "1.0.8.RELEASE" | ||
id "org.jetbrains.kotlin.plugin.spring" version "1.3.50" | ||
id "org.jetbrains.kotlin.plugin.jpa" version "1.3.50" | ||
id "org.jlleitschuh.gradle.ktlint" version "9.1.1" | ||
} | ||
|
||
|
||
def env = project.hasProperty('env') ? project.property('env') : 'local' | ||
def fullTestOutput = project.hasProperty('fullTestOutput') ? project.property('fullTestOutput') : true | ||
|
||
|
||
repositories { | ||
jcenter() | ||
mavenCentral() | ||
maven { url "https://repo.spring.io/milestone" } | ||
} | ||
|
||
configurations { | ||
ktlint | ||
} | ||
|
||
dependencies { | ||
implementation group: 'org.jetbrains.kotlin', name: 'kotlin-reflect' | ||
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web' | ||
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-webflux' | ||
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator' | ||
|
||
implementation 'org.springframework.boot:spring-boot-starter-integration' | ||
implementation group: 'org.springframework.boot', name: 'spring-boot-devtools' | ||
implementation group: 'com.fasterxml.jackson.module', name: 'jackson-module-kotlin' | ||
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jdk8' | ||
|
||
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test' | ||
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.4.2' | ||
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.4.2' | ||
|
||
// Use the Kotlin JDK 8 standard library. | ||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' | ||
|
||
// Use the Kotlin test library. | ||
testImplementation 'org.jetbrains.kotlin:kotlin-test' | ||
|
||
// Use the Kotlin JUnit integration. | ||
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit' | ||
|
||
ktlint "com.pinterest:ktlint:0.33.0" | ||
} | ||
|
||
test.dependsOn ktlintCheck | ||
|
||
task startServices(type: Exec) { | ||
group = 'Docker Services' | ||
description = 'Start docker containers used for development.' | ||
|
||
commandLine 'docker-compose', 'up', '-d' | ||
} | ||
|
||
task stopServices(type: Exec) { | ||
group = 'Docker Services' | ||
description = 'Stop docker containers used for development.' | ||
|
||
commandLine 'docker-compose', 'down' | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
|
||
testLogging { | ||
if (fullTestOutput == true) { | ||
showStandardStreams = true | ||
} | ||
events "passed", "failed", "skipped" | ||
} | ||
|
||
reports { | ||
html.enabled = true | ||
} | ||
|
||
if (project.hasProperty('env')) { | ||
systemProperties.put('spring.profiles.active', env) | ||
} | ||
// systemProperties System.properties | ||
} | ||
|
||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { | ||
kotlinOptions { | ||
jvmTarget = "11" | ||
freeCompilerArgs = ["-Xjsr305=strict"] | ||
} | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
testLogging { | ||
if (fullTestOutput == true) { | ||
showStandardStreams = true | ||
} | ||
events "passed", "failed", "skipped" | ||
} | ||
|
||
if (project.hasProperty('env')) { | ||
systemProperties.put('spring.profiles.active', env) | ||
} | ||
} | ||
|
||
// make sure services are running for test and bootRun in a local environment | ||
if (env == 'local') { | ||
test.dependsOn(startServices) | ||
bootRun.dependsOn(startServices) | ||
} | ||
|
||
// Define the main class for the application | ||
|
||
mainClassName = 'com.neshant.springbootkotlintemplate.SpringBootKotlinTemplateApplicationKt' |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#Wed Aug 07 17:33:18 PDT 2019 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.