handlebars.Java.libraries.retrofit2.build.gradle11.mustache Maven / Gradle / Ivy
plugins {
id 'java'
id 'maven-publish'
}
repositories {
mavenLocal()
maven {
url = uri('https://repo.maven.apache.org/maven2/')
}
}
ext {
oltu_version = "1.0.2"
retrofit_version = "2.7.1"
{{#usePlayWS}}
{{#play24}}
jackson_version = "2.11.4"
play_version = "2.4.11"
{{/play24}}
{{#play25}}
jackson_version = "2.11.4"
play_version = "2.5.14"
{{/play25}}
{{/usePlayWS}}
swagger_annotations_version = "{{#useOas2}}1.5.24{{/useOas2}}{{^useOas2}}2.0.0{{/useOas2}}"
junit_version = "4.12"
{{#useRxJava}}
rx_java_version = "1.3.0"
{{/useRxJava}}
{{#useRxJava2}}
rx_java_version = "2.1.1"
{{/useRxJava2}}
{{#joda}}
jodatime_version = "2.10.5"
{{/joda}}
{{#threetenbp}}
threetenbp_version = "1.4.1"
{{/threetenbp}}
json_fire_version = "1.8.3"
}
dependencies {
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-scalars:$retrofit_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
{{#useRxJava}}
implementation "com.squareup.retrofit2:adapter-rxjava:$retrofit_version"
implementation "io.reactivex:rxjava:$rx_java_version"
{{/useRxJava}}
{{#useRxJava2}}
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
implementation "io.reactivex.rxjava2:rxjava:$rx_java_version"
{{/useRxJava2}}
{{#useOas2}}
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
{{/useOas2}}
{{^useOas2}}
implementation "io.swagger.core.v3:swagger-annotations:$swagger_annotations_version"
{{/useOas2}}
implementation ("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"){
exclude group:'org.apache.oltu.oauth2' , module: 'org.apache.oltu.oauth2.common'
}
implementation "io.gsonfire:gson-fire:$json_fire_version"
{{#joda}}
implementation "joda-time:joda-time:$jodatime_version"
{{/joda}}
{{#threetenbp}}
implementation "org.threeten:threetenbp:$threetenbp_version"
{{/threetenbp}}
{{#usePlayWS}}
implementation "com.typesafe.play:play-java-ws_2.11:$play_version"
implementation "com.squareup.retrofit2:converter-jackson:$retrofit_version"
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
{{/usePlayWS}}
implementation "com.sun.xml.ws:jaxws-rt:2.3.3"
{{#wiremock}}
testImplementation "com.github.tomakehurst:wiremock:2.27.2"
{{/wiremock}}
testImplementation "junit:junit:$junit_version"
}
group = '{{groupId}}'
version = '{{artifactVersion}}'
description = '{{artifactDescription}}'
java.sourceCompatibility = 11
java.targetCompatibility = 11
tasks.register('testsJar', Jar) {
archiveClassifier = 'tests'
from(sourceSets.test.output)
}
java {
withSourcesJar()
withJavadocJar()
}
publishing {
publications {
maven(MavenPublication) {
from(components.java)
artifact(testsJar)
}
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}