mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-10-26 08:06:09 +01:00
This adds the new "queryable store" API, that allows complex queries and is backed by SQLite. This new API can be used for entities annotated with the new QueryableType annotation.
231 lines
6.5 KiB
Groovy
231 lines
6.5 KiB
Groovy
/*
|
|
* Copyright (c) 2020 - present Cloudogu GmbH
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify it under
|
|
* the terms of the GNU Affero General Public License as published by the Free
|
|
* Software Foundation, version 3.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
* details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see https://www.gnu.org/licenses/.
|
|
*/
|
|
|
|
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.2.19'
|
|
}
|
|
|
|
configurations {
|
|
assets
|
|
webapp {
|
|
canBeConsumed = true
|
|
canBeResolved = false
|
|
create("swaggerCoreDeps").defaultDependencies(new Action<DependencySet>() {
|
|
@Override
|
|
void execute(DependencySet dependencies) {
|
|
dependencies.add(project.getDependencies().create("org.apache.commons:commons-lang3:3.12.0"))
|
|
dependencies.add(project.getDependencies().create("jakarta.ws.rs:jakarta.ws.rs-api:3.1.0"))
|
|
dependencies.add(project.getDependencies().create("jakarta.servlet:jakarta.servlet-api:6.0.0"))
|
|
dependencies.add(project.getDependencies().create("io.swagger.core.v3:swagger-jaxrs2-jakarta:2.2.19"))
|
|
dependencies.add(project.getDependencies().create("com.fasterxml.jackson.core:jackson-core:2.18.2"))
|
|
}
|
|
})
|
|
}
|
|
}
|
|
|
|
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-persistence')
|
|
testImplementation project(':scm-test')
|
|
testImplementation project(':scm-queryable-test')
|
|
annotationProcessor project(':scm-annotation-processor')
|
|
testAnnotationProcessor project(':scm-core-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.6.7'
|
|
constraints {
|
|
implementation 'org.bouncycastle:bcprov-jdk18on:1.78'
|
|
implementation 'org.bouncycastle:bcpg-jdk18on:1.78'
|
|
}
|
|
|
|
// json
|
|
implementation libraries.jacksonJaxbAnnotations
|
|
implementation libraries.jacksonJaxRsBase
|
|
implementation libraries.jacksonJaxRsJsonProvider
|
|
implementation libraries.jacksonDatatypeJdk8
|
|
implementation libraries.jacksonDatatypeJsr310
|
|
implementation libraries.jacksonDataFormatYaml
|
|
|
|
// rest api
|
|
implementation libraries.resteasyJaxbProvider
|
|
implementation libraries.resteasyJackson2Provider
|
|
implementation libraries.resteasyMultiartProvider
|
|
implementation libraries.resteasyServletInitializer
|
|
implementation libraries.resteasyValidatorProvider
|
|
implementation "org.apache.httpcomponents:httpcore:4.4.16"
|
|
|
|
// 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
|
|
|
|
// plugin transformer
|
|
implementation 'org.eclipse.transformer:org.eclipse.transformer:0.5.0'
|
|
implementation 'org.eclipse.transformer:org.eclipse.transformer.jakarta:0.5.0'
|
|
}
|
|
|
|
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') {
|
|
from('src/main/conf/config.yml')
|
|
}
|
|
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')
|
|
}
|
|
|
|
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')
|
|
setBuildClasspath(project.configurations.swaggerCoreDeps)
|
|
}
|
|
|
|
task prepareOpenAPI(type: Copy) {
|
|
from 'src/main/doc/openapi.yml'
|
|
into 'build/openapi_tmp'
|
|
duplicatesStrategy 'WARN'
|
|
expand(version: project.version)
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
tasks.getByName("resolve").configure {
|
|
dependsOn 'prepareOpenAPI'
|
|
}
|
|
|
|
test {
|
|
//Requiered by set environment variable annotation
|
|
//Explanation: https://junit-pioneer.org/docs/environment-variables/#warnings-for-reflective-access
|
|
jvmArgs("--add-opens=java.base/java.util=ALL-UNNAMED", "--add-opens=java.base/java.lang=ALL-UNNAMED")
|
|
}
|