plugins {
	id 'io.spring.dependency-management' version '1.0.9.RELEASE'
	id 'org.springframework.boot' version '2.2.6.RELEASE'
	id 'checkstyle'
	id 'java'
	id 'pmd'
}

group = 'com.github.andrelugomes'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'

repositories {
	mavenCentral()
}

dependencies {
	implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
	implementation 'org.springframework.boot:spring-boot-starter-web'
	implementation 'com.vladmihalcea:hibernate-types-52:2.9.8'
	implementation 'org.postgresql:postgresql'
	implementation 'org.flywaydb:flyway-core'

	testImplementation('org.springframework.boot:spring-boot-starter-test') {
		exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
	}
	testImplementation 'com.h2database:h2:1.4.200'

}

test {
	useJUnitPlatform()
}

pmd {
	consoleOutput = true
	toolVersion = "6.21.0"
	rulePriority = 5
	ruleSetFiles = files("pmd-ruleset.xml")
	ruleSets = []
	//ruleSets = ["category/java/bestpractices.xml"]
}

checkstyle {
	toolVersion "8.31"
	configFile file("google_checks.xml")
}
