buildscript {
	ext { 
		springBootVersion = '2.1.4.RELEASE' 
		verifierVersion = '2.0.2.RELEASE'
	}
	repositories { mavenCentral() }
	dependencies { 
		classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") 
		classpath "org.springframework.cloud:spring-cloud-contract-gradle-plugin:${verifierVersion}"
	}
}

apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'spring-cloud-contract'


group = 'com.example'
version = '0.0.1-SNAPSHOT'
bootJar {
	baseName = 'contract-rest-service'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories { mavenCentral() }

dependencies {
	compile('org.springframework.boot:spring-boot-starter-web')
	testCompile('org.springframework.boot:spring-boot-starter-test')
	testCompile('org.springframework.cloud:spring-cloud-starter-contract-verifier')
}

dependencyManagement {
	imports {
		mavenBom "org.springframework.cloud:spring-cloud-dependencies:Finchley.SR2"
	}
}

contracts {
	packageWithBaseClasses = 'hello'
	baseClassMappings {
		baseClassMapping(".*hello.*", "hello.BaseClass")
	}
}
