Files
SCM-Manager/scm-webapp/build.gradle
2021-01-14 12:01:33 +01:00

238 lines
5.9 KiB
Groovy

/*
* MIT License
*
* Copyright (c) 2020-present Cloudogu GmbH and Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
plugins {
id 'war'
id 'org.scm-manager.java'
id 'org.scm-manager.serve'
id 'org.scm-manager.core-plugins'
id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.1.6'
}
configurations {
assets
webapp {
canBeConsumed = true
canBeResolved = false
}
}
dependencies {
implementation platform(project(':'))
corePlugin project(path: ':scm-plugins:scm-git-plugin', configuration: 'smp')
corePlugin project(path: ':scm-plugins:scm-hg-plugin', configuration: 'smp')
corePlugin project(path: ':scm-plugins:scm-svn-plugin', configuration: 'smp')
assets project(path: ':scm-ui', configuration: 'assets')
implementation project(':scm-core')
implementation project(':scm-dao-xml')
testImplementation project(':scm-test')
annotationProcessor project(':scm-annotation-processor')
// servlet api
providedCompile libraries.servletApi
testImplementation libraries.servletApi
// security
implementation libraries.shiroWeb
implementation libraries.shiroGuice
// jwt
implementation libraries.jjwtApi
implementation libraries.jjwtRuntime
implementation libraries.jjwtJackson
// gpg
implementation libraries.bouncycastlePg
implementation libraries.bouncycastleProv
implementation libraries.bouncycastlePkix
// json
implementation libraries.jacksonJaxbAnnotations
implementation libraries.jacksonJaxRsBase
implementation libraries.jacksonJaxRsJsonProvider
implementation libraries.jacksonDatatypeJdk8
implementation libraries.jacksonDatatypeJsr310
// rest api
implementation libraries.resteasyJaxbProvider
implementation libraries.resteasyJackson2Provider
implementation libraries.resteasyMultiartProvider
implementation libraries.resteasyGuice
implementation libraries.resteasyServletInitializer
implementation libraries.resteasyValidatorProvider
// openapi
compileOnly libraries.swaggerJaxRs
// logging
implementation libraries.logback
// cron expression
implementation libraries.cronUtils
// templates
implementation libraries.mustache
// static resources
implementation libraries.webResources
// content type detection
implementation libraries.spotter
implementation libraries.tika
// restart on unix
implementation libraries.akuma
// native access
implementation libraries.jna
// util
implementation libraries.commonsCompress
// lombok
compileOnly libraries.lombok
testCompileOnly libraries.lombok
annotationProcessor libraries.lombok
testAnnotationProcessor libraries.lombok
// dto mapping
annotationProcessor libraries.mapstructProcessor
// testing async code
testImplementation libraries.awaitility
// shiro unit
testImplementation libraries.shiroUnit
// rest api client
// TODO do we need this?
testImplementation libraries.jerseyClientApi
testImplementation libraries.jerseyClientRuntime
}
war {
from 'build/war'
from project.configurations.assets
dependsOn 'copy-core-plugins'
}
artifacts {
webapp(war)
}
// war without assets for development and livereload
task 'dev-war' (type: War) {
archiveName 'scm-webapp-dev.war'
from 'build/war'
dependsOn 'copy-core-plugins'
}
scmServer {
liveReload = true
openBrowser = true
warFile = file('build/libs/scm-webapp-dev.war')
}
serve {
dependsOn 'dev-war'
}
/**
WTF???
<!-- fix javadoc -->
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
<scope>provided</scope>
</dependency>
<!--
fix java.lang.NoClassDefFoundError org/w3c/dom/ElementTraversal
-->
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
</dependency>
<!-- core plugins -->
<dependency>
<groupId>sonia.scm.plugins</groupId>
<artifactId>scm-git-plugin</artifactId>
<version>2.13.0-SNAPSHOT</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>sonia.scm.plugins</groupId>
<artifactId>scm-git-plugin</artifactId>
<version>2.13.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>sonia.scm.plugins</groupId>
<artifactId>scm-hg-plugin</artifactId>
<version>2.13.0-SNAPSHOT</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>sonia.scm.plugins</groupId>
<artifactId>scm-hg-plugin</artifactId>
<version>2.13.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>sonia.scm.plugins</groupId>
<artifactId>scm-svn-plugin</artifactId>
<version>2.13.0-SNAPSHOT</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>sonia.scm.plugins</groupId>
<artifactId>scm-svn-plugin</artifactId>
<version>2.13.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
**/
test {
useJUnitPlatform()
// TODO integration tests
exclude '**/*ITCase.class'
}