plugins {
	id 'org.springframework.boot' version "$springBootVersion"
	id 'io.spring.dependency-management' version "$springDependencyManager"
	id 'java'
}

group = "{{ params['userJavaPackage'] }}"
version = "0.0.1-SNAPSHOT"
sourceCompatibility = JavaVersion.VERSION_17

repositories {
	mavenCentral()
}

dependencies {
	{%- if asyncapi | isProtocol('amqp') %}
	implementation('org.springframework.integration:spring-integration-amqp')
	{% endif -%}
	{%- if asyncapi | isProtocol('mqtt') %}
	implementation('org.springframework.integration:spring-integration-mqtt')
	{% endif -%}
	{%- if asyncapi | isProtocol('kafka') %}
	{%- if params.springBoot2 %}
	implementation('org.springframework.kafka:spring-kafka:2.9.12')
	testImplementation('org.springframework.kafka:spring-kafka-test:2.9.12')
	{% else %}
	implementation('org.springframework.kafka:spring-kafka')
	testImplementation('org.springframework.kafka:spring-kafka-test')
	{% endif -%}
	testImplementation('junit:junit:4.13.1')
	testImplementation('org.testcontainers:kafka:1.16.3')
	{% endif -%}
    implementation('com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider')
	implementation('com.fasterxml.jackson.datatype:jackson-datatype-jsr310')
	{%- if params.springBoot2 %}
	implementation('javax.validation:validation-api')
	implementation('org.springframework.boot:spring-boot-starter-integration:2.7.15')
	testImplementation('org.springframework.boot:spring-boot-starter-test:2.7.15')
	{% else %}
	implementation('jakarta.validation:jakarta.validation-api')
	implementation('org.springframework.boot:spring-boot-starter-integration')
	testImplementation('org.springframework.boot:spring-boot-starter-test')
	{% endif -%}
	testImplementation('org.testcontainers:testcontainers:1.16.3')
}
