Added Gradle and CircleCI

This commit is contained in:
Marcelo Klein 2019-10-12 15:01:07 -03:00
parent f284b29501
commit 7712b8a5df
3 changed files with 111 additions and 0 deletions

45
.circleci/config.yml Normal file
View file

@ -0,0 +1,45 @@
# Java Gradle CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-java/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/openjdk:8-jdk
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4
working_directory: ~/repo
environment:
# Customize the JVM maximum heap limit
JVM_OPTS: -Xmx3200m
TERM: dumb
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "build.gradle" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: gradle dependencies
- save_cache:
paths:
- ~/.gradle
key: v1-dependencies-{{ checksum "build.gradle" }}
# run tests!
- run: gradle test
#generate jar
- jar: gradle jar

61
build.gradle Normal file
View file

@ -0,0 +1,61 @@
/*
* This file was generated by the Gradle 'init' task.
*/
plugins {
id 'java'
id 'maven-publish'
id 'org.springframework.boot' version '2.1.9.RELEASE'
}
repositories {
mavenLocal()
maven {
url = 'https://repo.spring.io/snapshot'
}
maven {
url = 'https://repo.spring.io/milestone'
}
maven {
url = 'http://repo.maven.apache.org/maven2'
}
}
dependencies {
compile 'org.springframework.boot:spring-boot-starter-actuator:2.1.9.RELEASE'
compile 'org.springframework.boot:spring-boot-starter-cache:2.1.9.RELEASE'
compile 'org.springframework.boot:spring-boot-starter-data-jpa:2.1.9.RELEASE'
compile 'org.springframework.boot:spring-boot-starter-web:2.1.9.RELEASE'
compile 'org.springframework.boot:spring-boot-starter-thymeleaf:2.1.9.RELEASE'
compile 'javax.cache:cache-api:1.1.1'
compile 'org.ehcache:ehcache:3.6.3'
compile 'org.webjars:webjars-locator-core:0.35'
compile 'org.webjars:jquery:2.2.4'
compile 'org.webjars:jquery-ui:1.11.4'
compile 'org.webjars:bootstrap:3.3.6'
compile 'org.springframework.boot:spring-boot-devtools:2.1.9.RELEASE'
runtime 'org.hsqldb:hsqldb:2.4.1'
runtime 'mysql:mysql-connector-java:8.0.17'
testCompile 'org.springframework.boot:spring-boot-starter-test:2.1.9.RELEASE'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
}
group = 'org.springframework.samples'
version = '2.1.0.BUILD-SNAPSHOT'
description = 'petclinic'
sourceCompatibility = '1.8'
publishing {
publications {
maven(MavenPublication) {
from(components.java)
}
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}

5
settings.gradle Normal file
View file

@ -0,0 +1,5 @@
/*
* This file was generated by the Gradle 'init' task.
*/
rootProject.name = 'spring-petclinic'