Files
maptology/common-api/build.gradle
T
Marcus Handte ca6ce85dd1
LocationBasedServices/maptology/master There was a failure building this commit
Switch build system to gradle.
Update wildfly to latest version.
Update android project to latest version.
Add support for Java 11.
2019-07-22 12:36:04 +02:00

83 lines
2.3 KiB
Groovy

plugins {
id 'com.benjaminsproule.swagger' version '1.0.6'
}
description = 'Maptology Common Api'
dependencies {
testCompile "junit:junit:${versionJunit}"
compileOnly "javax.xml.bind:jaxb-api:${versionJaxb}"
compileOnly "javax:javaee-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.maptology.api.user.IUserService',
'com.maptology.api.notice.INoticeService',
'com.maptology.api.log.ILogService',
'com.maptology.api.version.IVersionService',
'com.maptology.api.device.IDeviceService',
'com.maptology.api.share.IShareService',
'com.maptology.api.location.ILocationService',
'com.maptology.api.privilege.IPrivilegeService',
'com.maptology.api.history.IHistoryService'
]
schemes = [ 'http', 'https']
basePath = '/api'
info {
title = 'Maptology Service'
version = "${version}"
description = 'Maptology Service'
termsOfService = 'https://maptology.com/terms-of-service'
contact {
email = 'nes-admin@uni-due.de'
name = 'NES Universität Duisburg-Essen'
url = 'https://www.nes.uni-due.de'
}
license {
url = 'https://www.maptology.com/license'
name = 'Proprietary'
}
}
swaggerFileName = 'maptology'
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/maptology.json", extension: "swagger"
}
}
}