Skip to content

Commit

Permalink
fixing gitignore files
Browse files Browse the repository at this point in the history
  • Loading branch information
neshant committed Nov 16, 2019
1 parent 55b0ddb commit 3e13a18
Show file tree
Hide file tree
Showing 12 changed files with 269 additions and 184 deletions.
53 changes: 12 additions & 41 deletions .gitignore
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
123 changes: 123 additions & 0 deletions build.gradle
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'
50 changes: 0 additions & 50 deletions build.gradle.kts

This file was deleted.

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
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
18 changes: 17 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## Gradle start up script for UN*X
Expand Down Expand Up @@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down
Loading

0 comments on commit 3e13a18

Please sign in to comment.