Files
SCM-Manager/scm-webapp/build.gradle
Rene Pfeuffer 8025e82b1b Use pgpainless for key generation
The library pgpainless (https://gh.pgpainless.org/) makes it much more easy to create gpg keys for new users. As a benefit, these keys can be verified by GitHub.

Committed-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-05-08 15:31:56 +02:00

205 lines
5.5 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.run'
id 'org.scm-manager.core-plugins'
id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.1.12'
}
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')
corePlugin project(path: ':scm-plugins:scm-legacy-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
// tests
testImplementation libraries.junitPioneer
// jwt
implementation libraries.jjwtApi
implementation libraries.jjwtRuntime
implementation libraries.jjwtJackson
// gpg
implementation libraries.bouncycastlePg
implementation libraries.bouncycastleProv
implementation libraries.bouncycastlePkix
implementation 'org.pgpainless:pgpainless-core:1.5.0'
// 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
// events
implementation libraries.legmanShiro
implementation libraries.legmanMicrometer
// metrics
implementation libraries.micrometerExtra
implementation libraries.luceneCore
implementation libraries.luceneQueryParser
implementation libraries.luceneHighlighter
implementation libraries.luceneAnalyzersCommon
// 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
}
war {
from 'build/war'
from project.configurations.assets
into('WEB-INF/classes/META-INF/scm') {
from('build/openapi')
}
duplicatesStrategy 'WARN'
dependsOn 'copy-core-plugins', 'resolve'
}
artifacts {
webapp(war)
}
// war without assets for development and livereload
task 'dev-war' (type: War) {
archiveName 'scm-webapp-dev.war'
from 'build/war'
into('WEB-INF/classes/META-INF/scm') {
from('build/openapi')
}
duplicatesStrategy 'WARN'
dependsOn 'copy-core-plugins', 'resolve'
}
scmServer {
liveReload = true
openBrowser = true
warFile = file('build/libs/scm-webapp-dev.war')
loggingConfiguration = file('src/main/conf/logback.serve.xml')
}
run {
dependsOn 'dev-war'
}
resolve {
outputFileName = 'openapi'
outputFormat = 'JSONANDYAML'
prettyPrint = 'TRUE'
classpath = sourceSets.main.runtimeClasspath
resourcePackages = ['sonia.scm.api.v2.resources']
outputDir = file('build/openapi')
openApiFile = file('build/openapi_tmp/openapi.yml')
}
task prepareOpenAPI(type: Copy) {
from 'src/main/doc/openapi.yml'
into 'build/openapi_tmp'
duplicatesStrategy 'WARN'
expand(version: project.version)
}
tasks.getByName("resolve").configure {
dependsOn 'prepareOpenAPI'
}