Files
mowesta/common-api/build.gradle
T
handte 11868a8248
LocationBasedServices/mowesta/master There was a failure building this commit
Add app, change deployment destination, workaround for renameTo.
2020-04-30 17:26:18 +02:00

87 lines
2.4 KiB
Groovy

plugins {
id 'com.benjaminsproule.swagger' version '1.0.6'
}
description = 'Mowesta Common Api'
dependencies {
compile "javax.xml.bind:jaxb-api:${versionJaxb}"
compile "de.grundid.opendatalab:geojson-jackson:${versionGeojson}"
testCompile "junit:junit:${versionJunit}"
testCompile "org.glassfish.jaxb:jaxb-runtime:${versionJaxb}"
compileOnly "jakarta.platform:jakarta.jakartaee-api:${versionJavaee}"
compileOnly "io.swagger:swagger-annotations:${versionSwagger}"
compileOnly "com.fasterxml.jackson.core:jackson-annotations:${versionJackson}"
}
// add compile only dependencies to testCompile without duplicating them
sourceSets {
test.compileClasspath += configurations.compileOnly
}
// generate swagger documenation from api using a plugin
swagger {
apiSource {
attachSwaggerArtifact = true
locations = [
'com.mowesta.api.device.IDeviceService',
'com.mowesta.api.location.ILocationService',
'com.mowesta.api.log.ILogService',
'com.mowesta.api.measurement.IMeasurementService',
'com.mowesta.api.settings.ISettingsService',
'com.mowesta.api.user.IUserService',
'com.mowesta.api.version.IVersionService',
'com.mowesta.api.weather.IWeatherService',
]
schemes = ['https']
host = 'www.mowesta.com'
basePath = '/api'
info {
title = 'Mowesta Service'
version = project.version
description = 'The application programming '
termsOfService = 'https://mowesta.com/terms-of-service'
contact {
email = 'nes-admin@uni-due.de'
name = 'Networked Embedded Systems'
url = 'https://www.nes.uni-due.de'
}
license {
url = 'https://www.mowesta.com/license'
name = 'Mowesta License'
}
}
swaggerFileName = 'mowesta'
swaggerDirectory = "${project.buildDir}/swagger"
securityDefinition {
name = 'device'
description = 'Operations requiring device privileges.'
type = 'apiKey'
keyLocation = 'header'
keyName = 'Authorization'
}
securityDefinition {
name = 'user'
description = 'Operations requiring a valid user.'
type = 'basic'
}
securityDefinition {
name = 'admin'
description = 'Operations requiring admin privileges.'
type = 'basic'
}
}
}
// add the swagger defintion to the artifacts published by this module
publishing {
publications {
maven(MavenPublication) {
artifact source: "${project.buildDir}/swagger/mowesta.json", extension: "swagger"
}
}
}